# Maintainer: Jesus E. pkgbase=python-mako pkgname=('python-mako' 'tauthon-mako') pkgver=1.1.3 _debver=$pkgver _debrel=2 pkgrel=2 pkgdesc="A super-fast templating language that borrows the best ideas from the existing templating languages" arch=('any') url='https://www.makotemplates.org/' license=('Expat') makedepends=('python-setuptools' 'tauthon-setuptools' 'python-markupsafe' 'tauthon-markupsafe' 'python-beaker' 'tauthon-beaker' 'quilt') source=("https://pypi.io/packages/source/M/Mako/Mako-$pkgver.tar.gz" "https://deb.debian.org/debian/pool/main/m/mako/mako_${_debver}+ds1-${_debrel}.debian.tar.xz") sha512sums=('a9b94fa34a61e7794b6e4549fa0bada6ff84dfb0d9edb8d5c7f9b95d12184fa4499f42303cfee720b576a9f7e986a57d91ad3aeb26c9f93154dbc08fb2975952' '664ccd3fccc02d4470735855db3030a7cb37ad1cdf54f58a9dd5986792b51652dab2b65350e43daac254d008a7ef628d3c59d6b3d503e014a9615e72f4e3b8ab') prepare() { cd "$srcdir"/Mako-$pkgver if [[ ${pkgver%.*} = ${_debver%.*} ]]; then # Debian patches export QUILT_PATCHES=debian/patches export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index' export QUILT_DIFF_ARGS='--no-timestamps' mv "$srcdir"/debian . quilt push -av fi cp -a "$srcdir"/Mako-$pkgver{,-tauthon} } build() { cd "$srcdir"/Mako-$pkgver python setup.py build cd "$srcdir"/Mako-$pkgver-tauthon tauthon setup.py build } package_python-mako() { depends=('python-markupsafe' 'python-beaker' 'python-setuptools') cd Mako-$pkgver python setup.py install --root="$pkgdir" --optimize=1 install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname } package_tauthon-mako() { depends=('tauthon-markupsafe' 'tauthon-beaker' 'tauthon-setuptools') cd Mako-$pkgver-tauthon tauthon setup.py install --root="$pkgdir" --optimize=1 install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname mv "$pkgdir"/usr/bin/mako-render{,-tauthon} }