# Maintainer: Erich Eckner pkgname=python2-courier-pythonfilter _pkgname='courier-pythonfilter' pkgver=2.93 pkgrel=1 pkgdesc='collection of useful filters for the Courier MTA, and a framework for developing new filters in Python' arch=('any') url='https://github.com/szepeviktor/courier-pythonfilter/' license=('GPL') depends=( 'python2>=2.7' 'python2<2.8' ) makedepends=( 'python2-setuptools') source=("https://bitbucket.org/gordonmessmer/${_pkgname}/get/release-${pkgver//./-}.tar.gz") sha512sums=('c8e2ff55e025398f566a976107aee5c04e3a95c32b829e62fd70e813184ca4ab891959453267dc6bc00e0d8d977e40c812d02de6183fe284a2006170ff5c0042') backup=('etc/pythonfilter-modules.conf' 'etc/pythonfilter.conf') optdepends=( 'python2-pyclamav: Virus Scan' 'python2-pydns: dialback' 'python2-spf: spfcheck and whitelist_spf' 'spamassassin: Spam Detection' ) build() { cd "${srcdir}/gordonmessmer-${_pkgname}-"* python2 setup.py build } package() { depends+=('courier-mta') cd "${srcdir}/gordonmessmer-${_pkgname}-"* python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 find "${pkgdir}" -type f -exec sed -i ' 1 s,^#!/usr/bin/python$,\02,' {} \; rm "${pkgdir}/usr/lib/python2"*"/site-packages/${_pkgname//-/_}-${pkgver}-py2"*".egg-info" }