pkgname=dblatex pkgver=0.3.9 pkgrel=1 pkgdesc="DocBook (XML and SGML) to DVI, PDF, PostScript converter using latex" arch=('x86_64') url="https://pypi.python.org/pypi/dblatex" license=(GPL) depends=('docbook-xml' 'docbook-xsl' 'libxslt' 'python2' 'texlive-core' 'texlive-htmlxml' 'texlive-latexextra' 'texlive-pictures') source=("http://downloads.sourceforge.net/project/dblatex/dblatex/dblatex-${pkgver}/dblatex-${pkgver}.tar.bz2") sha512sums=('b8157fe1da3dee5335c644729a66448652bf124a0aace5de76abc6d33e16a76c79df099e8de88d416951793f040cc7d9070b6f1c61cc46e1fda111656be92808') package() { cd $pkgname-$pkgver python2 setup.py install \ --root $pkgdir \ --catalogs=/etc/xml/docbook # Python 2 fix. sed -i -e "s,${pkgdir},," -e "s,#!/usr/bin/env python,#!/usr/bin/env python2," $pkgdir/usr/bin/dblatex # Texlive fix. Without it, ‘ghc’ package documentation won’t compile. # NOTE: see http://www.haskell.org/pipermail/glasgow-haskell-users/2011-March/020199.html sed -i -e "s#2010#2009#" $pkgdir/usr/share/$pkgname/xsl/param.xsl }