Date: Sunday, April 8, 2018 @ 15:25:54
  Author: felixonmars
Revision: 315139

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 315138, haskell-servant-swagger/trunk/PKGBUILD)

----------+
 PKGBUILD |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

Copied: haskell-servant-swagger/repos/community-staging-x86_64/PKGBUILD (from 
rev 315138, haskell-servant-swagger/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2018-04-08 15:25:54 UTC (rev 315139)
@@ -0,0 +1,50 @@
+# $Id$
+# Maintainer: Felix Yan <felixonm...@archlinux.org>
+# Contributor: Arch Haskell Team <arch-hask...@haskell.org>
+
+_hkgname=servant-swagger
+pkgname=haskell-servant-swagger
+pkgver=1.1.4
+pkgrel=63
+pkgdesc="Generate Swagger specification for your servant API."
+url="https://github.com/haskell-servant/servant-swagger";
+license=("custom:BSD3")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-aeson' 'haskell-http-media' 
'haskell-insert-ordered-containers'
+         'haskell-lens' 'haskell-servant' 'haskell-swagger2' 'haskell-text'
+         'haskell-unordered-containers' 'haskell-hspec' 'haskell-quickcheck')
+makedepends=('ghc' 'haskell-aeson-qq' 'haskell-cabal-doctest' 
'haskell-doctest')
+source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz";)
+sha512sums=('990e8c03d6ed6da0ac15d80cd4bce5a46f816fce4e6cfb8eb11db664d09662075ae1ef3508a682fc695a76e3952d080c4e406a0cdb12b995e044935e408cd516')
+
+prepare() {
+    sed -i '/test-suite doctests/a \  x-doctest-options: -dynamic' 
$_hkgname-$pkgver/$_hkgname.cabal
+}
+
+build() {
+    cd "${srcdir}/${_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 "${srcdir}/${_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"
+}

Reply via email to