1 |
commit: 7751ceea39908447f08e3c87522158bd87212897 |
2 |
Author: Ben Kohler <bkohler <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 29 13:58:30 2018 +0000 |
4 |
Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 29 14:12:58 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7751ceea |
7 |
|
8 |
net-wireless/unifi: revbumps for revised init script |
9 |
|
10 |
This new init script should handle stop & restart much more nicely. |
11 |
Also it's been simplified a bit, moving much of the long s-s-d command |
12 |
into relevant variables. Thanks ConiKost. |
13 |
|
14 |
Package-Manager: Portage-2.3.41, Repoman-2.3.9 |
15 |
|
16 |
net-wireless/unifi/files/unifi.initd-r1 | 25 +++++++++++ |
17 |
net-wireless/unifi/unifi-5.6.39-r1.ebuild | 70 +++++++++++++++++++++++++++++++ |
18 |
net-wireless/unifi/unifi-5.7.28-r1.ebuild | 70 +++++++++++++++++++++++++++++++ |
19 |
net-wireless/unifi/unifi-5.8.23-r1.ebuild | 70 +++++++++++++++++++++++++++++++ |
20 |
net-wireless/unifi/unifi-5.9.4-r1.ebuild | 69 ++++++++++++++++++++++++++++++ |
21 |
5 files changed, 304 insertions(+) |
22 |
|
23 |
diff --git a/net-wireless/unifi/files/unifi.initd-r1 b/net-wireless/unifi/files/unifi.initd-r1 |
24 |
new file mode 100644 |
25 |
index 00000000000..2db36571dac |
26 |
--- /dev/null |
27 |
+++ b/net-wireless/unifi/files/unifi.initd-r1 |
28 |
@@ -0,0 +1,25 @@ |
29 |
+#!/sbin/openrc-run |
30 |
+# Copyright 1999-2018 Gentoo Foundation |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+ACE_LIB="lib/ace.jar" |
34 |
+DAEMON="${JAVA_HOME-/etc/java-config-2/current-system-vm}"/bin/java |
35 |
+JAVA_OPTS="-Dorg.xerial.snappy.tempdir=/usr/lib/unifi/tmp -Djava.library.path=" |
36 |
+UNIFI_PATH="/usr/lib/unifi" |
37 |
+ |
38 |
+UNIFI_USER="unifi" |
39 |
+UNIFI_GROUP="unifi" |
40 |
+ |
41 |
+name="UniFi Controller" |
42 |
+ |
43 |
+start_stop_daemon_args="--chdir ${UNIFI_PATH}" |
44 |
+ |
45 |
+command="${DAEMON}" |
46 |
+command_args="${JAVA_OPTS} -jar ${ACE_LIB} start" |
47 |
+command_background=true |
48 |
+pidfile="/run/${RC_SVCNAME}.pid" |
49 |
+ |
50 |
+command_user="${UNIFI_USER}:${UNIFI_GROUP}" |
51 |
+ |
52 |
+command_progress=true |
53 |
+retry=TERM/60 |
54 |
|
55 |
diff --git a/net-wireless/unifi/unifi-5.6.39-r1.ebuild b/net-wireless/unifi/unifi-5.6.39-r1.ebuild |
56 |
new file mode 100644 |
57 |
index 00000000000..b96d147f49c |
58 |
--- /dev/null |
59 |
+++ b/net-wireless/unifi/unifi-5.6.39-r1.ebuild |
60 |
@@ -0,0 +1,70 @@ |
61 |
+# Copyright 1999-2018 Gentoo Foundation |
62 |
+# Distributed under the terms of the GNU General Public License v2 |
63 |
+ |
64 |
+EAPI=6 |
65 |
+ |
66 |
+# Used, when it's an unstable, beta or release candidate |
67 |
+RC_SUFFIX="" |
68 |
+ |
69 |
+inherit systemd user |
70 |
+ |
71 |
+DESCRIPTION="A Management Controller for Ubiquiti Networks UniFi APs" |
72 |
+HOMEPAGE="https://www.ubnt.com" |
73 |
+SRC_URI="https://dl.ubnt.com/unifi/${PV}${RC_SUFFIX}/UniFi.unix.zip -> ${P}.zip" |
74 |
+ |
75 |
+KEYWORDS="~amd64 ~x86" |
76 |
+LICENSE="Apache-1.0 Apache-2.0 BSD-1 BSD-2 BSD CDDL EPL-1.0 GPL-2 LGPL-2.1 LGPL-3 MIT ubiquiti" |
77 |
+SLOT="0/5.6" |
78 |
+ |
79 |
+RDEPEND="dev-db/mongodb |
80 |
+ virtual/jre:1.8" |
81 |
+ |
82 |
+DEPEND="app-arch/unzip" |
83 |
+ |
84 |
+RESTRICT="bindist mirror" |
85 |
+ |
86 |
+S="${WORKDIR}/UniFi" |
87 |
+ |
88 |
+DOCS=( "readme.txt" ) |
89 |
+ |
90 |
+QA_PREBUILT="usr/lib/unifi/lib/native/Linux/x86_64/*.so" |
91 |
+ |
92 |
+pkg_setup() { |
93 |
+ enewgroup unifi |
94 |
+ enewuser unifi -1 -1 /var/lib/unifi unifi |
95 |
+} |
96 |
+ |
97 |
+src_prepare() { |
98 |
+ # Remove unneeded files Linux, Mac and Windows |
99 |
+ rm -r lib/native/Linux/{aarch64,armv7} lib/native/{Mac,Windows} || die |
100 |
+ |
101 |
+ default |
102 |
+} |
103 |
+ |
104 |
+src_install() { |
105 |
+ # Install MongoDB wrapper script, to avoid problems with >= 3.6.0 |
106 |
+ # See https://community.ubnt.com/t5/UniFi-Routing-Switching/MongoDB-3-6/td-p/2195435 |
107 |
+ exeinto /usr/lib/unifi/bin |
108 |
+ newexe "${FILESDIR}"/mongod-wrapper mongod |
109 |
+ |
110 |
+ insinto /usr/lib/unifi |
111 |
+ doins -r dl lib webapps |
112 |
+ |
113 |
+ diropts -o unifi -g unifi |
114 |
+ keepdir /var/lib/unifi/{conf,data,run,tmp,work} /var/log/unifi |
115 |
+ |
116 |
+ for symlink in conf data run tmp work; do |
117 |
+ dosym ../../../var/lib/unifi/${symlink} /usr/lib/unifi/${symlink} |
118 |
+ done |
119 |
+ dosym ../../../var/log/unifi /usr/lib/unifi/logs |
120 |
+ |
121 |
+ newinitd "${FILESDIR}"/unifi.initd-r1 unifi |
122 |
+ systemd_dounit "${FILESDIR}"/unifi.service |
123 |
+ |
124 |
+ newconfd "${FILESDIR}"/unifi.confd unifi |
125 |
+ |
126 |
+ echo 'CONFIG_PROTECT="/var/lib/unifi"' > "${T}"/99unifi || die |
127 |
+ doenvd "${T}"/99unifi |
128 |
+ |
129 |
+ einstalldocs |
130 |
+} |
131 |
|
132 |
diff --git a/net-wireless/unifi/unifi-5.7.28-r1.ebuild b/net-wireless/unifi/unifi-5.7.28-r1.ebuild |
133 |
new file mode 100644 |
134 |
index 00000000000..c164485244d |
135 |
--- /dev/null |
136 |
+++ b/net-wireless/unifi/unifi-5.7.28-r1.ebuild |
137 |
@@ -0,0 +1,70 @@ |
138 |
+# Copyright 1999-2018 Gentoo Foundation |
139 |
+# Distributed under the terms of the GNU General Public License v2 |
140 |
+ |
141 |
+EAPI=6 |
142 |
+ |
143 |
+# Used, when it's an unstable, beta or release candidate |
144 |
+RC_SUFFIX="-5c442c6b54" |
145 |
+ |
146 |
+inherit systemd user |
147 |
+ |
148 |
+DESCRIPTION="A Management Controller for Ubiquiti Networks UniFi APs" |
149 |
+HOMEPAGE="https://www.ubnt.com" |
150 |
+SRC_URI="https://dl.ubnt.com/unifi/${PV}${RC_SUFFIX}/UniFi.unix.zip -> ${P}.zip" |
151 |
+ |
152 |
+KEYWORDS="~amd64 ~x86" |
153 |
+LICENSE="Apache-1.0 Apache-2.0 BSD-1 BSD-2 BSD CDDL EPL-1.0 GPL-2 LGPL-2.1 LGPL-3 MIT ubiquiti" |
154 |
+SLOT="0/5.7" |
155 |
+ |
156 |
+RDEPEND="dev-db/mongodb |
157 |
+ virtual/jre:1.8" |
158 |
+ |
159 |
+DEPEND="app-arch/unzip" |
160 |
+ |
161 |
+RESTRICT="bindist mirror" |
162 |
+ |
163 |
+S="${WORKDIR}/UniFi" |
164 |
+ |
165 |
+DOCS=( "readme.txt" ) |
166 |
+ |
167 |
+QA_PREBUILT="usr/lib/unifi/lib/native/Linux/x86_64/*.so" |
168 |
+ |
169 |
+pkg_setup() { |
170 |
+ enewgroup unifi |
171 |
+ enewuser unifi -1 -1 /var/lib/unifi unifi |
172 |
+} |
173 |
+ |
174 |
+src_prepare() { |
175 |
+ # Remove unneeded files Linux, Mac and Windows |
176 |
+ rm -r lib/native/Linux/{aarch64,armv7} lib/native/{Mac,Windows} || die |
177 |
+ |
178 |
+ default |
179 |
+} |
180 |
+ |
181 |
+src_install() { |
182 |
+ # Install MongoDB wrapper script, to avoid problems with >= 3.6.0 |
183 |
+ # See https://community.ubnt.com/t5/UniFi-Routing-Switching/MongoDB-3-6/td-p/2195435 |
184 |
+ exeinto /usr/lib/unifi/bin |
185 |
+ newexe "${FILESDIR}"/mongod-wrapper mongod |
186 |
+ |
187 |
+ insinto /usr/lib/unifi |
188 |
+ doins -r dl lib webapps |
189 |
+ |
190 |
+ diropts -o unifi -g unifi |
191 |
+ keepdir /var/lib/unifi/{conf,data,run,tmp,work} /var/log/unifi |
192 |
+ |
193 |
+ for symlink in conf data run tmp work; do |
194 |
+ dosym ../../../var/lib/unifi/${symlink} /usr/lib/unifi/${symlink} |
195 |
+ done |
196 |
+ dosym ../../../var/log/unifi /usr/lib/unifi/logs |
197 |
+ |
198 |
+ newinitd "${FILESDIR}"/unifi.initd-r1 unifi |
199 |
+ systemd_dounit "${FILESDIR}"/unifi.service |
200 |
+ |
201 |
+ newconfd "${FILESDIR}"/unifi.confd unifi |
202 |
+ |
203 |
+ echo 'CONFIG_PROTECT="/var/lib/unifi"' > "${T}"/99unifi || die |
204 |
+ doenvd "${T}"/99unifi |
205 |
+ |
206 |
+ einstalldocs |
207 |
+} |
208 |
|
209 |
diff --git a/net-wireless/unifi/unifi-5.8.23-r1.ebuild b/net-wireless/unifi/unifi-5.8.23-r1.ebuild |
210 |
new file mode 100644 |
211 |
index 00000000000..0bf53df426d |
212 |
--- /dev/null |
213 |
+++ b/net-wireless/unifi/unifi-5.8.23-r1.ebuild |
214 |
@@ -0,0 +1,70 @@ |
215 |
+# Copyright 1999-2018 Gentoo Foundation |
216 |
+# Distributed under the terms of the GNU General Public License v2 |
217 |
+ |
218 |
+EAPI=6 |
219 |
+ |
220 |
+# Used, when it's an unstable, beta or release candidate |
221 |
+RC_SUFFIX="-d5a5bbfda4" |
222 |
+ |
223 |
+inherit systemd user |
224 |
+ |
225 |
+DESCRIPTION="A Management Controller for Ubiquiti Networks UniFi APs" |
226 |
+HOMEPAGE="https://www.ubnt.com" |
227 |
+SRC_URI="https://dl.ubnt.com/unifi/${PV}${RC_SUFFIX}/UniFi.unix.zip -> ${P}.zip" |
228 |
+ |
229 |
+KEYWORDS="~amd64 ~x86" |
230 |
+LICENSE="Apache-1.0 Apache-2.0 BSD-1 BSD-2 BSD CDDL EPL-1.0 GPL-2 LGPL-2.1 LGPL-3 MIT ubiquiti" |
231 |
+SLOT="0/5.8" |
232 |
+ |
233 |
+RDEPEND="dev-db/mongodb |
234 |
+ virtual/jre:1.8" |
235 |
+ |
236 |
+DEPEND="app-arch/unzip" |
237 |
+ |
238 |
+RESTRICT="bindist mirror" |
239 |
+ |
240 |
+S="${WORKDIR}/UniFi" |
241 |
+ |
242 |
+DOCS=( "readme.txt" ) |
243 |
+ |
244 |
+QA_PREBUILT="usr/lib/unifi/lib/native/Linux/x86_64/*.so" |
245 |
+ |
246 |
+pkg_setup() { |
247 |
+ enewgroup unifi |
248 |
+ enewuser unifi -1 -1 /var/lib/unifi unifi |
249 |
+} |
250 |
+ |
251 |
+src_prepare() { |
252 |
+ # Remove unneeded files Linux, Mac and Windows |
253 |
+ rm -r lib/native/Linux/{aarch64,armv7} lib/native/{Mac,Windows} || die |
254 |
+ |
255 |
+ default |
256 |
+} |
257 |
+ |
258 |
+src_install() { |
259 |
+ # Install MongoDB wrapper script, to avoid problems with >= 3.6.0 |
260 |
+ # See https://community.ubnt.com/t5/UniFi-Routing-Switching/MongoDB-3-6/td-p/2195435 |
261 |
+ exeinto /usr/lib/unifi/bin |
262 |
+ newexe "${FILESDIR}"/mongod-wrapper mongod |
263 |
+ |
264 |
+ insinto /usr/lib/unifi |
265 |
+ doins -r dl lib webapps |
266 |
+ |
267 |
+ diropts -o unifi -g unifi |
268 |
+ keepdir /var/lib/unifi/{conf,data,run,tmp,work} /var/log/unifi |
269 |
+ |
270 |
+ for symlink in conf data run tmp work; do |
271 |
+ dosym ../../../var/lib/unifi/${symlink} /usr/lib/unifi/${symlink} |
272 |
+ done |
273 |
+ dosym ../../../var/log/unifi /usr/lib/unifi/logs |
274 |
+ |
275 |
+ newinitd "${FILESDIR}"/unifi.initd-r1 unifi |
276 |
+ systemd_dounit "${FILESDIR}"/unifi.service |
277 |
+ |
278 |
+ newconfd "${FILESDIR}"/unifi.confd unifi |
279 |
+ |
280 |
+ echo 'CONFIG_PROTECT="/var/lib/unifi"' > "${T}"/99unifi || die |
281 |
+ doenvd "${T}"/99unifi |
282 |
+ |
283 |
+ einstalldocs |
284 |
+} |
285 |
|
286 |
diff --git a/net-wireless/unifi/unifi-5.9.4-r1.ebuild b/net-wireless/unifi/unifi-5.9.4-r1.ebuild |
287 |
new file mode 100644 |
288 |
index 00000000000..c678667c4e7 |
289 |
--- /dev/null |
290 |
+++ b/net-wireless/unifi/unifi-5.9.4-r1.ebuild |
291 |
@@ -0,0 +1,69 @@ |
292 |
+# Copyright 1999-2018 Gentoo Foundation |
293 |
+# Distributed under the terms of the GNU General Public License v2 |
294 |
+ |
295 |
+EAPI=6 |
296 |
+ |
297 |
+# Used, when it's an unstable, beta or release candidate |
298 |
+RC_SUFFIX="-b647df56b7" |
299 |
+ |
300 |
+inherit systemd user |
301 |
+ |
302 |
+DESCRIPTION="A Management Controller for Ubiquiti Networks UniFi APs" |
303 |
+HOMEPAGE="https://www.ubnt.com" |
304 |
+SRC_URI="https://dl.ubnt.com/unifi/${PV}${RC_SUFFIX}/UniFi.unix.zip -> ${P}.zip" |
305 |
+ |
306 |
+LICENSE="Apache-1.0 Apache-2.0 BSD-1 BSD-2 BSD CDDL EPL-1.0 GPL-2 LGPL-2.1 LGPL-3 MIT ubiquiti" |
307 |
+SLOT="0/5.9" |
308 |
+ |
309 |
+RDEPEND="dev-db/mongodb |
310 |
+ virtual/jre:1.8" |
311 |
+ |
312 |
+DEPEND="app-arch/unzip" |
313 |
+ |
314 |
+RESTRICT="bindist mirror" |
315 |
+ |
316 |
+S="${WORKDIR}/UniFi" |
317 |
+ |
318 |
+DOCS=( "readme.txt" ) |
319 |
+ |
320 |
+QA_PREBUILT="usr/lib/unifi/lib/native/Linux/x86_64/*.so" |
321 |
+ |
322 |
+pkg_setup() { |
323 |
+ enewgroup unifi |
324 |
+ enewuser unifi -1 -1 /var/lib/unifi unifi |
325 |
+} |
326 |
+ |
327 |
+src_prepare() { |
328 |
+ # Remove unneeded files Linux, Mac and Windows |
329 |
+ rm -r lib/native/Linux/{aarch64,armv7} lib/native/{Mac,Windows} || die |
330 |
+ |
331 |
+ default |
332 |
+} |
333 |
+ |
334 |
+src_install() { |
335 |
+ # Install MongoDB wrapper script, to avoid problems with >= 3.6.0 |
336 |
+ # See https://community.ubnt.com/t5/UniFi-Routing-Switching/MongoDB-3-6/td-p/2195435 |
337 |
+ exeinto /usr/lib/unifi/bin |
338 |
+ newexe "${FILESDIR}"/mongod-wrapper mongod |
339 |
+ |
340 |
+ insinto /usr/lib/unifi |
341 |
+ doins -r dl lib webapps |
342 |
+ |
343 |
+ diropts -o unifi -g unifi |
344 |
+ keepdir /var/lib/unifi/{conf,data,run,tmp,work} /var/log/unifi |
345 |
+ |
346 |
+ for symlink in conf data run tmp work; do |
347 |
+ dosym ../../../var/lib/unifi/${symlink} /usr/lib/unifi/${symlink} |
348 |
+ done |
349 |
+ dosym ../../../var/log/unifi /usr/lib/unifi/logs |
350 |
+ |
351 |
+ newinitd "${FILESDIR}"/unifi.initd-r1 unifi |
352 |
+ systemd_dounit "${FILESDIR}"/unifi.service |
353 |
+ |
354 |
+ newconfd "${FILESDIR}"/unifi.confd unifi |
355 |
+ |
356 |
+ echo 'CONFIG_PROTECT="/var/lib/unifi"' > "${T}"/99unifi || die |
357 |
+ doenvd "${T}"/99unifi |
358 |
+ |
359 |
+ einstalldocs |
360 |
+} |