Date: Tuesday, October 20, 2020 @ 19:11:16 Author: felixonmars Revision: 727672
archrelease: copy trunk to community-staging-x86_64 Added: haskell-hspec-discover/repos/community-staging-x86_64/ haskell-hspec-discover/repos/community-staging-x86_64/PKGBUILD (from rev 727671, haskell-hspec-discover/trunk/PKGBUILD) ----------+ PKGBUILD | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) Copied: haskell-hspec-discover/repos/community-staging-x86_64/PKGBUILD (from rev 727671, haskell-hspec-discover/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2020-10-20 19:11:16 UTC (rev 727672) @@ -0,0 +1,48 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=hspec-discover +pkgname=haskell-hspec-discover +pkgver=2.7.4 +pkgrel=6 +pkgdesc="Automatically discover and run Hspec tests" +url="http://hspec.github.io/" +license=('MIT') +arch=('x86_64') +depends=('ghc-libs') +makedepends=('ghc' 'haskell-quickcheck' 'haskell-hspec-meta') +source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz) +sha512sums=('004c52cf5fb45e9afc66c7d30b92653898bbe61780538ca477773313d6d16d37a9a440099148613a244d15b56d0742524dcae16ae0a6987b71b9c26b8e8175ef') + +build() { + cd $_hkgname-$pkgver + + if (( CHECKFUNC )); then + _opts=('--enable-tests') + else + _opts=('--disable-tests') + fi + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir=/usr/share/doc/$pkgname "${_opts[@]}" \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid + 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 + runhaskell Setup test +} + +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 +}