[arch-commits] Commit in haskell-hspec/repos (2 files)

Felix Yan felixonmars at archlinux.org
Tue Jul 10 13:39:51 UTC 2018


    Date: Tuesday, July 10, 2018 @ 13:39:50
  Author: felixonmars
Revision: 356047

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-hspec/repos/community-staging-x86_64/
  haskell-hspec/repos/community-staging-x86_64/PKGBUILD
    (from rev 356046, haskell-hspec/trunk/PKGBUILD)

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

Copied: haskell-hspec/repos/community-staging-x86_64/PKGBUILD (from rev 356046, haskell-hspec/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2018-07-10 13:39:50 UTC (rev 356047)
@@ -0,0 +1,51 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=hspec
+pkgname=haskell-hspec
+pkgver=2.5.3
+pkgrel=2
+pkgdesc="A Testing Framework for Haskell"
+url="http://hspec.github.io/"
+license=('MIT')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-hunit' 'haskell-quickcheck' 'haskell-call-stack' 'haskell-hspec-core'
+         'haskell-hspec-discover' 'haskell-hspec-expectations')
+makedepends=('ghc')
+checkdepends=('haskell-hspec-meta' 'haskell-stringbuilder')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+sha512sums=('e87a9244f4ddb99ba925e888bf6cac58a03ac42a41b0a0691aea379bc8efffb69cc2a41073aa73f74e04a2ad01e12c03f43d6984ad086bdf928dba0b52a64163')
+
+build() {
+    cd $_hkgname-$pkgver
+
+    if (( CHECKFUNC )); then
+        _opts=('--enable-tests')
+    else
+        _opts=('--disable-tests')
+    fi
+    
+    runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+        --prefix=/usr --docdir="/usr/share/doc/${pkgname}" "${_opts[@]}" \
+        --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
+}
+
+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"
+}



More information about the arch-commits mailing list