Date: Monday, February 26, 2018 @ 19:06:22 Author: felixonmars Revision: 298677
archrelease: copy trunk to community-staging-x86_64 Added: haskell-network/repos/community-staging-x86_64/ haskell-network/repos/community-staging-x86_64/PKGBUILD (from rev 298676, haskell-network/trunk/PKGBUILD) ----------+ PKGBUILD | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) Copied: haskell-network/repos/community-staging-x86_64/PKGBUILD (from rev 298676, haskell-network/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2018-02-26 19:06:22 UTC (rev 298677) @@ -0,0 +1,49 @@ +# $Id$ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Thomas Dziedzic <gos...@gmail.com> + +_hkgname=network +pkgname=haskell-network +pkgver=2.6.3.3 +pkgrel=4 +pkgdesc="Low-level networking interface" +url="https://hackage.haskell.org/package/${_hkgname}" +license=('custom:BSD3') +arch=('x86_64') +depends=('ghc-libs') +makedepends=('ghc' 'haskell-doctest' 'haskell-hunit' 'haskell-test-framework' + 'haskell-test-framework-hunit') +source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz") +sha512sums=('6ed0db7c8dd515f02c97641874a71a9b7b9e71648912f458f4c4ed23df4c1251a18988d44c590cc7cf38f04cb306ef99f2d39543ae4566993725722cec28fcef') + +prepare() { + sed -i '/]/i \ , "-dynamic"' $_hkgname-$pkgver/tests/doctests.hs +} + +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 +} + +check() { + cd $_hkgname-$pkgver + runhaskell Setup test +} + +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" +}