[arch-commits] Commit in haskell-network-bsd/repos (2 files)

Felix Yan felixonmars at archlinux.org
Sat Mar 21 16:41:06 UTC 2020


    Date: Saturday, March 21, 2020 @ 16:41:05
  Author: felixonmars
Revision: 602815

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-network-bsd/repos/community-staging-x86_64/
  haskell-network-bsd/repos/community-staging-x86_64/PKGBUILD
    (from rev 602814, haskell-network-bsd/trunk/PKGBUILD)

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

Copied: haskell-network-bsd/repos/community-staging-x86_64/PKGBUILD (from rev 602814, haskell-network-bsd/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-03-21 16:41:05 UTC (rev 602815)
@@ -0,0 +1,42 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=network-bsd
+pkgname=haskell-network-bsd
+pkgver=2.8.1.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=('b2f66c6705c490e1cbaab6ca88444294bc90b3711da4039046a9279060ed41228ab855b40039f56bd02eabcc0351200de3e043a108a0cdc98192d563702de7f3')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    sed -i 's/< *3.0/<4/' $_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
+}
+
+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