1 |
commit: 55d6c448b92be3cad1980814166819958b586bee |
2 |
Author: Ben Kohler <bkohler <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 1 17:26:25 2018 +0000 |
4 |
Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 1 17:27:05 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55d6c448 |
7 |
|
8 |
net-wireless/unifi: add systemd check on 5.8 series for optional lib |
9 |
|
10 |
Package-Manager: Portage-2.3.41, Repoman-2.3.9 |
11 |
|
12 |
net-wireless/unifi/unifi-5.8.24-r1.ebuild | 74 +++++++++++++++++++++++++++++++ |
13 |
1 file changed, 74 insertions(+) |
14 |
|
15 |
diff --git a/net-wireless/unifi/unifi-5.8.24-r1.ebuild b/net-wireless/unifi/unifi-5.8.24-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000000..08791533777 |
18 |
--- /dev/null |
19 |
+++ b/net-wireless/unifi/unifi-5.8.24-r1.ebuild |
20 |
@@ -0,0 +1,74 @@ |
21 |
+# Copyright 1999-2018 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=6 |
25 |
+ |
26 |
+# Used, when it's an unstable, beta or release candidate |
27 |
+RC_SUFFIX="" |
28 |
+ |
29 |
+inherit systemd user |
30 |
+ |
31 |
+DESCRIPTION="A Management Controller for Ubiquiti Networks UniFi APs" |
32 |
+HOMEPAGE="https://www.ubnt.com" |
33 |
+SRC_URI="https://dl.ubnt.com/unifi/${PV}${RC_SUFFIX}/UniFi.unix.zip -> ${P}.zip" |
34 |
+ |
35 |
+KEYWORDS="~amd64 ~x86" |
36 |
+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" |
37 |
+SLOT="0/5.8" |
38 |
+IUSE="systemd" |
39 |
+ |
40 |
+RDEPEND="dev-db/mongodb |
41 |
+ virtual/jre:1.8" |
42 |
+ |
43 |
+DEPEND="app-arch/unzip" |
44 |
+ |
45 |
+RESTRICT="bindist mirror" |
46 |
+ |
47 |
+S="${WORKDIR}/UniFi" |
48 |
+ |
49 |
+DOCS=( "readme.txt" ) |
50 |
+ |
51 |
+QA_PREBUILT="usr/lib/unifi/lib/native/Linux/x86_64/*.so" |
52 |
+ |
53 |
+pkg_setup() { |
54 |
+ enewgroup unifi |
55 |
+ enewuser unifi -1 -1 /var/lib/unifi unifi |
56 |
+} |
57 |
+ |
58 |
+src_prepare() { |
59 |
+ # Remove unneeded files Linux, Mac and Windows |
60 |
+ rm -r lib/native/Linux/{aarch64,armv7} lib/native/{Mac,Windows} || die |
61 |
+ if ! use systemd; then |
62 |
+ rm lib/native/Linux/x86_64/libubnt_sdnotify_jni.so || die |
63 |
+ fi |
64 |
+ |
65 |
+ default |
66 |
+} |
67 |
+ |
68 |
+src_install() { |
69 |
+ # Install MongoDB wrapper script, to avoid problems with >= 3.6.0 |
70 |
+ # See https://community.ubnt.com/t5/UniFi-Routing-Switching/MongoDB-3-6/td-p/2195435 |
71 |
+ exeinto /usr/lib/unifi/bin |
72 |
+ newexe "${FILESDIR}"/mongod-wrapper mongod |
73 |
+ |
74 |
+ insinto /usr/lib/unifi |
75 |
+ doins -r dl lib webapps |
76 |
+ |
77 |
+ diropts -o unifi -g unifi |
78 |
+ keepdir /var/lib/unifi/{conf,data,run,tmp,work} /var/log/unifi |
79 |
+ |
80 |
+ for symlink in conf data run tmp work; do |
81 |
+ dosym ../../../var/lib/unifi/${symlink} /usr/lib/unifi/${symlink} |
82 |
+ done |
83 |
+ dosym ../../../var/log/unifi /usr/lib/unifi/logs |
84 |
+ |
85 |
+ newinitd "${FILESDIR}"/unifi.initd-r1 unifi |
86 |
+ systemd_dounit "${FILESDIR}"/unifi.service |
87 |
+ |
88 |
+ newconfd "${FILESDIR}"/unifi.confd unifi |
89 |
+ |
90 |
+ echo 'CONFIG_PROTECT="/var/lib/unifi"' > "${T}"/99unifi || die |
91 |
+ doenvd "${T}"/99unifi |
92 |
+ |
93 |
+ einstalldocs |
94 |
+} |