void-packages/srcpkgs/pandoc/template

36 lines
1.4 KiB
Bash

# Template file for 'pandoc'
pkgname=pandoc
# Keep in sync with http://www.stackage.org/lts
version=1.15.0.6
_citeproc_version=0.7.3
_stackage="lts-3.0"
revision=1
nocross=yes
create_wrksrc=yes
hostmakedepends="ghc stack hsb2hs"
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
http://hackage.haskell.org/package/${pkgname}-citeproc-${_citeproc_version}/${pkgname}-citeproc-${_citeproc_version}.tar.gz"
checksum="d950968142526d5a765af7dfb26b47c3f60d4f883aa9d9eab668614179f1ed46
72fc81d962812d037bb78c6d38d602ca2c6895f0436c8be94cb71600ed288e68"
do_build() {
export STACK_ROOT=$wrksrc/.stack
stack init --force --resolver ${_stackage}
stack ${makejobs} build --flag pandoc:-old-locale --flag pandoc:embed_data_files
}
do_install() {
export STACK_ROOT=$wrksrc/.stack
vmkdir usr/bin
stack install --flag pandoc:-old-locale --flag pandoc:embed_data_files --local-bin-path=${DESTDIR}/usr/bin
vman pandoc-${version}/man/pandoc.1
vman pandoc-citeproc-${_citeproc_version}/man/man1/pandoc-citeproc.1
vlicense pandoc-${version}/COPYRIGHT LICENSE.pandoc
vlicense pandoc-citeproc-${_citeproc_version}/LICENSE LICENSE.pandoc-citeproc
}