From a4034dd00dc4d717a2b747eb2efd5586e62b0192 Mon Sep 17 00:00:00 2001 From: Michał Masłowski Date: Mon, 27 May 2013 16:06:05 +0200 Subject: Move Python libraries from ~mtjm to pcr. --- pcr/python2-pyspf/PKGBUILD | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 pcr/python2-pyspf/PKGBUILD (limited to 'pcr/python2-pyspf/PKGBUILD') 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 +# From https://aur.archlinux.org/packages.php?ID=42274 +# Maintainer: Filip S. Adamsen +# Contributor: Samed Beyribey +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 +} -- cgit v1.2.3