diff options
author | Michał Masłowski <mtjm@mtjm.eu> | 2011-08-31 16:17:19 +0200 |
---|---|---|
committer | Michał Masłowski <mtjm@mtjm.eu> | 2011-08-31 16:17:19 +0200 |
commit | 27e99b7b95e132aee25a4648683764d523525860 (patch) | |
tree | 5acef0101fc5db0b8d5db7f0e1dfa14cadf153f2 /~mtjm | |
parent | 4718f406cb2caa0278ac4bf11a29775f5a1eb0ed (diff) |
~mtjm/python2-pyspf-2.0.5-2 from AUR.
Diffstat (limited to '~mtjm')
-rw-r--r-- | ~mtjm/python2-pyspf/PKGBUILD | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/~mtjm/python2-pyspf/PKGBUILD b/~mtjm/python2-pyspf/PKGBUILD new file mode 100644 index 000000000..a32893066 --- /dev/null +++ b/~mtjm/python2-pyspf/PKGBUILD @@ -0,0 +1,35 @@ +# Parabola maintainer: Michał Masłowski <mtjm@mtjm.eu> +# From https://aur.archlinux.org/packages.php?ID=42274 +# Maintainer: Filip S. Adamsen <fsa [at] fsadev [dot] com> +# Contributor: Samed Beyribey <ras0ir AT eventualis DOT org> +pkgname=python2-pyspf +_pkgname=pyspf +pkgver=2.0.5 +pkgrel=2 +pkgdesc="Python2 implementation of the Sender Policy Framework (SPF) protocol" +arch=('any') +url="http://pypi.python.org/pypi/pyspf" +license=('PSF') +depends=('python2-pydns' 'python2') +checkdepends=('python2-yaml') +conflicts=('python-pyspf') +options=(!emptydirs) +source=(http://downloads.sourceforge.net/pymilter/$_pkgname-$pkgver.tar.gz) +md5sums=(7e3f53362e3ad52ec8a496445085a34f) + +build() { + cd "$srcdir/$_pkgname-$pkgver" + + python2 setup.py build || return 1 + python2 setup.py install --root=$pkgdir/ --optimize=1 || return 1 + + # See http://allanmcrae.com/2010/10/big-python-transition-in-arch-linux/ + sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ + -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ + $(find $pkgdir -name '*.py') || return 1 +} + +check() { + cd "$srcdir/$_pkgname-$pkgver/test" + PYTHONPATH="$srcdir/$_pkgname-$pkgver:$PYTHONPATH" python2 testspf.py +} |