Date: Wednesday, February 12, 2020 @ 16:13:39
  Author: felixonmars
Revision: 569453

addpkg: haskell-optics-extra 0.2-1

Added:
  haskell-optics-extra/
  haskell-optics-extra/repos/
  haskell-optics-extra/trunk/
  haskell-optics-extra/trunk/PKGBUILD

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

Added: haskell-optics-extra/trunk/PKGBUILD
===================================================================
--- haskell-optics-extra/trunk/PKGBUILD                         (rev 0)
+++ haskell-optics-extra/trunk/PKGBUILD 2020-02-12 16:13:39 UTC (rev 569453)
@@ -0,0 +1,43 @@
+# Maintainer: Felix Yan <felixonm...@archlinux.org>
+
+_hkgname=optics-extra
+pkgname=haskell-optics-extra
+pkgver=0.2
+pkgrel=1
+pkgdesc="Extra utilities and instances for optics-core"
+url="https://github.com/well-typed/optics-extra";
+license=('BSD')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-hashable' 'haskell-indexed-profunctors' 
'haskell-optics-core'
+         'haskell-unordered-containers' 'haskell-vector')
+makedepends=('ghc')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+sha512sums=('1c111ad2681c2c8bb8259cf8e5fd3931dd33c2bbcd0d76293a29d053e6c5cdd39a98c593c6f0a6d49224b4f8397c3cd0ee5a54662ddebcbfbb153bd6ca99e31e')
+
+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"
+}

Reply via email to