archrelease: copy trunk to community-any
[ArchLinux/community.git] / pandoc-crossref / repos / community-x86_64 / PKGBUILD
blob6d24c2a0d05e0f00d1761ede1307ed54bd857a34
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
6 pkgver=0.3.15.2
7 pkgrel=17
8 pkgdesc="Pandoc filter for cross-references"
9 url="https://hackage.haskell.org/package/${pkgname}"
10 license=("GPL2")
11 arch=('x86_64')
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'
15          'haskell-utility-ht')
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')
22 build() {
23   cd $pkgname-$pkgver
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 \
27     -f-enable_flaky_tests
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
35 check() {
36   cd $pkgname-$pkgver
37   runhaskell Setup test --show-details=direct
40 package() {
41   cd $pkgname-$pkgver
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