Date: Saturday, September 10, 2022 @ 14:32:49 Author: felixonmars Revision: 1299100
archrelease: copy trunk to community-staging-x86_64 Added: haskell-tasty-hedgehog/repos/community-staging-x86_64/ haskell-tasty-hedgehog/repos/community-staging-x86_64/PKGBUILD (from rev 1299099, haskell-tasty-hedgehog/trunk/PKGBUILD) ----------+ PKGBUILD | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) Copied: haskell-tasty-hedgehog/repos/community-staging-x86_64/PKGBUILD (from rev 1299099, haskell-tasty-hedgehog/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2022-09-10 14:32:49 UTC (rev 1299100) @@ -0,0 +1,54 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=tasty-hedgehog +pkgname=haskell-tasty-hedgehog +pkgver=1.3.0.0 +pkgrel=6 +pkgdesc="Integration for tasty and hedgehog" +url="https://github.com/qfpl/tasty-hedgehog" +license=('BSD') +arch=('x86_64') +depends=('ghc-libs' 'haskell-hedgehog' 'haskell-tagged' 'haskell-tasty') +makedepends=('ghc' 'uusi') +checkdepends=('haskell-tasty-expected-failure') +source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz) +sha512sums=('dec464d4f1daafe6db830cf560c8b0f0e35b7df8095dc6f3f5c97d006f1c03ee6e7e7f95da997dda4be818ee34f22828e49db73b5f49b7c3ecf02935fc4a6727') + +prepare() { + cd $_hkgname-$pkgver + uusi -u hedgehog $_hkgname.cabal +} + +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 --datasubdir=$pkgname "${_opts[@]}" \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm + 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 --show-details=direct +} + +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 "LICENCE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENCE" + rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENCE" +}