Date: Thursday, October 13, 2022 @ 15:30:40
  Author: felixonmars
Revision: 1328014

addpkg: haskell-data-functor-logistic 0.0-1

Added:
  haskell-data-functor-logistic/
  haskell-data-functor-logistic/repos/
  haskell-data-functor-logistic/trunk/
  haskell-data-functor-logistic/trunk/PKGBUILD

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

Added: haskell-data-functor-logistic/trunk/PKGBUILD
===================================================================
--- haskell-data-functor-logistic/trunk/PKGBUILD                                
(rev 0)
+++ haskell-data-functor-logistic/trunk/PKGBUILD        2022-10-13 15:30:40 UTC 
(rev 1328014)
@@ -0,0 +1,48 @@
+# Maintainer: Felix Yan <[email protected]>
+
+_hkgname=data-functor-logistic
+pkgname=haskell-data-functor-logistic
+pkgver=0.0
+pkgrel=1
+pkgdesc="Updatable analogue of Distributive functors"
+url="https://github.com/fumieval/data-functor-logistic";
+license=("BSD")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-distributive')
+makedepends=('ghc' 'uusi')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz";)
+sha256sums=('15f794f13d4b0c7e7f89aa7c42fa7ff3cbb77a7a1a8168da8343e953af24594c')
+
+prepare() {
+  cd $_hkgname-$pkgver
+  gen-setup
+}
+
+build() {
+  cd $_hkgname-$pkgver
+
+  runhaskell Setup configure -O --enable-shared --enable-executable-dynamic 
--disable-library-vanilla \
+    --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname 
--enable-tests \
+    --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \
+    --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
+    --ghc-option='-pie' 
+
+  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 --show-details=direct
+}
+
+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"
+}

Reply via email to