1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
7 pkgdesc="HTTP client library"
8 url="https://github.com/mrkkrp/req"
11 depends=('ghc-libs' 'haskell-aeson' 'haskell-authenticate-oauth' 'haskell-blaze-builder'
12 'haskell-case-insensitive' 'haskell-connection' 'haskell-http-api-data'
13 'haskell-http-client' 'haskell-http-client-tls' 'haskell-http-types' 'haskell-modern-uri'
14 'haskell-monad-control' 'haskell-retry' 'haskell-transformers-base' 'haskell-unliftio-core')
15 makedepends=('ghc' 'haskell-quickcheck' 'haskell-hspec' 'haskell-hspec-core')
16 source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
17 sha512sums=('01600cee2ffb2db91a46ede812b29a94e2671dc92765b40ffcd5caa53dbaf27d97abd6f6ca18a0cd9cec0be41ea65daccecbd03e96e2a4c08dde8ee96b12adae')
22 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
23 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
24 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
25 --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
28 runhaskell Setup build $MAKEFLAGS
29 runhaskell Setup register --gen-script
30 runhaskell Setup unregister --gen-script
31 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
32 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
37 runhaskell Setup test --show-details=direct
43 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
44 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
45 runhaskell Setup copy --destdir="$pkgdir"
46 install -D -m644 LICENSE.md -t "$pkgdir"/usr/share/licenses/$pkgname/
47 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE.md