1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=uri-bytestring
4 pkgname=haskell-uri-bytestring
7 pkgdesc="Haskell URI parsing as ByteStrings"
8 url="https://github.com/Soostone/uri-bytestring"
11 depends=('ghc-libs' 'haskell-attoparsec' 'haskell-blaze-builder' 'haskell-th-lift-instances')
12 makedepends=('ghc' 'haskell-base-compat' 'haskell-hunit' 'haskell-hedgehog' 'haskell-tasty'
13 'haskell-tasty-hedgehog' 'haskell-tasty-hunit' 'haskell-safe')
14 source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
15 sha512sums=('58a467b94a887c018be118f1775e9c7b8ecdf75d655fc1dd235bc2a49a7e5356b4be5a51cabc3135341193a78065e1b44901745ebe9016fcc6636131a2c28672')
20 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
21 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
22 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
24 runhaskell Setup build $MAKEFLAGS
25 runhaskell Setup register --gen-script
26 runhaskell Setup unregister --gen-script
27 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
28 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
33 runhaskell Setup test --show-details=direct
39 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
40 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
41 runhaskell Setup copy --destdir="$pkgdir"
42 install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
43 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE