Date: Wednesday, November 29, 2017 @ 13:42:32 Author: felixonmars Revision: 270688
archrelease: copy trunk to community-staging-x86_64 Added: haskell-language-c/repos/community-staging-x86_64/ haskell-language-c/repos/community-staging-x86_64/PKGBUILD (from rev 270687, haskell-language-c/trunk/PKGBUILD) ----------+ PKGBUILD | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) Copied: haskell-language-c/repos/community-staging-x86_64/PKGBUILD (from rev 270687, haskell-language-c/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2017-11-29 13:42:32 UTC (rev 270688) @@ -0,0 +1,47 @@ +# $Id$ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Arch Haskell Team <arch-hask...@haskell.org> + +_hkgname=language-c +pkgname=haskell-language-c +pkgver=0.7.1 +pkgrel=1 +pkgdesc="Analysis and generation of C code" +url="http://visq.github.io/language-c/" +license=("custom:BSD3") +arch=('x86_64') +depends=('ghc-libs' 'haskell-syb') +makedepends=('happy' 'alex' 'ghc') +source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz") +sha512sums=('c62dee86b70ead9c0795cabc6b1e0487ab3d4e1e4df693cec94c255aa96d21589d9161150073a5ec1d2ae168924dd8a11ae6ee0cd46730a25ccda009f7a45f58') + +build() { + cd "${srcdir}/${_hkgname}-${pkgver}" + + rm -fr dist + + 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 \ + -fseparatesyb -fusebytestrings -fsplitbase -f-allwarnings + 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}" + install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE" +}