archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-unix-compat / trunk / PKGBUILD
bloba40f4af5bcc6b9bc17212bf87997ff9465a1a524
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
7 _hkgname=unix-compat
8 pkgver=0.6
9 pkgrel=63
10 pkgdesc="Portable POSIX-compatibility layer."
11 url="https://github.com/jacobstanley/unix-compat"
12 license=('BSD3')
13 arch=('x86_64')
14 depends=('ghc-libs')
15 makedepends=('ghc' 'haskell-hunit' 'haskell-extra' 'haskell-hspec' 'haskell-monad-parallel'
16              'haskell-temporary')
17 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
18 sha512sums=('0d84e61b5d1836b30912dd33abb01bc99aa949b58b881282f9ca42ab246bdd5b9066316240ea82e71e846cf15a25f9a60f24cad361503bc1cfe02f0e388d851c')
20 build() {
21     cd $_hkgname-$pkgver
22     
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 \
26         -f-old-time
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
34 check() {
35     cd $_hkgname-$pkgver
36     runhaskell Setup test --show-details=direct
39 package() {
40     cd $_hkgname-$pkgver
41     
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