Date: Tuesday, March 21, 2023 @ 03:35:46 Author: felixonmars Revision: 1424614
archrelease: copy trunk to community-staging-x86_64 Added: haskell-pandoc-lua-engine/repos/community-staging-x86_64/ haskell-pandoc-lua-engine/repos/community-staging-x86_64/PKGBUILD (from rev 1424613, haskell-pandoc-lua-engine/trunk/PKGBUILD) ----------+ PKGBUILD | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) Copied: haskell-pandoc-lua-engine/repos/community-staging-x86_64/PKGBUILD (from rev 1424613, haskell-pandoc-lua-engine/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2023-03-21 03:35:46 UTC (rev 1424614) @@ -0,0 +1,55 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=pandoc-lua-engine +pkgname=haskell-pandoc-lua-engine +pkgver=0.1 +pkgrel=31 +pkgdesc="Lua engine to power custom pandoc conversions" +url="https://pandoc.org" +license=("GPL") +arch=('x86_64') +depends=('ghc-libs' 'haskell-sha' 'haskell-citeproc' 'haskell-data-default' 'haskell-doclayout' + 'haskell-doctemplates' 'haskell-hslua' 'haskell-hslua-aeson' 'haskell-hslua-core' + 'haskell-hslua-module-doclayout' 'haskell-hslua-module-path' 'haskell-hslua-module-system' + 'haskell-hslua-module-text' 'haskell-hslua-module-version' 'haskell-hslua-module-zip' + 'haskell-lpeg' 'haskell-pandoc' 'haskell-pandoc-lua-marshal' 'haskell-pandoc-types') +makedepends=('ghc' 'uusi' 'haskell-tasty' 'haskell-tasty-golden' 'haskell-tasty-hunit' + 'haskell-tasty-lua') +source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz") +sha256sums=('b8119b69cfd0c541f9329b73a10a7cfd56f872cc24a0d6ae67ba5f89b6fb2723') + +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 --datasubdir=$pkgname --enable-tests \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \ + --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \ + --ghc-option='-pie' + + 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 COPYING.md -t "$pkgdir"/usr/share/licenses/$pkgname/ + rm -f "$pkgdir"/usr/share/doc/$pkgname/COPYING.md +}