Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-nntp/sabnzbd/
Date: Sun, 02 Aug 2020 22:32:35
Message-Id: 1596407547.72532535791a43d25a7f40b5cd16633e79a7724b.whissi@gentoo
1 commit: 72532535791a43d25a7f40b5cd16633e79a7724b
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 2 22:31:48 2020 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 2 22:32:27 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72532535
7
8 net-nntp/sabnzbd: bump to v3.0.0
9
10 Package-Manager: Portage-3.0.1, Repoman-2.3.23
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 net-nntp/sabnzbd/Manifest | 1 +
14 net-nntp/sabnzbd/sabnzbd-3.0.0.ebuild | 121 ++++++++++++++++++++++++++++++++++
15 2 files changed, 122 insertions(+)
16
17 diff --git a/net-nntp/sabnzbd/Manifest b/net-nntp/sabnzbd/Manifest
18 index 57137ee640f..ef487847a5a 100644
19 --- a/net-nntp/sabnzbd/Manifest
20 +++ b/net-nntp/sabnzbd/Manifest
21 @@ -1,3 +1,4 @@
22 DIST SABnzbd-2.3.9-src.tar.gz 2738773 BLAKE2B fbb765732c0aab6a47a4d4827d21b1b029c6d40c1c6c335692964210dc4c389e94cd1cdca45bfb3fb8c2fa9adc84f33df0fe3d23a0e4f9143a095eec042a5cf0 SHA512 10a39db9ad7f6d441166da97194b7a281aacd1900f7687bca72c6c2b555114bc2bbdaaba51cb9fcec57aa1b782f20609a07528484ad911ffd9f9eabb54a324fa
23 +DIST SABnzbd-3.0.0-src.tar.gz 2673275 BLAKE2B 418ffd55c395c9d31e80f087c5e8c47e30bd86dbd8783afc173c9c54c6259b0d4607f5377ff3d83673f8e8ba24f46d5ad923a933a415097a7e48739f01039b45 SHA512 70441d76ad2e6cba33b033a85a29815fc50e9c714a275120bc7010e5e0cfb885f7b3d42f497c4ce46123c9bce2d33f778865d9a17878f6fe5811849faa6fe215
24 DIST SABnzbd-3.0.0RC1-src.tar.gz 2762495 BLAKE2B 5b623e8cc141426459f3d62c3652df41559946a0fd691163428e7b10dfda5518e9701b1a250ed0a7cda6bfda705869ee6a038184ba8f86cfea70d9ea2d09d613 SHA512 00205b1cb4a74455fc48b0ce0579e6849d08b1cedb28ab01f53da8f37bd75268ced201c9e0510ffdf7b51eee6e666e73bec01f537e1ecbdb7f3f6115422b3074
25 DIST SABnzbd-3.0.0RC2-src.tar.gz 2673573 BLAKE2B be45d4dae2d51b2f9ae6e9693a0c61482892b2e9c7fdf09b727af3efaeb26d385cef469c9ab1a13b8456794de7d5c8d9e9252b551eeda190943df68eed3ccafc SHA512 d556beb84a6bb9c20a29d17fab1caee092f7d00688301c22d4286cdcc76dd34d36c7d9453367aa3def3a2833f22f7b85c573558f2806877c8c2606d44824eb5c
26
27 diff --git a/net-nntp/sabnzbd/sabnzbd-3.0.0.ebuild b/net-nntp/sabnzbd/sabnzbd-3.0.0.ebuild
28 new file mode 100644
29 index 00000000000..afa365fd3af
30 --- /dev/null
31 +++ b/net-nntp/sabnzbd/sabnzbd-3.0.0.ebuild
32 @@ -0,0 +1,121 @@
33 +# Copyright 1999-2020 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI="7"
37 +
38 +# Require python-2 with sqlite USE flag
39 +PYTHON_COMPAT=( python3_{6..8} )
40 +PYTHON_REQ_USE="sqlite"
41 +
42 +inherit python-single-r1 systemd
43 +
44 +MY_PV="${PV/_rc/RC}"
45 +MY_PV="${MY_PV//_pre*}"
46 +
47 +MY_P="${PN/sab/SAB}-${MY_PV}"
48 +
49 +DESCRIPTION="Binary newsgrabber with web-interface"
50 +HOMEPAGE="https://sabnzbd.org/"
51 +SRC_URI="https://github.com/sabnzbd/sabnzbd/releases/download/${MY_PV}/${MY_P}-src.tar.gz"
52 +
53 +# Sabnzbd is GPL-2 but bundles software with the following licenses.
54 +LICENSE="GPL-2 BSD LGPL-2 MIT BSD-1"
55 +SLOT="0"
56 +KEYWORDS="~amd64"
57 +IUSE="+7za +rar unzip"
58 +
59 +# Sabnzbd is installed to /usr/share/ as upstream makes it clear they should not
60 +# be in python's sitedir. See: https://sabnzbd.org/wiki/advanced/unix-packaging
61 +
62 +COMMON_DEPS="
63 + acct-user/sabnzbd
64 + acct-group/sabnzbd
65 + ${PYTHON_DEPS}
66 + $(python_gen_cond_dep '
67 + dev-python/chardet[${PYTHON_MULTI_USEDEP}]
68 + dev-python/cheetah3[${PYTHON_MULTI_USEDEP}]
69 + dev-python/cherrypy[${PYTHON_MULTI_USEDEP}]
70 + dev-python/configobj[${PYTHON_MULTI_USEDEP}]
71 + dev-python/cryptography[${PYTHON_MULTI_USEDEP}]
72 + dev-python/feedparser[${PYTHON_MULTI_USEDEP}]
73 + dev-python/notify2[${PYTHON_MULTI_USEDEP}]
74 + dev-python/portend[${PYTHON_MULTI_USEDEP}]
75 + >=dev-python/sabyenc-3.3.1[${PYTHON_MULTI_USEDEP}]
76 + ')
77 +"
78 +
79 +DEPEND="${COMMON_DEPS}"
80 +
81 +RDEPEND="
82 + ${COMMON_DEPS}
83 + >=app-arch/par2cmdline-0.4
84 + net-misc/wget
85 + 7za? ( app-arch/p7zip )
86 + rar? ( || ( app-arch/unrar app-arch/rar ) )
87 + unzip? ( >=app-arch/unzip-5.5.2 )
88 +"
89 +
90 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
91 +
92 +S="${WORKDIR}/${MY_P}"
93 +
94 +pkg_setup() {
95 + MY_HOMEDIR="/var/lib/${PN}"
96 + python-single-r1_pkg_setup
97 +}
98 +
99 +src_install() {
100 + local d
101 +
102 + for d in email icons interfaces locale po sabnzbd scripts tools; do
103 + insinto "/usr/share/${PN}/${d}"
104 + doins -r ${d}/*
105 + done
106 +
107 + exeinto "/usr/share/${PN}"
108 + doexe SABnzbd.py
109 +
110 + python_fix_shebang "${ED}/usr/share/${PN}"
111 + python_optimize "${ED}/usr/share/${PN}"
112 +
113 + newinitd "${FILESDIR}/${PN}-r1.initd" "${PN}"
114 + newconfd "${FILESDIR}/${PN}.confd" "${PN}"
115 +
116 + diropts -o "${PN}" -g "${PN}"
117 + dodir "/etc/${PN}"
118 + keepdir "/var/log/${PN}"
119 +
120 + insinto "/etc/${PN}"
121 + insopts -m 0600 -o "${PN}" -g "${PN}"
122 + newins "${FILESDIR}"/${PN}-r1.ini ${PN}.ini
123 +
124 + dodoc {ABOUT,ISSUES}.txt README.mkd licenses/*
125 +
126 + systemd_newunit "${FILESDIR}"/sabnzbd_at.service 'sabnzbd@.service'
127 +}
128 +
129 +pkg_postinst() {
130 + if [[ -z "${REPLACING_VERSIONS}" ]]; then
131 + # This is a new installation
132 + einfo "Default directory: ${MY_HOMEDIR}"
133 + einfo
134 + einfo "To add a user to the sabnzbd group so it can edit SABnzbd+ files, run:"
135 + einfo
136 + einfo " usermod -a -G sabnzbd <user>"
137 + einfo
138 + einfo "By default, SABnzbd will listen on TCP port 8080."
139 + else
140 + local v
141 + for v in ${REPLACING_VERSIONS}; do
142 + if ver_test "${v}" -lt 3; then
143 + ewarn
144 + ewarn "Due to changes in this release, the queue will be converted when ${PN}"
145 + ewarn "is started for the first time. Job order, settings and data will be"
146 + ewarn "preserved, but all jobs will be unpaused and URLs that did not finish"
147 + ewarn "fetching before the upgrade will be lost!"
148 + ewarn
149 + break
150 + fi
151 + done
152 + fi
153 +}