Date: Wednesday, October 3, 2018 @ 12:02:23 Author: felixonmars Revision: 389189
addpkg: haskell-cassava-megaparsec 1.0.0-1 Added: haskell-cassava-megaparsec/ haskell-cassava-megaparsec/repos/ haskell-cassava-megaparsec/trunk/ haskell-cassava-megaparsec/trunk/PKGBUILD ----------+ PKGBUILD | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) Added: haskell-cassava-megaparsec/trunk/PKGBUILD =================================================================== --- haskell-cassava-megaparsec/trunk/PKGBUILD (rev 0) +++ haskell-cassava-megaparsec/trunk/PKGBUILD 2018-10-03 12:02:23 UTC (rev 389189) @@ -0,0 +1,48 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=cassava-megaparsec +pkgname=haskell-cassava-megaparsec +pkgver=1.0.0 +pkgrel=1 +pkgdesc="Megaparsec parser of CSV files that plays nicely with Cassava" +url="https://github.com/stackbuilders/cassava-megaparsec" +license=('MIT') +arch=('x86_64') +depends=('ghc-libs' 'haskell-cassava' 'haskell-megaparsec' 'haskell-unordered-containers' + 'haskell-vector') +makedepends=('ghc' 'haskell-hspec' 'haskell-hspec-megaparsec') +source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz) +sha512sums=('f67b74621a7b14787ab3b1ba43d94564c735e2780d4e0f03dbb96c7043908579986cff4f5ecf9f261e12f97525980a510bbff8c70584289dbc73a4b2e206029c') + +prepare() { + cd $_hkgname-$pkgver + sed -i 's/<.*0.5/<1/' $_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 +} + +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.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md" + rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE.md" +}