archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / haskell-http-conduit / trunk / PKGBUILD
blob4c0de5214bc14bf5c137be7f5ab0264d23ef093a
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=http-conduit
5 pkgname=haskell-http-conduit
6 pkgver=2.3.8
7 pkgrel=300
8 pkgdesc="HTTP client package with conduit interface and HTTPS support"
9 url="https://www.yesodweb.com/book/http-conduit"
10 license=("BSD")
11 arch=('x86_64')
12 depends=('ghc-libs' 'haskell-aeson' 'haskell-attoparsec' 'haskell-conduit' 'haskell-conduit-extra'
13          'haskell-http-client' 'haskell-http-client-tls' 'haskell-http-types' 'haskell-resourcet'
14          'haskell-unliftio-core')
15 makedepends=('ghc' 'haskell-blaze-builder' 'haskell-case-insensitive' 'haskell-connection'
16              'haskell-cookie' 'haskell-data-default-class' 'haskell-hunit' 'haskell-hspec'
17              'haskell-lifted-base' 'haskell-network' 'haskell-streaming-commons' 'haskell-temporary'
18              'haskell-unliftio' 'haskell-utf8-string' 'haskell-wai' 'haskell-wai-conduit'
19              'haskell-warp' 'haskell-warp-tls')
20 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
21 sha512sums=('44c337f1a0a0ec74a5d6e4e28a3aa5a32609c3a4da9424e99aedc2a8db67fc4684ef10cf82d6bda0761c7ffba4f0222e683946ab6dd8de1ab8225a40cc14cf66')
23 build() {
24     cd $_hkgname-$pkgver
26     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
27         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
28         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
29     runhaskell Setup build $MAKEFLAGS
30     runhaskell Setup register --gen-script
31     runhaskell Setup unregister --gen-script
32     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
33     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
36 check() {
37     cd $_hkgname-$pkgver
38     runhaskell Setup test || echo "Tests failed"
41 package() {
42     cd $_hkgname-$pkgver
44     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
45     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
46     runhaskell Setup copy --destdir="$pkgdir"
47     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
48     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE