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