Date: Monday, August 17, 2020 @ 05:34:17 Author: felixonmars Revision: 682160
archrelease: copy trunk to community-staging-x86_64 Added: haskell-cabal-doctest/repos/community-staging-x86_64/ haskell-cabal-doctest/repos/community-staging-x86_64/PKGBUILD (from rev 682159, haskell-cabal-doctest/trunk/PKGBUILD) ----------+ PKGBUILD | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) Copied: haskell-cabal-doctest/repos/community-staging-x86_64/PKGBUILD (from rev 682159, haskell-cabal-doctest/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2020-08-17 05:34:17 UTC (rev 682160) @@ -0,0 +1,43 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Arch Haskell Team <arch-hask...@haskell.org> + +_hkgname=cabal-doctest +pkgname=haskell-cabal-doctest +pkgver=1.0.8 +pkgrel=5 +pkgdesc="A Setup.hs helper for doctests running" +url="https://github.com/phadej/cabal-doctest" +license=("BSD") +arch=('x86_64') +depends=('ghc-libs') +makedepends=('ghc') +source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz") +sha512sums=('121827f4f9117673c5c41beeaff2ef74f75ca55fba8460f6289d69b1ebfdebb9568f23b4b7d0ab2f3d436cbcdaa073709a26562b39e5f57a6a705088d0a2ff71') + +prepare() { + cd $_hkgname-$pkgver + sed -i 's/< *3.1/<4/;s/< *4.14/<5/' $_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 \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid + runhaskell Setup build $MAKEFLAGS + 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 $_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 +}