summaryrefslogtreecommitdiff
path: root/pcr/pypolicyd-spf
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2020-01-17 11:05:38 -0500
committerbill-auger <mr.j.spam.me@gmail.com>2020-01-17 11:05:38 -0500
commit18870cbf809fe6bcc60acdd729085b856c149159 (patch)
tree6aefd88629ed1e3d01c9d7890f85df0a8fffb3fc /pcr/pypolicyd-spf
parent970a49b6646ece1f12c8f7eff37ece814489a51b (diff)
downloadabslibre-18870cbf809fe6bcc60acdd729085b856c149159.tar.gz
abslibre-18870cbf809fe6bcc60acdd729085b856c149159.tar.bz2
abslibre-18870cbf809fe6bcc60acdd729085b856c149159.zip
[pypolicyd-spf]: rebuild against latest python
Diffstat (limited to 'pcr/pypolicyd-spf')
-rw-r--r--pcr/pypolicyd-spf/PKGBUILD54
1 files changed, 37 insertions, 17 deletions
diff --git a/pcr/pypolicyd-spf/PKGBUILD b/pcr/pypolicyd-spf/PKGBUILD
index 608643ebb..9c7209274 100644
--- a/pcr/pypolicyd-spf/PKGBUILD
+++ b/pcr/pypolicyd-spf/PKGBUILD
@@ -1,32 +1,52 @@
# Maintainer: Luke Shumaker <lukeshu@parabola.nu>
-# Maintainer (AUR:python-postfix-policyd-spf): Hao Zhang <theivorytower@gmail.com>
-# Maintainer (AUR:python2-postfix-policyd-spf): Filip S. Adamsen <fsa@fsadev.com>
+# Maintainer (AUR:python-postfix-policyd-spf): Hao Zhang theivorytower [at] gmail [dot] com>
+# Maintainer (AUR:python2-postfix-policyd-spf): Filip S. Adamsen <fsa [at] fsadev [dot] com>
# Contributor (AUR): Samed Beyribey <ras0ir@eventualis.org>
pkgname=pypolicyd-spf
pkgver=2.0.2
-pkgdesc="A Postfix policy engine for Sender Policy Framework (SPF) checking"
-url="https://launchpad.net/$pkgname/"
+_pkgver=${pkgver%.*}
+pkgrel=3
+pkgdesc="Python Postfix Sender Policy Framework (SPF) filter daemon"
+arch=('any')
+url="https://launchpad.net/${pkgname}/"
license=('GPL')
-source=(https://launchpad.net/$pkgname/${pkgver%.*}/$pkgver/+download/$pkgname-$pkgver.tar.gz{,.asc})
-md5sums=('cc50281cc13a8984de058ddc5ae8dcaf'
- 'SKIP')
-validpgpkeys=(E7729BFFBE85400FEEEE23B178D7DEFB9AD59AF1) # Donald Scott Kitterman
-pkgrel=2
-arch=('any')
makedepends=('python-setuptools')
-depends=('postfix' 'python-pyspf')
+depends=('postfix' 'python-pyspf' 'python')
optdepends=('python-authres: RFC 7001 Authentication-Results header support')
-replaces=('python-postfix-policyd-spf' 'python2-postfix-policyd-spf') # AUR names
-conflicts=('python-postfix-policyd-spf' 'python2-postfix-policyd-spf') # AUR names
-
+options=(!emptydirs)
backup=(etc/python-policyd-spf/policyd-spf.conf)
+source=(https://launchpad.net/$pkgname/${_pkgver}/$pkgver/+download/$pkgname-$pkgver.tar.gz{,.asc})
+md5sums=('cc50281cc13a8984de058ddc5ae8dcaf'
+ 'SKIP')
+validpgpkeys=('E7729BFFBE85400FEEEE23B178D7DEFB9AD59AF1') # Donald Scott Kitterman
+
+
+_version_constraint() # (dep_pkgname)
+{
+ local dep_pkgname=$1
+ local version=$(pacman -S --print-format='%v' ${dep_pkgname} | tail -n 1)
+ version=${version%-*}
+ local version_inc=${version%.*}.$(( ${version##*.} + 1 ))
+
+ echo -n "${dep_pkgname}>=${version}" "${dep_pkgname}<${version_inc}"
+}
+
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+
+ python setup.py build || return 1
+}
+
package() {
- cd "$srcdir/$pkgname-$pkgver"
+ depends+=( $(_version_constraint 'python') )
+
+ cd "$srcdir"/$pkgname-$pkgver
- python setup.py install --root="$pkgdir/" --optimize=1
- install -m644 policyd-spf.conf.commented "$pkgdir"/etc/python-policyd-spf
+ python setup.py install --root="$pkgdir/" --optimize=1 || return 1
+ install -m644 policyd-spf.conf.commented "$pkgdir"/etc/python-policyd-spf || return 1
}