Date: Friday, January 14, 2022 @ 21:19:02
  Author: felixonmars
Revision: 1103476

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

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

Copied: haskell-servant-swagger/repos/community-staging-x86_64/PKGBUILD (from 
rev 1103475, haskell-servant-swagger/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2022-01-14 21:19:02 UTC (rev 1103476)
@@ -0,0 +1,57 @@
+# Maintainer: Felix Yan <felixonm...@archlinux.org>
+# Contributor: Arch Haskell Team <arch-hask...@haskell.org>
+
+_hkgname=servant-swagger
+pkgname=haskell-servant-swagger
+pkgver=1.1.10
+pkgrel=213
+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' 'uusi' '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";
+        
$_hkgname-fragment-instance.patch::https://github.com/haskell-servant/servant-swagger/commit/cce6bf064e01ade21a7a8f283beca41595792446.patch)
+sha512sums=('df3b397ce03dbb4c852598d4d188bcddde40fd9bd762eac53c837267420876ba3aa4d07fb638ffe0d0fa60c9cf080ad483508bf0359b45120f807ed65331f3bc'
+            
'96bd6acdd78a9ff777c81c0e1d507167dc9ea4d27c905bc41afecc9c5fef75ca293e9e5621efe5e62319b2fb96b39bc690682dd841839b87240acdd7f588f34a')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    # https://github.com/haskell-servant/servant-swagger/issues/129
+    patch -p1 -i ../$_hkgname-fragment-instance.patch
+    uusi -u base -u doctest -u lens -u hspec $_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 
--ghc-option=-fllvm
+    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
+    # json ordering issue
+    runhaskell Setup test || echo "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
+}

Reply via email to