[arch-commits] Commit in (4 files)

Felix Yan felixonmars at archlinux.org
Wed Mar 20 08:46:29 UTC 2019


    Date: Wednesday, March 20, 2019 @ 08:46:29
  Author: felixonmars
Revision: 442836

addpkg: haskell-network-bsd 2.8.0.0-1

Added:
  haskell-network-bsd/
  haskell-network-bsd/repos/
  haskell-network-bsd/trunk/
  haskell-network-bsd/trunk/PKGBUILD

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

Added: haskell-network-bsd/trunk/PKGBUILD
===================================================================
--- haskell-network-bsd/trunk/PKGBUILD	                        (rev 0)
+++ haskell-network-bsd/trunk/PKGBUILD	2019-03-20 08:46:29 UTC (rev 442836)
@@ -0,0 +1,37 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=network-bsd
+pkgname=haskell-network-bsd
+pkgver=2.8.0.0
+pkgrel=1
+pkgdesc="POSIX network database (<netdb.h>) API"
+url="https://github.com/haskell/network-bsd"
+license=('MIT')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-network')
+makedepends=('ghc')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+sha512sums=('697d83e76ccd9b9efe0a7bf354126184ca2c4dc33ed9f3912896f43910aea3a34d3b7d98b9f61d7632923e01edf59b0d40e4f1cd211f2aa04885485c59be463b')
+
+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
+}
+
+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