archrelease: copy trunk to community-any
[arch-community.git] / haskell-dns / trunk / PKGBUILD
blob554242e74a0071a33f04e2c542919f049d98b89d
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=dns
5 pkgname=haskell-dns
6 pkgver=4.1.0
7 pkgrel=28
8 pkgdesc="DNS library in Haskell"
9 url="https://hackage.haskell.org/package/${_hkgname}"
10 license=("BSD")
11 arch=('x86_64')
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'
16              'haskell-quickcheck')
17 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
18 sha512sums=('23fae51ef330b2e8dac96ed00e6ea80b1553cb2355f2824033471690b34935960201d15aefe55dc2632389171e0c0047d0eaed41463861c7896c1e7971852c2b')
20 build() {
21     cd $_hkgname-$pkgver
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
33 check() {
34     cd $_hkgname-$pkgver
35     # https://github.com/kazu-yamamoto/dns/issues/102
36     runhaskell Setup test || echo "Tests failed"
39 package() {
40     cd $_hkgname-$pkgver
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