void-packages/srcpkgs/pandoc/template

43 lines
1.4 KiB
Plaintext

# Template file for 'pandoc'
pkgname=pandoc
version=1.13.2
_citeproc_version=0.6
revision=1
nocross=yes
hostmakedepends="cabal-install"
makedepends="zlib-devel"
short_desc="Universal converter between markup formats (with citeproc support)"
maintainer="Christian Neukirchen <chneukirchen@gmail.com>"
license="GPL-2"
homepage="http://johnmacfarlane.net/pandoc/"
distfiles="http://hackage.haskell.org/package/${pkgname}-${version}/${pkgname}-${version}.tar.gz"
checksum=e65c445f4454e9efcf1bc8c28754260d7108803bd8979bc2ff3c34705e386d8a
do_build() {
cabal sandbox init
export PATH="$PWD/.cabal-sandbox/bin:$PATH"
cabal update
cabal install ${makejobs} --user hsb2hs
cabal install ${makejobs} --user --only-dependencies
cabal configure -v --prefix=/usr --libsubdir='$pkg' \
--datasubdir='$pkg' --docdir='$datadir/doc/$pkg' \
--flags="embed_data_files"
cabal build ${makejobs}
cabal install ${makejobs} --user pandoc-citeproc-${_citeproc_version} \
--flags="embed_data_files"
}
do_install() {
cabal copy --destdir="$DESTDIR/"
vlicense "$DESTDIR/usr/share/pandoc/COPYRIGHT" LICENSE.pandoc
for f in .cabal-sandbox/share/doc/*/pandoc-citeproc-*/LICENSE; do
vlicense $f LICENSE.pandoc-citeproc
done
rm -r "$DESTDIR/usr/lib" "$DESTDIR/usr/share/doc/pandoc/COPYING" \
"$DESTDIR/usr/share/pandoc/COPYRIGHT"
vbin .cabal-sandbox/bin/pandoc-citeproc
vman .cabal-sandbox/share/man/man1/pandoc-citeproc.1
vman man/man1/pandoc.1
vman man/man5/pandoc_markdown.5
}