|
| 1 | +# Maintainer: Felix Yan <[email protected]> |
| 2 | +# Contributor: Arch Haskell Team <[email protected]> |
| 3 | + |
| 4 | +_hkgname=http-conduit |
| 5 | +pkgname=haskell-http-conduit |
| 6 | +pkgver=2.3.7.3 |
| 7 | +pkgrel=215 |
| 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 | + $pkgname-http-client-0.7.patch::https://github.com/snoyberg/http-client/commit/a09b8ac914f57f9782cc4230cb0528fc63ac54ab.patch) |
| 22 | +sha512sums=('0b3733ce031299ee3b93ca44d45a913e384dbfcd43efe5c65076efb5ff8266058ecb07e90f699ebb54d2d37f4a299be79717c3988e72cce631d417ba21ed4d08' |
| 23 | + '292d33d8dd7591500eba2c1e2ee4a5733a10977c7d715fe3b3c1875fb1a2d482a604cbc4c70a35da1a82bd4acc57c4f33cf51c0ea1038f3cb1c75ecc7989696f') |
| 24 | + |
| 25 | +prepare() { |
| 26 | + cd $_hkgname-$pkgver |
| 27 | + patch -p2 -i ../$pkgname-http-client-0.7.patch |
| 28 | + sed -i 's/< *0.7/<1/' $_hkgname.cabal |
| 29 | +} |
| 30 | + |
| 31 | +build() { |
| 32 | + cd $_hkgname-$pkgver |
| 33 | + |
| 34 | + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ |
| 35 | + --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \ |
| 36 | + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid |
| 37 | + runhaskell Setup build $MAKEFLAGS |
| 38 | + runhaskell Setup register --gen-script |
| 39 | + runhaskell Setup unregister --gen-script |
| 40 | + sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh |
| 41 | + sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh |
| 42 | +} |
| 43 | + |
| 44 | +check() { |
| 45 | + cd $_hkgname-$pkgver |
| 46 | + runhaskell Setup test || echo "Tests failed" |
| 47 | +} |
| 48 | + |
| 49 | +package() { |
| 50 | + cd $_hkgname-$pkgver |
| 51 | + |
| 52 | + install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh |
| 53 | + install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh |
| 54 | + runhaskell Setup copy --destdir="$pkgdir" |
| 55 | + install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE |
| 56 | + rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE |
| 57 | +} |
0 commit comments