Date: Tuesday, June 30, 2020 @ 09:38:53
  Author: felixonmars
Revision: 657132

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-optparse-generic/repos/community-staging-x86_64/
  haskell-optparse-generic/repos/community-staging-x86_64/PKGBUILD
    (from rev 657130, haskell-optparse-generic/trunk/PKGBUILD)

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

Copied: haskell-optparse-generic/repos/community-staging-x86_64/PKGBUILD (from 
rev 657130, haskell-optparse-generic/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2020-06-30 09:38:53 UTC (rev 657132)
@@ -0,0 +1,48 @@
+# Maintainer: Felix Yan <felixonm...@archlinux.org>
+
+_hkgname=optparse-generic
+pkgname=haskell-optparse-generic
+pkgver=1.4.1
+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=('2ee4f4e06ef38a3a35c20019d5bef550489da262fd4a87f1487ac9f2c240120372633df19cb132b2178de9debbda7df7790dee65c1948d1d0788335bb64de104')
+
+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 $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
+    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
+}

Reply via email to