Date: Wednesday, January 24, 2018 @ 20:07:43 Author: felixonmars Revision: 286687
archrelease: copy trunk to community-staging-x86_64 Added: haskell-hledger-lib/repos/community-staging-x86_64/ haskell-hledger-lib/repos/community-staging-x86_64/PKGBUILD (from rev 286686, haskell-hledger-lib/trunk/PKGBUILD) ----------+ PKGBUILD | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) Copied: haskell-hledger-lib/repos/community-staging-x86_64/PKGBUILD (from rev 286686, haskell-hledger-lib/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2018-01-24 20:07:43 UTC (rev 286687) @@ -0,0 +1,57 @@ +# $Id$ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Arch Haskell Team <arch-hask...@haskell.org> + +_hkgname=hledger-lib +pkgname=haskell-hledger-lib +pkgver=1.5 +pkgrel=8 +pkgdesc="Core data types, parsers and functionality for the hledger accounting tools" +url="http://hledger.org" +license=("GPL") +arch=('x86_64') +depends=('ghc-libs' 'haskell-ansi-terminal' 'haskell-base-compat' 'haskell-blaze-markup' + 'haskell-cmdargs' 'haskell-csv' 'haskell-data-default' 'haskell-decimal' 'haskell-extra' + 'haskell-hashtables' 'haskell-megaparsec' 'haskell-mtl' 'haskell-old-time' + 'haskell-pretty-show' 'haskell-regex-tdfa' 'haskell-safe' 'haskell-split' 'haskell-text' + 'haskell-uglymemo' 'haskell-utf8-string' 'haskell-hunit' 'haskell-parsec' + 'haskell-semigroups') +makedepends=('ghc' 'haskell-doctest' 'haskell-glob' 'haskell-test-framework' + 'haskell-test-framework-hunit') +source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz") +sha512sums=('b9f134ad4ffdfdbd79c3a477397062db7a3610a56e842244c371db1b59c50c83d7b710e54b3c0b73067f57a36f7838bcae080490fbc1389882af9f59bd450588') + +prepare() { + # It does nothing + sed -e '/mtl-compat/d' \ + -i ${_hkgname}-${pkgver}/${_hkgname}.cabal + + sed -i 's/++ fs2$/++ fs2 ++ ["-dynamic"]/' ${_hkgname}-${pkgver}/tests/doctests.hs +} + +build() { + cd "${srcdir}/${_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 "${srcdir}/${_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}" + rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE" +}