Date: Sunday, June 5, 2022 @ 17:31:15 Author: felixonmars Revision: 1223477
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 1223476, haskell-network-bsd/trunk/PKGBUILD) ----------+ PKGBUILD | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) Copied: haskell-network-bsd/repos/community-staging-x86_64/PKGBUILD (from rev 1223476, haskell-network-bsd/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2022-06-05 17:31:15 UTC (rev 1223477) @@ -0,0 +1,42 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=network-bsd +pkgname=haskell-network-bsd +pkgver=2.8.1.0 +pkgrel=153 +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 --datasubdir=$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 +}