blob: bc7d710b74630d4ebbedf82c7bcd10de13c1b9d7 (
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
42
43
44
45
46
47
48
49
50
51
52
|
# Maintainer: Luke Shumaker <lukeshu@parabola.nu>
# 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
_pkgver=${pkgver%.*}
pkgrel=4
pkgdesc="Python Postfix Sender Policy Framework (SPF) filter daemon"
arch=('any')
url="https://launchpad.net/${pkgname}/"
license=('GPL')
makedepends=('python-setuptools')
depends=('postfix' 'python-pyspf' 'python')
optdepends=('python-authres: RFC 7001 Authentication-Results header support')
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() {
depends+=( $(_version_constraint 'python') )
cd "$srcdir"/$pkgname-$pkgver
python setup.py install --root="$pkgdir/" --optimize=1 || return 1
install -m644 policyd-spf.conf.commented "$pkgdir"/etc/python-policyd-spf || return 1
}
|