# Maintainer: Nicolas Reynolds # Based on haskell-pandoc # custom variables _hkgname=pandoc _licensefile=COPYING # PKGBUILD options/directives pkgname=pandoc pkgver=1.9.1.2 pkgrel=1 pkgdesc='Conversion between markup formats (no Haskell libs)' url='http://johnmacfarlane.net/pandoc/' license=('GPL') arch=('i686' 'x86_64') makedepends=('ghc' 'sh' 'cabal-install') options=('strip') source=(https://repo.parabolagnulinux.org/other/${pkgname}-${pkgver}-${pkgrel}-any.src.tar.xz{,.sig}) conflicts=('haskell-pandoc') md5sums=('8b71e4a113f5b3bf456cf335d4f365f1' '01f99b7d67d0726fe6b80396ead780d1') # PKGBUILD functions build() { mkdir -p ${srcdir}/{build,${_hkgname}-${pkgver}} cd ${srcdir}/${_hkgname}-${pkgver} HOME=${srcdir}/${_hkgname}-${pkgver} \ cabal install --prefix=${srcdir}/build/usr \ --enable-shared \ ${_hkgname}-${pkgver} } package() { # Copy everything, but remove docs and haskell-libs cp -a ${srcdir}/build/usr ${pkgdir}/ rm -r ${pkgdir}/usr/{lib,share/*} cp -a ${srcdir}/build/usr/share/man ${pkgdir}/usr/share/ cp -a ${srcdir}/build/usr/share/doc ${pkgdir}/usr/share/ find ${pkgdir}/usr/share -type f -exec chmod 644 {} \; find ${pkgdir}/usr/share -type d -exec chmod 755 {} \; }