summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Kępień <github@kempniu.pl>2016-11-18 14:25:23 +0100
committerJustin Bronder <jsbronder@gentoo.org>2016-11-19 11:33:12 -0500
commit11e0521e65fb220bdbe1574fa8348433377022fc (patch)
treea957965be4093a30aec99803e7021910a8d6473c /net-nntp/sabnzbd
parentMigrate to EAPI 6 (diff)
downloadgentoo-11e0521e65fb220bdbe1574fa8348433377022fc.tar.gz
gentoo-11e0521e65fb220bdbe1574fa8348433377022fc.tar.bz2
gentoo-11e0521e65fb220bdbe1574fa8348433377022fc.zip
Migrate to python-single-r1
Diffstat (limited to 'net-nntp/sabnzbd')
-rw-r--r--net-nntp/sabnzbd/sabnzbd-1.1.1.ebuild20
1 files changed, 9 insertions, 11 deletions
diff --git a/net-nntp/sabnzbd/sabnzbd-1.1.1.ebuild b/net-nntp/sabnzbd/sabnzbd-1.1.1.ebuild
index 726733fe1f36..120ac64ced80 100644
--- a/net-nntp/sabnzbd/sabnzbd-1.1.1.ebuild
+++ b/net-nntp/sabnzbd/sabnzbd-1.1.1.ebuild
@@ -5,10 +5,10 @@
EAPI="6"
# Require python-2 with sqlite USE flag
-PYTHON_DEPEND="2:2.7"
-PYTHON_USE_WITH="sqlite"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
-inherit python user systemd versionator
+inherit python-single-r1 user systemd versionator
MY_P="${P/sab/SAB}"
@@ -36,6 +36,7 @@ IUSE="+rar +ssl unzip +yenc"
# https://github.com/sabnzbd/sabnzbd/issues/47
RDEPEND="
+ ${PYTHON_DEPS}
>=app-arch/par2cmdline-0.4
>=dev-python/cheetah-2.0.1
dev-python/configobj
@@ -49,13 +50,14 @@ RDEPEND="
unzip? ( >=app-arch/unzip-5.5.2 )
yenc? ( dev-python/yenc )
"
+DEPEND="${PYTHON_DEPS}"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
S="${WORKDIR}/${MY_P}"
pkg_setup() {
HOMEDIR="/var/lib/${PN}"
- python_set_active_version 2
- python_pkg_setup
+ python-single-r1_pkg_setup
# Create sabnzbd group
enewgroup ${PN}
@@ -88,6 +90,8 @@ src_install() {
doins -r ${d}/*
done
+ python_optimize "${D}usr/share/${PN}"
+
newinitd "${FILESDIR}/${PN}.initd" "${PN}"
newconfd "${FILESDIR}/${PN}.confd" "${PN}"
@@ -105,8 +109,6 @@ src_install() {
}
pkg_postinst() {
- python_mod_optimize /usr/share/${PN}
-
einfo "Default directory: ${HOMEDIR}"
einfo ""
einfo "Run: gpasswd -a <user> sabnzbd"
@@ -127,7 +129,3 @@ pkg_postinst() {
fi
done
}
-
-pkg_postrm() {
- python_mod_cleanup /usr/share/${PN}
-}