1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=data-array-byte
4 pkgname=haskell-data-array-byte
7 pkgdesc="Compatibility layer for Data.Array.Byte"
8 url="https://github.com/Bodigrim/data-array-byte"
12 makedepends=('ghc' 'uusi')
13 checkdepends=('haskell-quickcheck-classes-base' 'haskell-tasty' 'haskell-tasty-quickcheck')
14 source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
15 sha256sums=('1bb6eca0b3e02d057fe7f4e14c81ef395216f421ab30fdaa1b18017c9c025600')
25 if (( CHECKFUNC )); then
26 _opts=('--enable-tests')
28 _opts=('--disable-tests')
31 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
32 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname "${_opts[@]}" \
33 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
34 --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
37 runhaskell Setup build $MAKEFLAGS
38 runhaskell Setup register --gen-script
39 runhaskell Setup unregister --gen-script
40 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
41 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
46 runhaskell Setup test --show-details=direct
52 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
53 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
54 runhaskell Setup copy --destdir="$pkgdir"
55 install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
56 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE