archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / pandoc-cli / repos / community-x86_64 / PKGBUILD
blobdde312ed31705710c3a9292924d4a093cb420331
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=pandoc-cli
4 pkgver=0.1
5 pkgrel=58
6 pkgdesc="Conversion between documentation formats"
7 url="https://pandoc.org"
8 license=("GPL")
9 arch=('x86_64')
10 provides=('pandoc')
11 conflicts=('pandoc')
12 replaces=('pandoc')
13 depends=('ghc-libs' 'hslua-cli' 'haskell-pandoc' 'haskell-pandoc-lua-engine' 'haskell-pandoc-server'
14          'haskell-safe' 'haskell-wai-extra' 'haskell-warp')
15 makedepends=('ghc' 'uusi')
16 source=("https://hackage.haskell.org/packages/archive/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz")
17 sha256sums=('c5d6ac5fecfcbc0c2a69c696dc543e60bcf9685fc3db3ae5d9929abe6c28cb05')
19 prepare() {
20   cd $pkgname-$pkgver
21   gen-setup
24 build() {
25   cd $pkgname-$pkgver
27   runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
28     --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --datasubdir=haskell-pandoc-cli --enable-tests \
29     --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
30     --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
31     --ghc-option='-pie' \
32     -flua -f-nightly -fserver
34   runhaskell Setup build $MAKEFLAGS
37 check() {
38   cd $pkgname-$pkgver
39   runhaskell Setup test --show-details=direct
42 package() {
43   cd $pkgname-$pkgver
44   runhaskell Setup copy --destdir="$pkgdir"
45   install -D -m644 COPYING.md -t "$pkgdir"/usr/share/licenses/$pkgname/
46   rm -f "$pkgdir"/usr/share/doc/$pkgname/COPYING.md
48   LD_LIBRARY_PATH="$PWD/dist/build" dist/build/pandoc/pandoc --bash-completion > pandoc-completion.bash
49   install -Dm644 pandoc-completion.bash "$pkgdir"/usr/share/bash-completion/completions/pandoc