Date: Monday, June 15, 2020 @ 22:25:31 Author: felixonmars Revision: 645585
archrelease: copy trunk to community-staging-x86_64 Added: pandoc-citeproc/repos/community-staging-x86_64/ pandoc-citeproc/repos/community-staging-x86_64/PKGBUILD (from rev 645584, pandoc-citeproc/trunk/PKGBUILD) ----------+ PKGBUILD | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) Copied: pandoc-citeproc/repos/community-staging-x86_64/PKGBUILD (from rev 645584, pandoc-citeproc/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2020-06-15 22:25:31 UTC (rev 645585) @@ -0,0 +1,58 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Arch Haskell Team <arch-hask...@haskell.org> + +pkgname=pandoc-citeproc +pkgver=0.17 +pkgrel=142 +pkgdesc="Supports using pandoc with citeproc" +url="https://hackage.haskell.org/package/$pkgname" +license=("BSD") +arch=('x86_64') +depends=('ghc-libs' 'haskell-aeson' 'haskell-aeson-pretty' 'haskell-attoparsec' + 'haskell-base-compat' 'haskell-data-default' 'haskell-hs-bibutils' 'haskell-libyaml' + 'haskell-network' 'haskell-old-locale' 'pandoc' 'haskell-pandoc-types' 'haskell-rfc5051' + 'haskell-safe' 'haskell-setenv' 'haskell-split' 'haskell-syb' 'haskell-tagsoup' + 'haskell-temporary' 'haskell-text-icu' 'haskell-unordered-containers' 'haskell-vector' + 'haskell-xml-conduit' 'haskell-yaml' 'haskell-hsyaml' 'haskell-hsyaml-aeson') +conflicts=('haskell-pandoc-citeproc') +replaces=('haskell-pandoc-citeproc') +makedepends=('ghc') +source=("https://hackage.haskell.org/packages/archive/$pkgname/${pkgver}/$pkgname-${pkgver}.tar.gz") +sha512sums=('65bc510c1208d5c76884c1b5898d033abd06ebce040c36e1ec2f11fd0107fbb6ac838e0be6d97c40c9b2893ba6bdc38d2bf5c12fec7db069bbabd37d6d07b4e7') + +prepare() { + cd "${srcdir}/$pkgname-${pkgver}" + # TODO: find a better solution + sed -i "s|(\"HOME\",\".\")|(\"HOME\",\".\"),(\"LD_LIBRARY_PATH\",\"$PWD/dist/build\"),(\"pandoc_citeproc_datadir\",\"$PWD\")|" tests/test-pandoc-citeproc.hs + sed -i 's/< *1.5/<2/' $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" --datasubdir="$pkgname" --enable-tests \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \ + -f-debug -f-test_citeproc -funicode_collation -f-embed_data_files -fbibutils -f-static + 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 $pkgname-$pkgver + # https://github.com/jgm/pandoc-citeproc/issues/342 + runhaskell Setup test || warning "Tests failed" +} + +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}" + install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/$pkgname/LICENSE" + rm -f "${pkgdir}/usr/share/doc/$pkgname/LICENSE" +}