Date: Saturday, August 1, 2020 @ 07:12:26 Author: felixonmars Revision: 667336
archrelease: copy trunk to community-staging-x86_64 Added: haskell-servant/repos/community-staging-x86_64/ haskell-servant/repos/community-staging-x86_64/PKGBUILD (from rev 667335, haskell-servant/trunk/PKGBUILD) ----------+ PKGBUILD | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) Copied: haskell-servant/repos/community-staging-x86_64/PKGBUILD (from rev 667335, haskell-servant/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2020-08-01 07:12:26 UTC (rev 667336) @@ -0,0 +1,52 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Arch Haskell Team <arch-hask...@haskell.org> + +_hkgname=servant +pkgname=haskell-servant +pkgver=0.17 +pkgrel=67 +pkgdesc="A family of combinators for defining webservices APIs" +url="http://haskell-servant.readthedocs.org/" +license=("BSD") +arch=('x86_64') +depends=('ghc-libs' 'haskell-base-compat' 'haskell-aeson' 'haskell-attoparsec' + 'haskell-bifunctors' 'haskell-case-insensitive' 'haskell-http-api-data' + 'haskell-http-media' 'haskell-http-types' 'haskell-mmorph' 'haskell-network-uri' + 'haskell-quickcheck' 'haskell-tagged' 'haskell-singleton-bool' + 'haskell-string-conversions' 'haskell-vault') +makedepends=('ghc' 'haskell-hspec' 'haskell-quickcheck-instances') +source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz") +sha512sums=('ce0b64441e497d771b5af4e7516ef2b47502b59d1158b22e80194ebda79f34e9346d994a3e4af6fe2e3a8742c7a52166fa76eed98ec8153b602b9db225aeae3b') + +prepare() { + cd $_hkgname-$pkgver + sed -i 's/< *2.14/<3/;s/< *4.14/<5/;s/< *1.5/<2/' $_hkgname.cabal +} + +build() { + cd $_hkgname-$pkgver + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \ + --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 +} + +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 "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE +}