archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-lifted-async / trunk / PKGBUILD
blob21332ef6bb591cc2b2523c850634a3becb29d924
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=lifted-async
4 pkgname=haskell-lifted-async
5 pkgver=0.10.2.4
6 pkgrel=4
7 pkgdesc="Run lifted IO operations asynchronously and wait for their results"
8 url="https://github.com/maoe/lifted-async"
9 license=('BSD')
10 arch=('x86_64')
11 depends=('ghc-libs' 'haskell-async' 'haskell-constraints' 'haskell-lifted-base'
12          'haskell-monad-control' 'haskell-transformers-base')
13 makedepends=('ghc')
14 checkdepends=('haskell-hunit' 'haskell-tasty' 'haskell-tasty-expected-failure'
15               'haskell-tasty-hunit' 'haskell-tasty-th')
16 source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
17 sha512sums=('03be46dca1e525ac152afb9bab6f83522f8ca1ccaa90407b1704eaad4ab05e36d279799ebc2b7e22028a8d7ce02965bdc7089f99e701aa9bb3cc9bc035e82891')
19 build() {
20     cd $_hkgname-$pkgver
22     if (( CHECKFUNC )); then
23         _opts=('--enable-tests')
24     else
25         _opts=('--disable-tests')
26     fi
28     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
29         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname "${_opts[@]}" \
30         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
31     runhaskell Setup build $MAKEFLAGS
32     runhaskell Setup register --gen-script
33     runhaskell Setup unregister --gen-script
34     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
35     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
38 check() {
39     cd $_hkgname-$pkgver
40     runhaskell Setup test --show-details=direct
43 package() {
44     cd $_hkgname-$pkgver
46     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
47     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
48     runhaskell Setup copy --destdir="$pkgdir"
49     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
50     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE