upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / haskell-req / trunk / PKGBUILD
blob8bf2f3d5d08420b2a9cd4724d50a67cbad7ff211
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=req
4 pkgname=haskell-req
5 pkgver=3.13.0
6 pkgrel=45
7 pkgdesc="HTTP client library"
8 url="https://github.com/mrkkrp/req"
9 license=('BSD')
10 arch=('x86_64')
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')
19 build() {
20   cd $_hkgname-$pkgver    
21     
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 \
26     --ghc-option='-pie'
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
35 check() {
36   cd $_hkgname-$pkgver
37   runhaskell Setup test --show-details=direct
40 package() {
41   cd $_hkgname-$pkgver
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