archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-binary-parser / trunk / PKGBUILD
blob0da021f4c48dd57e1103d454a072d446eae64ae1
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=binary-parser
5 pkgname=haskell-binary-parser
6 pkgver=0.5.7.3
7 pkgrel=16
8 pkgdesc="An efficient but limited parser API specialised to bytestrings"
9 url="https://github.com/nikita-volkov/binary-parser"
10 license=("MIT")
11 arch=('x86_64')
12 depends=('ghc-libs')
13 makedepends=('ghc' 'uusi' 'haskell-quickcheck' 'haskell-base-prelude' 'haskell-quickcheck-instances'
14              'haskell-tasty' 'haskell-tasty-hunit' 'haskell-tasty-quickcheck')
15 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
16 sha512sums=('9e87f3c252c3cd821252fb624c19cd88d69901718f948bfd86b9c090ccea689547a64ca1dc869b969cf2b4f5ca50a433b85ffb20d74406697815b40d213b67b4')
18 prepare() {
19     cd $_hkgname-$pkgver
20     gen-setup
23 build() {
24     cd $_hkgname-$pkgver
25     
26     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
27         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
28         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
29     runhaskell Setup build $MAKEFLAGS
30     runhaskell Setup register --gen-script
31     runhaskell Setup unregister --gen-script
32     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
33     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
36 check() {
37     cd $_hkgname-$pkgver
38     runhaskell Setup test --show-details=direct
41 package() {
42     cd $_hkgname-$pkgver
43     
44     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
45     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
46     runhaskell Setup copy --destdir="$pkgdir"
47     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
48     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE