# Maintainer: Nicolas Reynolds # Based on haskell-pandoc # Run `makepkg -sp SRCBUILD` if you want to update the source tarball pkgname=pandoc-static _pkgname=pandoc pkgver=1.12.2.1 pkgrel=1 pkgdesc='Conversion between markup formats (no Haskell libs)' url='http://johnmacfarlane.net/pandoc/' license=('GPL') arch=('i686' 'x86_64') # Needed for pandoc-citeproc depends=('icu>=52' 'icu<=53') makedepends=('ghc' 'sh' 'cabal-install' 'alex' 'happy') options=(strip !makeflags !distcc !emptydirs) source=(https://repo.parabolagnulinux.org/other/parabola_source_packages/${_pkgname}-${pkgver}-1-any.src.tar.xz{,.sig} SRCBUILD) sha256sums=('07e56b2df8f73f95eea713c61584b0e19b51b564db12af39d33a093e436e86d1' 'SKIP' '9f6701eb9e12130fdcb8d1c3df3e3603afd95e9535a31091ee833838731d6f81') replaces=('pandoc') provides=('pandoc') optdepends=('texlive-most: for pdf creation') # PKGBUILD functions build() { mkdir -p ${srcdir}/{build,${_pkgname}-${pkgver}} cd ${srcdir}/${_pkgname}-${pkgver} # pandoc-citeproc needs hsb2hs export PATH=${srcdir}/build/usr/bin:$PATH while read _hkpkg; do # Skip already built [ -d ${srcdir}/build/usr/lib/$_hkpkg ] && continue pushd ${srcdir}/${_pkgname}-${pkgver}/${_hkpkg} >/dev/null msg2 "Building $_hkpkg" case $_hkpkg in $_pkgname-$pkgver) HOME=${srcdir}/${_pkgname}-${pkgver} \ cabal configure --prefix=/usr \ --libdir=${srcdir}/build/usr/lib -v HOME=${srcdir}/${_pkgname}-${pkgver} \ cabal build HOME=${srcdir}/${_pkgname}-${pkgver} \ cabal register --inplace ;; pandoc-citeproc*) HOME=${srcdir}/${_pkgname}-${pkgver} \ cabal configure --flags='small_base embed_data_files bibutils hexpat unicode_collation' \ --libdir=${srcdir}/build/usr/lib \ --prefix=/usr -v HOME=${srcdir}/${_pkgname}-${pkgver} \ cabal build ;; *) HOME=${srcdir}/${_pkgname}-${pkgver} \ cabal install --prefix=${srcdir}/build/usr --flags="embed_data_files" ;; esac popd >/dev/null done