[arch-commits] Commit in (4 files)

Felix Yan felixonmars at archlinux.org
Wed Jul 31 11:25:42 UTC 2019


    Date: Wednesday, July 31, 2019 @ 11:25:42
  Author: felixonmars
Revision: 495527

addpkg: haskell-optparse-generic 1.3.0-1

Added:
  haskell-optparse-generic/
  haskell-optparse-generic/repos/
  haskell-optparse-generic/trunk/
  haskell-optparse-generic/trunk/PKGBUILD

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

Added: haskell-optparse-generic/trunk/PKGBUILD
===================================================================
--- haskell-optparse-generic/trunk/PKGBUILD	                        (rev 0)
+++ haskell-optparse-generic/trunk/PKGBUILD	2019-07-31 11:25:42 UTC (rev 495527)
@@ -0,0 +1,48 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=optparse-generic
+pkgname=haskell-optparse-generic
+pkgver=1.3.0
+pkgrel=1
+pkgdesc="Auto-generate a command-line parser for your datatype"
+url="https://github.com/Gabriel439/Haskell-Optparse-Generic-Library"
+license=('BSD')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-system-filepath' 'haskell-only' 'haskell-optparse-applicative'
+         'haskell-void')
+makedepends=('ghc')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+sha512sums=('18fe325d32cac30460b942512628bc268ba9b2eb2e0d4ac2f61c9b3abe5d3a97d11ffe51e8f83cd44e24b0eadcdc163686da5c5b17b1835cd908fe461fcd1fbd')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    sed -i -e '/semigroups/d' -e 's/bytestring                          < 0.11,/bytestring                          < 0.11/' $_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" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+    rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
+}


More information about the arch-commits mailing list