diff options
Diffstat (limited to 'net-nntp/sabnzbd')
-rw-r--r-- | net-nntp/sabnzbd/Manifest | 3 | ||||
-rw-r--r-- | net-nntp/sabnzbd/files/patches/0001-use-system-configobj.patch | 28 | ||||
-rw-r--r-- | net-nntp/sabnzbd/files/patches/0002-use-system-feedparser.patch | 34 | ||||
-rw-r--r-- | net-nntp/sabnzbd/files/patches/0003-cfg-disable-NtfOSD-by-default.patch | 25 | ||||
-rw-r--r-- | net-nntp/sabnzbd/files/sabnzbd.ini | 14 | ||||
-rw-r--r-- | net-nntp/sabnzbd/files/sabnzbd.initd | 71 | ||||
-rw-r--r-- | net-nntp/sabnzbd/sabnzbd-2.3.9-r1.ebuild | 148 | ||||
-rw-r--r-- | net-nntp/sabnzbd/sabnzbd-3.0.0_rc1.ebuild | 121 | ||||
-rw-r--r-- | net-nntp/sabnzbd/sabnzbd-3.0.0_rc2.ebuild | 121 |
9 files changed, 0 insertions, 565 deletions
diff --git a/net-nntp/sabnzbd/Manifest b/net-nntp/sabnzbd/Manifest index ef487847a5ac..3ae60cbba5b1 100644 --- a/net-nntp/sabnzbd/Manifest +++ b/net-nntp/sabnzbd/Manifest @@ -1,4 +1 @@ -DIST SABnzbd-2.3.9-src.tar.gz 2738773 BLAKE2B fbb765732c0aab6a47a4d4827d21b1b029c6d40c1c6c335692964210dc4c389e94cd1cdca45bfb3fb8c2fa9adc84f33df0fe3d23a0e4f9143a095eec042a5cf0 SHA512 10a39db9ad7f6d441166da97194b7a281aacd1900f7687bca72c6c2b555114bc2bbdaaba51cb9fcec57aa1b782f20609a07528484ad911ffd9f9eabb54a324fa DIST SABnzbd-3.0.0-src.tar.gz 2673275 BLAKE2B 418ffd55c395c9d31e80f087c5e8c47e30bd86dbd8783afc173c9c54c6259b0d4607f5377ff3d83673f8e8ba24f46d5ad923a933a415097a7e48739f01039b45 SHA512 70441d76ad2e6cba33b033a85a29815fc50e9c714a275120bc7010e5e0cfb885f7b3d42f497c4ce46123c9bce2d33f778865d9a17878f6fe5811849faa6fe215 -DIST SABnzbd-3.0.0RC1-src.tar.gz 2762495 BLAKE2B 5b623e8cc141426459f3d62c3652df41559946a0fd691163428e7b10dfda5518e9701b1a250ed0a7cda6bfda705869ee6a038184ba8f86cfea70d9ea2d09d613 SHA512 00205b1cb4a74455fc48b0ce0579e6849d08b1cedb28ab01f53da8f37bd75268ced201c9e0510ffdf7b51eee6e666e73bec01f537e1ecbdb7f3f6115422b3074 -DIST SABnzbd-3.0.0RC2-src.tar.gz 2673573 BLAKE2B be45d4dae2d51b2f9ae6e9693a0c61482892b2e9c7fdf09b727af3efaeb26d385cef469c9ab1a13b8456794de7d5c8d9e9252b551eeda190943df68eed3ccafc SHA512 d556beb84a6bb9c20a29d17fab1caee092f7d00688301c22d4286cdcc76dd34d36c7d9453367aa3def3a2833f22f7b85c573558f2806877c8c2606d44824eb5c diff --git a/net-nntp/sabnzbd/files/patches/0001-use-system-configobj.patch b/net-nntp/sabnzbd/files/patches/0001-use-system-configobj.patch deleted file mode 100644 index 0f89dcd13414..000000000000 --- a/net-nntp/sabnzbd/files/patches/0001-use-system-configobj.patch +++ /dev/null @@ -1,28 +0,0 @@ -From db9a217dd5a02b5be72d47b7618f877f39cb31bc Mon Sep 17 00:00:00 2001 -From: Justin Bronder <jsbronder@gmail.com> -Date: Mon, 13 Feb 2017 18:20:39 -0500 -Subject: [PATCH 1/3] use system configobj - ---- - sabnzbd/config.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/sabnzbd/config.py b/sabnzbd/config.py -index 2f58ffd..04bfaab 100644 ---- a/sabnzbd/config.py -+++ b/sabnzbd/config.py -@@ -30,9 +30,10 @@ from hashlib import md5 - from urlparse import urlparse - import sabnzbd.misc - from sabnzbd.constants import CONFIG_VERSION, NORMAL_PRIORITY, DEFAULT_PRIORITY, MAX_WIN_DFOLDER --from sabnzbd.utils import configobj - from sabnzbd.decorators import synchronized - -+import configobj -+ - CONFIG_LOCK = threading.Lock() - SAVE_CONFIG_LOCK = threading.Lock() - --- -2.13.0 - diff --git a/net-nntp/sabnzbd/files/patches/0002-use-system-feedparser.patch b/net-nntp/sabnzbd/files/patches/0002-use-system-feedparser.patch deleted file mode 100644 index 68e39a975e7e..000000000000 --- a/net-nntp/sabnzbd/files/patches/0002-use-system-feedparser.patch +++ /dev/null @@ -1,34 +0,0 @@ -From b8540c4c71e917623290f3ca8d4091228fab8903 Mon Sep 17 00:00:00 2001 -From: Justin Bronder <jsbronder@gmail.com> -Date: Mon, 13 Feb 2017 18:21:28 -0500 -Subject: [PATCH 2/3] use system feedparser - ---- - sabnzbd/rss.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/sabnzbd/rss.py b/sabnzbd/rss.py -index 0315fca..18ac828 100644 ---- a/sabnzbd/rss.py -+++ b/sabnzbd/rss.py -@@ -25,6 +25,8 @@ import time - import datetime - import threading - -+import feedparser -+ - import sabnzbd - from sabnzbd.constants import RSS_FILE_NAME, DEFAULT_PRIORITY, NORMAL_PRIORITY, DUP_PRIORITY - from sabnzbd.decorators import synchronized -@@ -35,8 +37,6 @@ from sabnzbd.misc import cat_convert, wildcard_to_re, cat_to_opts, \ - import sabnzbd.emailer as emailer - from sabnzbd.encoding import unicoder, xml_name - --import sabnzbd.utils.feedparser as feedparser -- - __RSS = None # Global pointer to RSS-scanner instance - - --- -2.13.0 - diff --git a/net-nntp/sabnzbd/files/patches/0003-cfg-disable-NtfOSD-by-default.patch b/net-nntp/sabnzbd/files/patches/0003-cfg-disable-NtfOSD-by-default.patch deleted file mode 100644 index 064d523a1e1e..000000000000 --- a/net-nntp/sabnzbd/files/patches/0003-cfg-disable-NtfOSD-by-default.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 459111cb4f6937d58de480cf06743474f5c1dd3d Mon Sep 17 00:00:00 2001 -From: Justin Bronder <jsbronder@gmail.com> -Date: Sat, 5 Aug 2017 17:38:03 -0400 -Subject: [PATCH 3/3] cfg: disable NtfOSD by default - ---- - sabnzbd/cfg.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sabnzbd/cfg.py b/sabnzbd/cfg.py -index d8867db..59a341c 100644 ---- a/sabnzbd/cfg.py -+++ b/sabnzbd/cfg.py -@@ -322,7 +322,7 @@ acenter_prio_queue_done = OptionBool('acenter', 'acenter_prio_queue_done', True) - acenter_prio_other = OptionBool('acenter', 'acenter_prio_other', False) - - # [ntfosd] --ntfosd_enable = OptionBool('ntfosd', 'ntfosd_enable', not sabnzbd.WIN32 and not sabnzbd.DARWIN) -+ntfosd_enable = OptionBool('ntfosd', 'ntfosd_enable', False) - ntfosd_cats = OptionList('ntfosd', 'ntfosd_cats', ['*']) - ntfosd_prio_startup = OptionBool('ntfosd', 'ntfosd_prio_startup', True) - ntfosd_prio_download = OptionBool('ntfosd', 'ntfosd_prio_download', False) --- -2.13.0 - diff --git a/net-nntp/sabnzbd/files/sabnzbd.ini b/net-nntp/sabnzbd/files/sabnzbd.ini deleted file mode 100644 index c5ff04854e15..000000000000 --- a/net-nntp/sabnzbd/files/sabnzbd.ini +++ /dev/null @@ -1,14 +0,0 @@ -__version__ = 19 -[misc] -log_dir = /var/log/sabnzbd -admin_dir = /var/lib/sabnzbd/admin -cache_dir = /var/lib/sabnzbd/cache -complete_dir = /var/lib/sabnzbd/complete -download_dir = /var/lib/sabnzbd/download -dirscan_dir = /var/lib/sabnzbd/dirscan -nzb_backup_dir = /var/lib/sabnzbd/backup -auto_browser = 0 -host = :: -port = 8080 -[growl] -growl_enable = 0 diff --git a/net-nntp/sabnzbd/files/sabnzbd.initd b/net-nntp/sabnzbd/files/sabnzbd.initd deleted file mode 100644 index b3dca9797562..000000000000 --- a/net-nntp/sabnzbd/files/sabnzbd.initd +++ /dev/null @@ -1,71 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -PIDFILE="/run/sabnzbd/sabnzbd.pid" - -depend() { - need net -} - -get_var() { - grep -P -o -m 1 "(?<=^${1} = ).*" "${SABNZBD_CONFIGFILE}" || echo 0 -} - -start() { - ebegin "Starting SABnzbd" - - checkpath -q -d -o ${SABNZBD_USER}:${SABNZBD_GROUP} -m 0770 "$(dirname "${PIDFILE}")" - - start-stop-daemon \ - --quiet \ - --start \ - --user ${SABNZBD_USER} \ - --group ${SABNZBD_GROUP} \ - --pidfile "${PIDFILE}" \ - --wait 1000 \ - --exec /usr/share/sabnzbd/SABnzbd.py \ - -- \ - --config-file "${SABNZBD_CONFIGFILE}" \ - --logging "${SABNZBD_LOGGING}" \ - --daemon \ - --pidfile "${PIDFILE}" - - eend $? -} - -stop() { - local protocol="http" - local host="$(get_var "host")" - local port="$(get_var "port")" - - if [ $(get_var "enable_https") -eq 1 ]; then - protocol="https" - port="$(get_var "https_port")" - fi - - case "${host}" in - *:*) host="[${host}]" ;; - esac - - local url="${protocol}://${host}:${port}/sabnzbd/api?mode=shutdown" - - if [ $(get_var "disable_api_key") -eq 0 ]; then - url="${url}&apikey=$(get_var "api_key")" - fi - - local signals="TERM/1/KILL/1" - - ebegin "Stopping SABnzbd" - - if [ "$(wget -o /dev/null -t 1 -O - -T 10 "${url}")" = "ok" ]; then - signals="NULL/5/${signals}" - fi - - start-stop-daemon \ - --stop \ - --pidfile "${PIDFILE}" \ - --retry "${signals}" - - eend $? -} diff --git a/net-nntp/sabnzbd/sabnzbd-2.3.9-r1.ebuild b/net-nntp/sabnzbd/sabnzbd-2.3.9-r1.ebuild deleted file mode 100644 index 725ecf31daf0..000000000000 --- a/net-nntp/sabnzbd/sabnzbd-2.3.9-r1.ebuild +++ /dev/null @@ -1,148 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -# Require python-2 with sqlite USE flag -PYTHON_COMPAT=( python2_7 ) -PYTHON_REQ_USE="sqlite" - -inherit python-single-r1 user systemd - -MY_P="${P/sab/SAB}" - -DESCRIPTION="Binary newsgrabber with web-interface" -HOMEPAGE="https://sabnzbd.org/" -SRC_URI="https://github.com/sabnzbd/sabnzbd/releases/download/${PV}/${MY_P}-src.tar.gz" - -# Sabnzbd is GPL-2 but bundles software with the following licenses. -LICENSE="GPL-2 BSD LGPL-2 MIT BSD-1" -SLOT="0" -KEYWORDS="~amd64" -IUSE="+7za +rar unzip" - -# Sabnzbd is installed to /usr/share/ as upstream makes it clear they should not -# be in python's sitedir. See: http://wiki.sabnzbd.org/unix-packaging - -# TODO: still bundled but not in portage: -# kronos, rsslib, ssmtplib, listquote, json-py, msgfmt, happyeyeballs -# pynewsleecher -# -# dev-python/rarfile is bundled as of 2.0.1 because sabnzbd is modifying it -# https://github.com/sabnzbd/sabnzbd/commit/de6d642b0dc6eaed63199a99d9a1a8b2e3d0018b -# -# Also note that cherrypy is still bundled. It's near impossible to find -# out where the bundled and heavily patched version came from (pulled from -# cherrypy subversion, patched somewhere, then imported to sabnzbd and patched -# further. Upstream is planning on making this easier with 0.8.0. -# https://github.com/sabnzbd/sabnzbd/issues/47 - -RDEPEND=" - ${PYTHON_DEPS} - >=app-arch/par2cmdline-0.4 - $(python_gen_cond_dep ' - >=dev-python/cheetah-2.0.1[${PYTHON_MULTI_USEDEP}] - dev-python/configobj[${PYTHON_MULTI_USEDEP}] - dev-python/cryptography[${PYTHON_MULTI_USEDEP}] - dev-python/feedparser[${PYTHON_MULTI_USEDEP}] - dev-python/gntp[${PYTHON_MULTI_USEDEP}] - dev-python/pythonutils[${PYTHON_MULTI_USEDEP}] - >=dev-python/sabyenc-3.3.1[${PYTHON_MULTI_USEDEP}] - ') - net-misc/wget - 7za? ( app-arch/p7zip ) - rar? ( || ( app-arch/unrar app-arch/rar ) ) - unzip? ( >=app-arch/unzip-5.5.2 ) -" -DEPEND="${PYTHON_DEPS}" -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - HOMEDIR="/var/lib/${PN}" - python-single-r1_pkg_setup - - # Create sabnzbd group - enewgroup "${PN}" - # Create sabnzbd user, put in sabnzbd group - enewuser "${PN}" -1 -1 "${HOMEDIR}" "${PN}" -} - -src_prepare() { - eapply "${FILESDIR}"/patches - - # remove bundled modules - rm -r sabnzbd/utils/{feedparser,configobj}.py || die - rm -r gntp || die - rm licenses/License-{feedparser,configobj,gntp}.txt || die - - eapply_user -} - -src_install() { - local d - - for d in cherrypy email icons interfaces locale po sabnzbd tools util; do - insinto "/usr/share/${PN}/${d}" - doins -r ${d}/* - done - - exeinto "/usr/share/${PN}" - doexe SABnzbd.py - - python_fix_shebang "${ED%/}/usr/share/${PN}" - python_optimize "${ED%/}/usr/share/${PN}" - - newinitd "${FILESDIR}/${PN}.initd" "${PN}" - newconfd "${FILESDIR}/${PN}.confd" "${PN}" - - diropts -o "${PN}" -g "${PN}" - dodir "/etc/${PN}" - dodir "/var/log/${PN}" - - insinto "/etc/${PN}" - insopts -m 0600 -o "${PN}" -g "${PN}" - doins "${FILESDIR}/${PN}.ini" - - dodoc {ABOUT,ISSUES,README}.txt licenses/* - - systemd_newunit "${FILESDIR}"/sabnzbd_at.service 'sabnzbd@.service' -} - -pkg_postinst() { - einfo "Default directory: ${HOMEDIR}" - einfo - einfo "To add a user to the sabnzbd group so it can edit SABnzbd+ files, run:" - einfo - einfo " gpasswd -a <user> sabnzbd" - einfo - einfo "By default, SABnzbd+ will listen on TCP port 8080." - einfo - einfo "As Growl is not the default notification system on Gentoo, we disable it." - - local replacing - local major - local minor - for replacing in ${REPLACING_VERSIONS}; do - major=$(get_major_version ${replacing}) - minor=$(get_version_component_range 2 ${replacing}) - - if [ "${major}" == "1" ]; then - ewarn - ewarn "Upgrading to ${PN}-2.x.y converts schedule items to a format" - ewarn "that is not compatible with earlier ${PN}-1.x.y releases." - ewarn - break - elif [ "${major}" == "2" ] && [ ${minor} -lt 2 ]; then - ewarn - ewarn "Due to changes in this release, the queue will be converted when ${PN}" - ewarn "is started for the first time. Job order, settings and data will be" - ewarn "preserved, but all jobs will be unpaused and URLs that did not finish" - ewarn "fetching before the upgrade will be lost!" - ewarn - break - fi - - done -} diff --git a/net-nntp/sabnzbd/sabnzbd-3.0.0_rc1.ebuild b/net-nntp/sabnzbd/sabnzbd-3.0.0_rc1.ebuild deleted file mode 100644 index afa365fd3af6..000000000000 --- a/net-nntp/sabnzbd/sabnzbd-3.0.0_rc1.ebuild +++ /dev/null @@ -1,121 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -# Require python-2 with sqlite USE flag -PYTHON_COMPAT=( python3_{6..8} ) -PYTHON_REQ_USE="sqlite" - -inherit python-single-r1 systemd - -MY_PV="${PV/_rc/RC}" -MY_PV="${MY_PV//_pre*}" - -MY_P="${PN/sab/SAB}-${MY_PV}" - -DESCRIPTION="Binary newsgrabber with web-interface" -HOMEPAGE="https://sabnzbd.org/" -SRC_URI="https://github.com/sabnzbd/sabnzbd/releases/download/${MY_PV}/${MY_P}-src.tar.gz" - -# Sabnzbd is GPL-2 but bundles software with the following licenses. -LICENSE="GPL-2 BSD LGPL-2 MIT BSD-1" -SLOT="0" -KEYWORDS="~amd64" -IUSE="+7za +rar unzip" - -# Sabnzbd is installed to /usr/share/ as upstream makes it clear they should not -# be in python's sitedir. See: https://sabnzbd.org/wiki/advanced/unix-packaging - -COMMON_DEPS=" - acct-user/sabnzbd - acct-group/sabnzbd - ${PYTHON_DEPS} - $(python_gen_cond_dep ' - dev-python/chardet[${PYTHON_MULTI_USEDEP}] - dev-python/cheetah3[${PYTHON_MULTI_USEDEP}] - dev-python/cherrypy[${PYTHON_MULTI_USEDEP}] - dev-python/configobj[${PYTHON_MULTI_USEDEP}] - dev-python/cryptography[${PYTHON_MULTI_USEDEP}] - dev-python/feedparser[${PYTHON_MULTI_USEDEP}] - dev-python/notify2[${PYTHON_MULTI_USEDEP}] - dev-python/portend[${PYTHON_MULTI_USEDEP}] - >=dev-python/sabyenc-3.3.1[${PYTHON_MULTI_USEDEP}] - ') -" - -DEPEND="${COMMON_DEPS}" - -RDEPEND=" - ${COMMON_DEPS} - >=app-arch/par2cmdline-0.4 - net-misc/wget - 7za? ( app-arch/p7zip ) - rar? ( || ( app-arch/unrar app-arch/rar ) ) - unzip? ( >=app-arch/unzip-5.5.2 ) -" - -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - MY_HOMEDIR="/var/lib/${PN}" - python-single-r1_pkg_setup -} - -src_install() { - local d - - for d in email icons interfaces locale po sabnzbd scripts tools; do - insinto "/usr/share/${PN}/${d}" - doins -r ${d}/* - done - - exeinto "/usr/share/${PN}" - doexe SABnzbd.py - - python_fix_shebang "${ED}/usr/share/${PN}" - python_optimize "${ED}/usr/share/${PN}" - - newinitd "${FILESDIR}/${PN}-r1.initd" "${PN}" - newconfd "${FILESDIR}/${PN}.confd" "${PN}" - - diropts -o "${PN}" -g "${PN}" - dodir "/etc/${PN}" - keepdir "/var/log/${PN}" - - insinto "/etc/${PN}" - insopts -m 0600 -o "${PN}" -g "${PN}" - newins "${FILESDIR}"/${PN}-r1.ini ${PN}.ini - - dodoc {ABOUT,ISSUES}.txt README.mkd licenses/* - - systemd_newunit "${FILESDIR}"/sabnzbd_at.service 'sabnzbd@.service' -} - -pkg_postinst() { - if [[ -z "${REPLACING_VERSIONS}" ]]; then - # This is a new installation - einfo "Default directory: ${MY_HOMEDIR}" - einfo - einfo "To add a user to the sabnzbd group so it can edit SABnzbd+ files, run:" - einfo - einfo " usermod -a -G sabnzbd <user>" - einfo - einfo "By default, SABnzbd will listen on TCP port 8080." - else - local v - for v in ${REPLACING_VERSIONS}; do - if ver_test "${v}" -lt 3; then - ewarn - ewarn "Due to changes in this release, the queue will be converted when ${PN}" - ewarn "is started for the first time. Job order, settings and data will be" - ewarn "preserved, but all jobs will be unpaused and URLs that did not finish" - ewarn "fetching before the upgrade will be lost!" - ewarn - break - fi - done - fi -} diff --git a/net-nntp/sabnzbd/sabnzbd-3.0.0_rc2.ebuild b/net-nntp/sabnzbd/sabnzbd-3.0.0_rc2.ebuild deleted file mode 100644 index afa365fd3af6..000000000000 --- a/net-nntp/sabnzbd/sabnzbd-3.0.0_rc2.ebuild +++ /dev/null @@ -1,121 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -# Require python-2 with sqlite USE flag -PYTHON_COMPAT=( python3_{6..8} ) -PYTHON_REQ_USE="sqlite" - -inherit python-single-r1 systemd - -MY_PV="${PV/_rc/RC}" -MY_PV="${MY_PV//_pre*}" - -MY_P="${PN/sab/SAB}-${MY_PV}" - -DESCRIPTION="Binary newsgrabber with web-interface" -HOMEPAGE="https://sabnzbd.org/" -SRC_URI="https://github.com/sabnzbd/sabnzbd/releases/download/${MY_PV}/${MY_P}-src.tar.gz" - -# Sabnzbd is GPL-2 but bundles software with the following licenses. -LICENSE="GPL-2 BSD LGPL-2 MIT BSD-1" -SLOT="0" -KEYWORDS="~amd64" -IUSE="+7za +rar unzip" - -# Sabnzbd is installed to /usr/share/ as upstream makes it clear they should not -# be in python's sitedir. See: https://sabnzbd.org/wiki/advanced/unix-packaging - -COMMON_DEPS=" - acct-user/sabnzbd - acct-group/sabnzbd - ${PYTHON_DEPS} - $(python_gen_cond_dep ' - dev-python/chardet[${PYTHON_MULTI_USEDEP}] - dev-python/cheetah3[${PYTHON_MULTI_USEDEP}] - dev-python/cherrypy[${PYTHON_MULTI_USEDEP}] - dev-python/configobj[${PYTHON_MULTI_USEDEP}] - dev-python/cryptography[${PYTHON_MULTI_USEDEP}] - dev-python/feedparser[${PYTHON_MULTI_USEDEP}] - dev-python/notify2[${PYTHON_MULTI_USEDEP}] - dev-python/portend[${PYTHON_MULTI_USEDEP}] - >=dev-python/sabyenc-3.3.1[${PYTHON_MULTI_USEDEP}] - ') -" - -DEPEND="${COMMON_DEPS}" - -RDEPEND=" - ${COMMON_DEPS} - >=app-arch/par2cmdline-0.4 - net-misc/wget - 7za? ( app-arch/p7zip ) - rar? ( || ( app-arch/unrar app-arch/rar ) ) - unzip? ( >=app-arch/unzip-5.5.2 ) -" - -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - MY_HOMEDIR="/var/lib/${PN}" - python-single-r1_pkg_setup -} - -src_install() { - local d - - for d in email icons interfaces locale po sabnzbd scripts tools; do - insinto "/usr/share/${PN}/${d}" - doins -r ${d}/* - done - - exeinto "/usr/share/${PN}" - doexe SABnzbd.py - - python_fix_shebang "${ED}/usr/share/${PN}" - python_optimize "${ED}/usr/share/${PN}" - - newinitd "${FILESDIR}/${PN}-r1.initd" "${PN}" - newconfd "${FILESDIR}/${PN}.confd" "${PN}" - - diropts -o "${PN}" -g "${PN}" - dodir "/etc/${PN}" - keepdir "/var/log/${PN}" - - insinto "/etc/${PN}" - insopts -m 0600 -o "${PN}" -g "${PN}" - newins "${FILESDIR}"/${PN}-r1.ini ${PN}.ini - - dodoc {ABOUT,ISSUES}.txt README.mkd licenses/* - - systemd_newunit "${FILESDIR}"/sabnzbd_at.service 'sabnzbd@.service' -} - -pkg_postinst() { - if [[ -z "${REPLACING_VERSIONS}" ]]; then - # This is a new installation - einfo "Default directory: ${MY_HOMEDIR}" - einfo - einfo "To add a user to the sabnzbd group so it can edit SABnzbd+ files, run:" - einfo - einfo " usermod -a -G sabnzbd <user>" - einfo - einfo "By default, SABnzbd will listen on TCP port 8080." - else - local v - for v in ${REPLACING_VERSIONS}; do - if ver_test "${v}" -lt 3; then - ewarn - ewarn "Due to changes in this release, the queue will be converted when ${PN}" - ewarn "is started for the first time. Job order, settings and data will be" - ewarn "preserved, but all jobs will be unpaused and URLs that did not finish" - ewarn "fetching before the upgrade will be lost!" - ewarn - break - fi - done - fi -} |