Date: Saturday, November 30, 2019 @ 13:17:35 Author: felixonmars Revision: 534579
archrelease: copy trunk to community-staging-x86_64 Added: haskell-servant-swagger/repos/community-staging-x86_64/ haskell-servant-swagger/repos/community-staging-x86_64/PKGBUILD (from rev 534578, haskell-servant-swagger/trunk/PKGBUILD) ----------+ PKGBUILD | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) Copied: haskell-servant-swagger/repos/community-staging-x86_64/PKGBUILD (from rev 534578, haskell-servant-swagger/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2019-11-30 13:17:35 UTC (rev 534579) @@ -0,0 +1,47 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Arch Haskell Team <arch-hask...@haskell.org> + +_hkgname=servant-swagger +pkgname=haskell-servant-swagger +pkgver=1.1.7.1 +pkgrel=34 +pkgdesc="Generate Swagger specification for your servant API." +url="https://github.com/haskell-servant/servant-swagger" +license=("BSD") +arch=('x86_64') +depends=('ghc-libs' 'haskell-aeson' 'haskell-aeson-pretty' 'haskell-http-media' + 'haskell-insert-ordered-containers' 'haskell-lens' 'haskell-servant' + 'haskell-singleton-bool' 'haskell-swagger2' 'haskell-unordered-containers' + 'haskell-hspec' 'haskell-quickcheck') +makedepends=('ghc' 'haskell-base-compat' 'haskell-cabal-doctest' 'haskell-doctest' + 'haskell-hspec-discover' 'haskell-lens-aeson' 'haskell-utf8-string' 'haskell-vector') +source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz") +sha512sums=('74b71c331272ad905e5a73f81d2b7eba4a6b705bc633f3e7747824d3c8f22e0f4518a19c47792ecc46d3c0956d39280201b085c2be1c78dc7455f6fd5ca1b434') + +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 + 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 || warning "Tests failed" +} + +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" +}