Date: Thursday, January 6, 2022 @ 01:08:30 Author: felixonmars Revision: 1094017
archrelease: copy trunk to community-staging-x86_64 Added: haskell-commonmark-extensions/repos/community-staging-x86_64/ haskell-commonmark-extensions/repos/community-staging-x86_64/PKGBUILD (from rev 1094016, haskell-commonmark-extensions/trunk/PKGBUILD) ----------+ PKGBUILD | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) Copied: haskell-commonmark-extensions/repos/community-staging-x86_64/PKGBUILD (from rev 1094016, haskell-commonmark-extensions/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2022-01-06 01:08:30 UTC (rev 1094017) @@ -0,0 +1,47 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=commonmark-extensions +pkgname=haskell-commonmark-extensions +pkgver=0.2.1.2 +pkgrel=36 +pkgdesc="Pure Haskell commonmark parser" +url="https://github.com/jgm/commonmark-hs" +license=('BSD') +arch=('x86_64') +depends=('ghc-libs' 'haskell-commonmark' 'haskell-emojis' 'haskell-network-uri') +makedepends=('ghc' 'uusi' 'haskell-tasty' 'haskell-tasty-hunit') +source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz) +sha512sums=('f2a41ad2f71d67512affc0c5882d86256e7b9f7dce1194c8a6708ba5dfbb0807d8dbdd8a7972c6c2e0a0dcf6695fe68cd1430488756222dc1a545671e0aa10e1') + +prepare() { + cd $_hkgname-$pkgver + gen-setup +} + +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 --ghc-option=-fllvm + 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 +} + +check() { + cd $_hkgname-$pkgver + runhaskell Setup test --show-details=direct +} + +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 +}