1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Daniel Nagy <danielnagy at gmx de>
3 # Contributor: Lex Black <autumn-wind at web dot de>
4 # Contributor: Don Stewart <dons@galois.com>
6 pkgname=haskell-unix-compat
10 pkgdesc="Portable POSIX-compatibility layer."
11 url="https://github.com/jacobstanley/unix-compat"
15 makedepends=('ghc' 'haskell-hunit' 'haskell-extra' 'haskell-hspec' 'haskell-monad-parallel'
17 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
18 sha512sums=('0d84e61b5d1836b30912dd33abb01bc99aa949b58b881282f9ca42ab246bdd5b9066316240ea82e71e846cf15a25f9a60f24cad361503bc1cfe02f0e388d851c')
23 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
24 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
25 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
27 runhaskell Setup build $MAKEFLAGS
28 runhaskell Setup register --gen-script
29 runhaskell Setup unregister --gen-script
30 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
31 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
36 runhaskell Setup test --show-details=direct
42 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
43 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
44 runhaskell Setup copy --destdir="$pkgdir"
45 install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
46 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE