mail-filter/pypolicyd-spf: new revision with python-3.{7,8} support.
authorMichael Orlitzky <mjo@gentoo.org>
Sun, 19 Apr 2020 16:43:16 +0000 (12:43 -0400)
committerMichael Orlitzky <mjo@gentoo.org>
Sun, 19 Apr 2020 20:33:01 +0000 (16:33 -0400)
Nothing new here except the EAPI and PYTHON_COMPAT.

Closes: https://bugs.gentoo.org/718324
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
mail-filter/pypolicyd-spf/pypolicyd-spf-2.0.2-r1.ebuild [new file with mode: 0644]

diff --git a/mail-filter/pypolicyd-spf/pypolicyd-spf-2.0.2-r1.ebuild b/mail-filter/pypolicyd-spf/pypolicyd-spf-2.0.2-r1.ebuild
new file mode 100644 (file)
index 0000000..bede125
--- /dev/null
@@ -0,0 +1,43 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_6 python3_7 python3_8 )
+
+# The built-in ipaddress module handles the parsing of IP addresses. If
+# python is built without ipv6 support, then ipaddress can't parse ipv6
+# addresses, and the daemon will crash if it sees an ipv6 SPF record. In
+# other words, it's completely broken.
+PYTHON_REQ_USE="ipv6"
+
+DISTUTILS_USE_SETUPTOOLS=no
+inherit distutils-r1
+
+DESCRIPTION="Python-based policy daemon for Postfix SPF verification"
+HOMEPAGE="https://launchpad.net/pypolicyd-spf"
+SRC_URI="mirror://pypi/p/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-python/pyspf[${PYTHON_USEDEP}]"
+
+RDEPEND="${DEPEND}
+       dev-python/authres[${PYTHON_USEDEP}]"
+
+DOCS=( CHANGES policyd-spf.conf.commented README README.per_user_whitelisting )
+
+python_prepare_all() {
+       # The "real" config file mentions the commented one, so we point
+       # users in the right direction.
+       local oldconf="policyd-spf.conf.commented"
+       local newconf="/usr/share/doc/${PF}/${oldconf}"
+
+       sed -i "1 s~ ${oldconf}~,\n#  ${newconf}~" policyd-spf.conf \
+               || die 'failed to update commented config file path'
+
+       distutils-r1_python_prepare_all
+}