mail-filter/pypolicyd-spf: hard-code PN before a pkgmove.
authorMichael Orlitzky <mjo@gentoo.org>
Tue, 26 May 2020 01:11:10 +0000 (21:11 -0400)
committerMichael Orlitzky <mjo@gentoo.org>
Tue, 26 May 2020 13:31:16 +0000 (09:31 -0400)
This package was renamed to spf-engine. This commit hard-codes the
package name "pypolicyd-spf" in the existing stable ebuild so that it
survives the rename.

Bug: https://bugs.gentoo.org/724526
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
mail-filter/pypolicyd-spf/pypolicyd-spf-2.0.2-r1.ebuild

index aa46887f9be9a5ac606e03dc64ea880f7f7de9ed..da8cc8d6ff55e9475dad7d682f71ca9b2f88a261 100644 (file)
@@ -14,9 +14,12 @@ PYTHON_REQ_USE="ipv6"
 DISTUTILS_USE_SETUPTOOLS=no
 inherit distutils-r1
 
+OLD_PN="pypolicyd-spf"
+OLD_P="${OLD_PN}-${PV}"
+OLD_PF="${PN}-${PVR}"
 DESCRIPTION="Python-based policy daemon for Postfix SPF verification"
 HOMEPAGE="https://launchpad.net/pypolicyd-spf"
-SRC_URI="mirror://pypi/p/${PN}/${P}.tar.gz"
+SRC_URI="mirror://pypi/p/${OLD_PN}/${OLD_P}.tar.gz"
 
 LICENSE="Apache-2.0"
 SLOT="0"
@@ -28,13 +31,15 @@ DEPEND="dev-python/pyspf[${PYTHON_USEDEP}]"
 RDEPEND="${DEPEND}
        dev-python/authres[${PYTHON_USEDEP}]"
 
+S="${WORKDIR}/${OLD_P}"
+
 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}"
+       local newconf="/usr/share/doc/${OLD_PF}/${oldconf}"
 
        sed -i "1 s~ ${oldconf}~,\n#  ${newconf}~" policyd-spf.conf \
                || die 'failed to update commented config file path'