|
| 1 | +# Maintainer: Felix Yan <[email protected]> |
| 2 | + |
| 3 | +_hkgname=http-download |
| 4 | +pkgname=haskell-http-download |
| 5 | +pkgver=0.2.0.0 |
| 6 | +pkgrel=152 |
| 7 | +pkgdesc="Verified downloads with retries" |
| 8 | +url="https://github.com/commercialhaskell/http-download" |
| 9 | +license=('MIT') |
| 10 | +arch=('x86_64') |
| 11 | +depends=('ghc-libs' 'haskell-base64-bytestring' 'haskell-conduit' 'haskell-conduit-extra' |
| 12 | + 'haskell-cryptonite' 'haskell-cryptonite-conduit' |
| 13 | + 'haskell-http-client' 'haskell-http-conduit' 'haskell-http-types' 'haskell-memory' |
| 14 | + 'haskell-path' 'haskell-path-io' 'haskell-retry' 'haskell-rio' 'haskell-rio-prettyprint') |
| 15 | +makedepends=('ghc' 'haskell-hspec' 'haskell-hspec-discover') |
| 16 | +source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz) |
| 17 | +sha512sums=('b31caa48c1ea2a01f1301ca63b2e0c135cd0d3d392b92518c7d70d89fd83da7fd95cffa3cb374900a45fb2da8d17f748de0de72fb4beb8ad11e203676f9864ae') |
| 18 | + |
| 19 | +prepare() { |
| 20 | + cd $_hkgname-$pkgver |
| 21 | + echo -e "import Distribution.Simple\nmain = defaultMain" > Setup.hs |
| 22 | +} |
| 23 | + |
| 24 | +build() { |
| 25 | + cd $_hkgname-$pkgver |
| 26 | + |
| 27 | + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ |
| 28 | + --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \ |
| 29 | + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid |
| 30 | + runhaskell Setup build $MAKEFLAGS |
| 31 | + runhaskell Setup register --gen-script |
| 32 | + runhaskell Setup unregister --gen-script |
| 33 | + sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh |
| 34 | + sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh |
| 35 | +} |
| 36 | + |
| 37 | +check() { |
| 38 | + cd $_hkgname-$pkgver |
| 39 | + runhaskell Setup test |
| 40 | +} |
| 41 | + |
| 42 | +package() { |
| 43 | + cd $_hkgname-$pkgver |
| 44 | + |
| 45 | + install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh |
| 46 | + install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh |
| 47 | + runhaskell Setup copy --destdir="$pkgdir" |
| 48 | + install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE |
| 49 | + rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE |
| 50 | +} |
0 commit comments