[arch-commits] Commit in haskell-servant-swagger/trunk (PKGBUILD)

Felix Yan felixonmars at archlinux.org
Mon Dec 11 07:28:47 UTC 2017


    Date: Monday, December 11, 2017 @ 07:28:46
  Author: felixonmars
Revision: 273652

upgpkg: haskell-servant-swagger 1.1.4-7

rebuild with servant-swagger,1.1.4 (+tests)

Modified:
  haskell-servant-swagger/trunk/PKGBUILD

----------+
 PKGBUILD |   21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-12-11 07:25:59 UTC (rev 273651)
+++ PKGBUILD	2017-12-11 07:28:46 UTC (rev 273652)
@@ -5,23 +5,27 @@
 _hkgname=servant-swagger
 pkgname=haskell-servant-swagger
 pkgver=1.1.4
-pkgrel=6
+pkgrel=7
 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')
+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}" \
+        --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
@@ -30,6 +34,11 @@
     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
 }
 
+check() {
+    cd $_hkgname-$pkgver
+    runhaskell Setup test
+}
+
 package() {
     cd "${srcdir}/${_hkgname}-${pkgver}"
 



More information about the arch-commits mailing list