archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-conduit-extra / trunk / PKGBUILD
blobd2ac97005123b83c672646104cba975a4248025d
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=conduit-extra
5 pkgname=haskell-conduit-extra
6 pkgver=1.3.6
7 pkgrel=74
8 pkgdesc="Batteries included conduit: adapters for common libraries."
9 url="https://github.com/snoyberg/conduit"
10 license=("MIT")
11 arch=('x86_64')
12 depends=('ghc-libs' 'haskell-async' 'haskell-attoparsec' 'haskell-conduit' 'haskell-network'
13          'haskell-primitive' 'haskell-resourcet' 'haskell-streaming-commons' 'haskell-typed-process'
14          'haskell-unliftio-core')
15 makedepends=('ghc' 'haskell-hspec' 'haskell-hspec-discover' 'haskell-quickcheck'
16              'haskell-transformers-base')
17 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
18 sha512sums=('56f6abf0663734c0e40b3d21fed6d0942fe30acc8960105ac93ddbb15d10c9074213e0ead575cc4422824832beae026376d04a13f6a045efc2a695676cf03546')
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     runhaskell Setup test --show-details=direct
38 package() {
39     cd $_hkgname-$pkgver
41     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
42     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
43     runhaskell Setup copy --destdir="$pkgdir"
44     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
45     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE