summaryrefslogtreecommitdiff
path: root/pcr/python2-pyspf/PKGBUILD
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@lavabit.com>2013-05-28 20:25:49 -0300
committerAndré Fabian Silva Delgado <emulatorman@lavabit.com>2013-05-28 20:25:49 -0300
commitbeb8b1041efbb1bce8e7c2e0aa734d3170eee21e (patch)
tree23323258a59896b3f78f3ed040414e722b07b599 /pcr/python2-pyspf/PKGBUILD
parent4ba9ed4027db9fcbf6dd137f8b97c97cdeacf227 (diff)
parent53057357cf767bb5e7999628620a916769671d27 (diff)
downloadabslibre-beb8b1041efbb1bce8e7c2e0aa734d3170eee21e.tar.gz
abslibre-beb8b1041efbb1bce8e7c2e0aa734d3170eee21e.tar.bz2
abslibre-beb8b1041efbb1bce8e7c2e0aa734d3170eee21e.zip
Merge branch 'master' of ssh://parabolagnulinux.org:1863/srv/git/abslibre
Diffstat (limited to 'pcr/python2-pyspf/PKGBUILD')
-rw-r--r--pcr/python2-pyspf/PKGBUILD35
1 files changed, 35 insertions, 0 deletions
diff --git a/pcr/python2-pyspf/PKGBUILD b/pcr/python2-pyspf/PKGBUILD
new file mode 100644
index 000000000..abb3bfa5f
--- /dev/null
+++ b/pcr/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.7
+pkgrel=1
+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=('df47e2c04054a89da8b46b7f67e704ae')
+
+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
+}