1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
8 pkgdesc="DNS library in Haskell"
9 url="https://hackage.haskell.org/package/${_hkgname}"
12 depends=('ghc-libs' 'haskell-async' 'haskell-auto-update' 'haskell-attoparsec'
13 'haskell-base16-bytestring' 'haskell-base64-bytestring' 'haskell-cryptonite'
14 'haskell-hourglass' 'haskell-iproute' 'haskell-network' 'haskell-psqueues')
15 makedepends=('ghc' 'haskell-doctest' 'haskell-hspec' 'haskell-hspec-discover' 'haskell-word8'
17 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
18 sha512sums=('23fae51ef330b2e8dac96ed00e6ea80b1553cb2355f2824033471690b34935960201d15aefe55dc2632389171e0c0047d0eaed41463861c7896c1e7971852c2b')
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 runhaskell Setup build $MAKEFLAGS
27 runhaskell Setup register --gen-script
28 runhaskell Setup unregister --gen-script
29 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
30 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
35 # https://github.com/kazu-yamamoto/dns/issues/102
36 runhaskell Setup test || echo "Tests failed"
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