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

Felix Yan felixonmars at archlinux.org
Mon Dec 3 09:18:10 UTC 2018


    Date: Monday, December 3, 2018 @ 09:18:10
  Author: felixonmars
Revision: 410874

archrelease: copy trunk to community-staging-x86_64

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

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

Copied: haskell-hspec-megaparsec/repos/community-staging-x86_64/PKGBUILD (from rev 410873, haskell-hspec-megaparsec/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2018-12-03 09:18:10 UTC (rev 410874)
@@ -0,0 +1,47 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=hspec-megaparsec
+pkgname=haskell-hspec-megaparsec
+pkgver=2.0.0
+pkgrel=1
+pkgdesc="Utility functions for testing Megaparsec parsers with Hspec"
+url="https://github.com/goldfirere/hspec-megaparsec"
+license=('BSD')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-hspec-expectations' 'haskell-megaparsec')
+makedepends=('ghc' 'haskell-hspec')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+sha512sums=('f0795a0fec3237ceeb52f44a11ef7ea71efe197e819ba0dff56cb474f05f859e9983faca54dc47f4e89e43a402e42ba11310166a3e41d5c58cda21fb9ad5aea2')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    sed -i 's/< *0.6/<1/' $_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
+    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.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
+    rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE.md"
+}



More information about the arch-commits mailing list