Date: Saturday, June 23, 2018 @ 04:23:42 Author: felixonmars Revision: 344672
archrelease: copy trunk to community-staging-x86_64 Added: haskell-src-exts/repos/community-staging-x86_64/ haskell-src-exts/repos/community-staging-x86_64/PKGBUILD (from rev 344671, haskell-src-exts/trunk/PKGBUILD) ----------+ PKGBUILD | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) Copied: haskell-src-exts/repos/community-staging-x86_64/PKGBUILD (from rev 344671, haskell-src-exts/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2018-06-23 04:23:42 UTC (rev 344672) @@ -0,0 +1,49 @@ +# $Id$ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Arch Haskell Team <arch-hask...@haskell.org> + +_hkgname=haskell-src-exts +pkgname=haskell-src-exts +pkgver=1.20.2 +pkgrel=13 +pkgdesc="Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer" +url="https://github.com/haskell-suite/haskell-src-exts" +license=("custom:BSD") +arch=('x86_64') +depends=('ghc-libs' 'haskell-cpphs') +makedepends=('ghc' 'happy' 'haskell-pretty-show' 'haskell-smallcheck' 'haskell-tasty' + 'haskell-tasty-golden' 'haskell-tasty-smallcheck') +source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz") +sha512sums=('1d80eb41f62069c1f3152d3d06ea3504bd0d28a5d4c4b28460e91889ec40773e48df2838743d36c6b65fb89422491b459968145a44e441e3b8ac8f1dbd785bf2') + +prepare() { + sed -i 's/pretty-show == 1.6.10/pretty-show/' $_hkgname-$pkgver/$_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" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE" +}