Date: Sunday, August 22, 2021 @ 10:00:42 Author: felixonmars Revision: 1004197
archrelease: copy trunk to community-staging-x86_64 Added: haskell-http-streams/repos/community-staging-x86_64/ haskell-http-streams/repos/community-staging-x86_64/PKGBUILD (from rev 1004196, haskell-http-streams/trunk/PKGBUILD) ----------+ PKGBUILD | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) Copied: haskell-http-streams/repos/community-staging-x86_64/PKGBUILD (from rev 1004196, haskell-http-streams/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2021-08-22 10:00:42 UTC (rev 1004197) @@ -0,0 +1,54 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=http-streams +pkgname=haskell-http-streams +pkgver=0.8.8.1 +pkgrel=24 +pkgdesc="An HTTP client using io-streams" +url="https://github.com/aesiniath/http-streams" +license=('BSD') +arch=('x86_64') +depends=('ghc-libs' 'haskell-attoparsec' 'haskell-base64-bytestring' 'haskell-blaze-builder' + 'haskell-case-insensitive' 'haskell-io-streams' 'haskell-hsopenssl' + 'haskell-openssl-streams' 'haskell-unordered-containers' 'haskell-aeson' + 'haskell-http-common' 'haskell-network' 'haskell-network-uri') +makedepends=('ghc') +checkdepends=('haskell-hunit' 'haskell-aeson-pretty' 'haskell-hspec' + 'haskell-hspec-expectations' 'haskell-snap-core' 'haskell-snap-server' + 'haskell-system-fileio' 'haskell-system-filepath') +source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz) +sha512sums=('41de4d985cc4dc7cc9cca440a9dedb428fd261ec4584d8f9260129e15747f0905b4a800c150603fbf965db8194ef4aed1803fbe122fdf6b7a433534d77969fb1') + +build() { + cd $_hkgname-$pkgver + + if (( CHECKFUNC )); then + _opts=('--enable-tests') + else + _opts=('--disable-tests') + fi + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir=/usr/share/doc/$pkgname "${_opts[@]}" \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid + runhaskell Setup build $MAKEFLAGS + runhaskell Setup register --gen-script + runhaskell Setup unregister --gen-script + sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh + sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh +} + +check() { + cd $_hkgname-$pkgver + runhaskell Setup test --show-details=direct +} + +package() { + cd $_hkgname-$pkgver + + install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh + install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh + runhaskell Setup copy --destdir="$pkgdir" + install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/ + rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE +}