Date: Friday, July 2, 2021 @ 04:46:15 Author: felixonmars Revision: 970275
archrelease: copy trunk to community-staging-x86_64 Added: haskell-text-short/repos/community-staging-x86_64/ haskell-text-short/repos/community-staging-x86_64/PKGBUILD (from rev 970274, haskell-text-short/trunk/PKGBUILD) ----------+ PKGBUILD | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) Copied: haskell-text-short/repos/community-staging-x86_64/PKGBUILD (from rev 970274, haskell-text-short/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2021-07-02 04:46:15 UTC (rev 970275) @@ -0,0 +1,51 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Arch Haskell Team <arch-hask...@haskell.org> + +_hkgname=text-short +pkgname=haskell-text-short +pkgver=0.1.3 +pkgrel=143 +pkgdesc="Memory-efficient representation of Unicode text strings" +url="https://github.com/hvr/text-short" +license=("BSD") +arch=('x86_64') +depends=('ghc-libs' 'haskell-hashable') +makedepends=('ghc' 'haskell-quickcheck-instances' 'haskell-tasty' 'haskell-tasty-hunit' + 'haskell-tasty-quickcheck') +source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz") +sha512sums=('6d7a5379dbaf28a201dd44229959a293acb5ff57c4659a6a34af37e46b2e6fc5eb61a00ba26d36dd08795456246429ec20236af8e342fd0d03bfcf6d06d69428') + +prepare() { + cd $_hkgname-$pkgver + sed -i 's/< *4.13/<5/;s/< *0.6/<1/;s/< *1.3/<2/' $_hkgname.cabal +} + +build() { + cd $_hkgname-$pkgver + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \ + -f-asserts + runhaskell Setup build $MAKEFLAGS + runhaskell Setup register --gen-script + runhaskell Setup unregister --gen-script + sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh + sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh +} + +check() { + cd $_hkgname-$pkgver + # https://github.com/haskell-hvr/text-short/issues/20 + runhaskell Setup test --show-details=direct || echo "Tests failed" +} + +package() { + cd $_hkgname-$pkgver + + install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh + install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh + runhaskell Setup copy --destdir="$pkgdir" + install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE +}