1 |
commit: 15eee83b07dbdb1268389da7a5fbc8f2f0b1fc57 |
2 |
Author: Louis Sautier <sbraz <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 3 20:17:35 2020 +0000 |
4 |
Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 3 21:28:37 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15eee83b |
7 |
|
8 |
net-nntp/nzbget: migrate to acct-user, remove old compiler check |
9 |
|
10 |
Also drop unused eutils inherit and separate dependencies. |
11 |
|
12 |
Package-Manager: Portage-3.0.8, Repoman-3.0.1 |
13 |
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org> |
14 |
|
15 |
net-nntp/nzbget/nzbget-21.0-r1.ebuild | 112 ++++++++++++++++++++++++++++++++++ |
16 |
1 file changed, 112 insertions(+) |
17 |
|
18 |
diff --git a/net-nntp/nzbget/nzbget-21.0-r1.ebuild b/net-nntp/nzbget/nzbget-21.0-r1.ebuild |
19 |
new file mode 100644 |
20 |
index 00000000000..4642b73d48b |
21 |
--- /dev/null |
22 |
+++ b/net-nntp/nzbget/nzbget-21.0-r1.ebuild |
23 |
@@ -0,0 +1,112 @@ |
24 |
+# Copyright 1999-2020 Gentoo Authors |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI=7 |
28 |
+ |
29 |
+inherit autotools systemd |
30 |
+ |
31 |
+MY_PV=${PV/_pre/-r} |
32 |
+MY_P=${PN}-${PV/_pre/-testing-r} |
33 |
+ |
34 |
+DESCRIPTION="A command-line based binary newsgrabber supporting .nzb files" |
35 |
+HOMEPAGE="https://nzbget.net/" |
36 |
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/${MY_P}-src.tar.gz -> ${P}.tar.gz" |
37 |
+ |
38 |
+LICENSE="GPL-2+" |
39 |
+SLOT="0" |
40 |
+KEYWORDS="~amd64 ~arm ~ppc ~x86" |
41 |
+IUSE="debug gnutls ncurses +parcheck ssl test zlib" |
42 |
+RESTRICT="!test? ( test )" |
43 |
+ |
44 |
+DEPEND=" |
45 |
+ dev-libs/libxml2:= |
46 |
+ ncurses? ( sys-libs/ncurses:0= ) |
47 |
+ ssl? ( |
48 |
+ gnutls? ( |
49 |
+ net-libs/gnutls:= |
50 |
+ dev-libs/nettle:= |
51 |
+ ) |
52 |
+ !gnutls? ( dev-libs/openssl:0=[-bindist] ) |
53 |
+ ) |
54 |
+ zlib? ( sys-libs/zlib:= )" |
55 |
+RDEPEND=" |
56 |
+ ${DEPEND} |
57 |
+ acct-user/nzbget |
58 |
+ acct-group/nzbget |
59 |
+" |
60 |
+BDEPEND=" |
61 |
+ test? ( |
62 |
+ || ( |
63 |
+ =app-arch/rar-5* |
64 |
+ =app-arch/unrar-5* |
65 |
+ ) |
66 |
+ ) |
67 |
+ virtual/pkgconfig |
68 |
+" |
69 |
+DOCS=( ChangeLog README nzbget.conf ) |
70 |
+ |
71 |
+S=${WORKDIR}/${PN}-${PV/_pre*/-testing} |
72 |
+ |
73 |
+src_prepare() { |
74 |
+ default |
75 |
+ eautoreconf |
76 |
+ |
77 |
+ sed -i 's:^ScriptDir=.*:ScriptDir=/usr/share/nzbget/ppscripts:' nzbget.conf || die |
78 |
+ |
79 |
+ sed \ |
80 |
+ -e 's:^MainDir=.*:MainDir=/var/lib/nzbget:' \ |
81 |
+ -e 's:^LogFile=.*:LogFile=/var/log/nzbget/nzbget.log:' \ |
82 |
+ -e 's:^WebDir=.*:WebDir=/usr/share/nzbget/webui:' \ |
83 |
+ -e 's:^ConfigTemplate=.*:ConfigTemplate=/usr/share/nzbget/nzbget.conf:' \ |
84 |
+ -e 's:^DaemonUsername=.*:DaemonUsername=nzbget:' \ |
85 |
+ nzbget.conf > nzbgetd.conf || die |
86 |
+} |
87 |
+ |
88 |
+src_configure() { |
89 |
+ local myconf=( |
90 |
+ $(use_enable debug) |
91 |
+ $(use_enable ncurses curses) |
92 |
+ $(use_enable parcheck) |
93 |
+ $(use_enable ssl tls) |
94 |
+ $(use_enable zlib gzip) |
95 |
+ $(use_enable test tests) |
96 |
+ --with-tlslib=$(usex gnutls GnuTLS OpenSSL) |
97 |
+ ) |
98 |
+ econf "${myconf[@]}" |
99 |
+} |
100 |
+ |
101 |
+src_test() { |
102 |
+ ./nzbget --tests || die "Tests failed" |
103 |
+} |
104 |
+ |
105 |
+src_install() { |
106 |
+ default |
107 |
+ |
108 |
+ insinto /etc |
109 |
+ doins nzbget.conf |
110 |
+ doins nzbgetd.conf |
111 |
+ |
112 |
+ keepdir /var/log/nzbget |
113 |
+ |
114 |
+ newinitd "${FILESDIR}"/nzbget.initd-r1 nzbget |
115 |
+ newconfd "${FILESDIR}"/nzbget.confd nzbget |
116 |
+ systemd_dounit "${FILESDIR}"/nzbget.service |
117 |
+} |
118 |
+ |
119 |
+pkg_preinst() { |
120 |
+ fowners nzbget:nzbget /var/log/nzbget |
121 |
+ fperms 750 /var/log/nzbget |
122 |
+ |
123 |
+ fowners nzbget:nzbget /etc/nzbgetd.conf |
124 |
+ fperms 640 /etc/nzbgetd.conf |
125 |
+} |
126 |
+ |
127 |
+pkg_postinst() { |
128 |
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then |
129 |
+ elog |
130 |
+ elog "Please add users that you want to be able to use the system-wide" |
131 |
+ elog "nzbget daemon to the nzbget group. To access the daemon, run nzbget" |
132 |
+ elog "with the --configfile /etc/nzbgetd.conf option." |
133 |
+ elog |
134 |
+ fi |
135 |
+} |