Date: Monday, February 5, 2018 @ 16:27:59 Author: felixonmars Revision: 289241
archrelease: copy trunk to community-staging-x86_64 Added: cabal-helper/repos/community-staging-x86_64/ cabal-helper/repos/community-staging-x86_64/PKGBUILD (from rev 289240, cabal-helper/trunk/PKGBUILD) ----------+ PKGBUILD | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) Copied: cabal-helper/repos/community-staging-x86_64/PKGBUILD (from rev 289240, cabal-helper/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2018-02-05 16:27:59 UTC (rev 289241) @@ -0,0 +1,47 @@ +# $Id$ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Arch Haskell Team <arch-hask...@haskell.org> + +pkgname=cabal-helper +pkgver=0.7.3.0 +pkgrel=9 +pkgdesc="Simple interface to some of Cabals configuration state used by ghc-mod" +url="https://hackage.haskell.org/package/${pkgname}" +license=("AGPL3") +arch=('x86_64') +depends=('ghc-libs' "haskell-mtl" "haskell-temporary" "haskell-utf8-string") +conflicts=('haskell-cabal-helper') +replaces=('haskell-cabal-helper') +makedepends=('ghc') +source=('https://github.com/achirkin/cabal-helper/archive/68ceff5916f515e3026a3f40aa44570e47d50a0c.tar.gz') +#source=("https://hackage.haskell.org/packages/archive/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz" +sha512sums=('bd900c8e3183ecd991a17dbb61bdc200f1ebebcfbc3374cbba4c534a829e042ad65251c7a77a492cd819764c85229e0210ae11c2597b2b7e9b5d40dcd5caa870') + +prepare() { + mv $pkgname-68ceff5916f515e3026a3f40aa44570e47d50a0c $pkgname-$pkgver + sed -i 's/import Distribution.Version/import Distribution.Version hiding (showVersion)/' $pkgname-$pkgver/CabalHelper/{Sandbox.hs,Compile.hs,Wrapper.hs} + sed -i 's/, process.*/, process/' $pkgname-$pkgver/$pkgname.cabal +} + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir="/usr/share/doc/${pkgname}" --libexecdir="/usr/lib" \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \ + -f-dev + 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 +} + +package() { + cd "${srcdir}/${pkgname}-${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" +}