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