1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Maintainer: Caleb Maclennan <caleb@alerque.com>
3 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
5 pkgname=pandoc-crossref
8 pkgdesc="Pandoc filter for cross-references"
9 url="https://hackage.haskell.org/package/${pkgname}"
12 depends=('ghc-libs' 'haskell-data-default' 'haskell-gitrev' 'haskell-microlens'
13 'haskell-microlens-mtl' 'haskell-microlens-th' 'haskell-open-browser'
14 'haskell-optparse-applicative' 'haskell-pandoc' 'haskell-pandoc-types' 'haskell-syb'
16 makedepends=('ghc' 'haskell-hspec' 'pandoc-cli')
17 conflicts=('haskell-pandoc-crossref')
18 replaces=('haskell-pandoc-crossref')
19 source=("https://hackage.haskell.org/packages/archive/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz")
20 sha512sums=('f6498a2c8f40a8b22caa43b68d74553525ed7a9e3a151df01aa372bec35e646f1f61206e6cb44db5b674d89c19146c476e597a3675e077ce89fb562c05a69d19')
24 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
25 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
26 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
28 runhaskell Setup build $MAKEFLAGS
29 runhaskell Setup register --gen-script
30 runhaskell Setup unregister --gen-script
31 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
32 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
37 runhaskell Setup test --show-details=direct
43 install -D -m744 register.sh "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
44 install -D -m744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
45 runhaskell Setup copy --destdir="${pkgdir}"
46 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE