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

Felix Yan felixonmars at gemini.archlinux.org
Fri Jan 7 20:51:24 UTC 2022


    Date: Friday, January 7, 2022 @ 20:51:23
  Author: felixonmars
Revision: 1096335

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 1096334, haskell-network-bsd/trunk/PKGBUILD)

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

Copied: haskell-network-bsd/repos/community-staging-x86_64/PKGBUILD (from rev 1096334, haskell-network-bsd/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2022-01-07 20:51:23 UTC (rev 1096335)
@@ -0,0 +1,42 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=network-bsd
+pkgname=haskell-network-bsd
+pkgver=2.8.1.0
+pkgrel=126
+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 --ghc-option=-fllvm
+    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
+}
+
+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