summaryrefslogtreecommitdiff
path: root/pcr/python2-pyspf/PKGBUILD
blob: 6ee566f51a941aa6cbbe17876c189c7b9cf7b10d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Maintainer: Rich Li <rich@dranek.com>
# Contributor: Filip S. Adamsen <fsa [at] fsadev [dot] com>
# Contributor: Samed Beyribey <ras0ir AT eventualis DOT org>
pkgname=python2-pyspf
_pkgname=pyspf
pkgver=2.0.9
pkgrel=1
pkgdesc="Python 2 implementation of Sender Policy Framework (SPF)"
arch=('any')
url="http://bmsi.com/python/milter.html"
license=('Python')
depends=('python2-pydns' 'python2' 'python2-ipaddr')
checkdepends=('python2-yaml' 'python2-authres')
optdepends=('python2-authres: support Authentication-Results headers')
#conflicts=('python-pyspf')
options=(!emptydirs)
source=(https://pypi.python.org/packages/source/p/$_pkgname/$_pkgname-$pkgver.tar.gz)
md5sums=('055b36fd9469ea77713cf064727a9c18')
sha1sums=('a239e8e26a67320a022559f72f7748d3c0575000')
sha256sums=('e4828f785c935d5d24dcab1e8abe13b57de965219c8e821222e763a27fd423e0')

build() {
  cd "$srcdir/$_pkgname-$pkgver"
  python2 setup.py build
}

# While 2.0.8 passed tests, 2.0.9 fails six tests
#check() {
#  # Note that python2-authres, which is normally optional, is required for the tests to finish successfully
#  cd "$srcdir/$_pkgname-$pkgver/test"
#  # Use the SPF from this package, not the system-installed version
#  sed -i -e "s|import spf|sys.path.append('..')\nimport spf|" testspf.py
#  python2 testspf.py
#}

package() {
  cd "$srcdir/$_pkgname-$pkgver"
  python2 setup.py install --root="$pkgdir" --optimize=1
}

# vim:set ts=2 sw=2 et: