1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
8 pkgdesc="Run IO operations asynchronously and wait for their results"
9 url="https://github.com/simonmar/async"
12 depends=('ghc-libs' 'haskell-hashable')
13 makedepends=('ghc' 'uusi')
14 checkdepends=('haskell-hunit' 'haskell-test-framework' 'haskell-test-framework-hunit')
15 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
16 sha512sums=('24f37f974dd7573138475d04c0fccb97fcbd8b3de56f7d06199b8f936fd9a29cd0ba0574212a753a81de8958b3292ecee79d0e8d0d2f51eb91874424e6219569')
20 uusi -u hashable $_hkgname.cabal
26 if (( CHECKFUNC )); then
27 _opts=('--enable-tests')
29 _opts=('--disable-tests')
32 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
33 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname "${_opts[@]}" \
34 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
35 runhaskell Setup build $MAKEFLAGS
36 runhaskell Setup register --gen-script
37 runhaskell Setup unregister --gen-script
38 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
39 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
44 runhaskell Setup test --show-details=direct
50 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
51 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
52 runhaskell Setup copy --destdir="$pkgdir"
53 install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
54 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE