summaryrefslogtreecommitdiff
path: root/net-wireless/unifi
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-06-30 08:49:38 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-06-30 08:49:38 +0100
commitb2be182d49eea46686b5cf2680d457df61e89dc4 (patch)
treec66442ced2011c5ca81c3114cc51041e314c6d33 /net-wireless/unifi
parente23cdda4dbb0c83b9e682ab5e916085a35203da5 (diff)
gentoo resync : 30.06.2018
Diffstat (limited to 'net-wireless/unifi')
-rw-r--r--net-wireless/unifi/Manifest20
-rwxr-xr-xnet-wireless/unifi/files/mongod-wrapper6
-rw-r--r--net-wireless/unifi/files/unifi.confd6
-rw-r--r--net-wireless/unifi/files/unifi.initd26
-rw-r--r--net-wireless/unifi/files/unifi.initd-r125
-rw-r--r--net-wireless/unifi/files/unifi.service14
-rw-r--r--net-wireless/unifi/metadata.xml22
-rw-r--r--net-wireless/unifi/unifi-5.6.39-r1.ebuild70
-rw-r--r--net-wireless/unifi/unifi-5.6.39.ebuild70
-rw-r--r--net-wireless/unifi/unifi-5.7.28-r1.ebuild70
-rw-r--r--net-wireless/unifi/unifi-5.7.28.ebuild70
-rw-r--r--net-wireless/unifi/unifi-5.8.23-r1.ebuild70
-rw-r--r--net-wireless/unifi/unifi-5.8.23.ebuild70
-rw-r--r--net-wireless/unifi/unifi-5.8.24.ebuild70
-rw-r--r--net-wireless/unifi/unifi-5.9.4-r1.ebuild69
-rw-r--r--net-wireless/unifi/unifi-5.9.4.ebuild69
16 files changed, 747 insertions, 0 deletions
diff --git a/net-wireless/unifi/Manifest b/net-wireless/unifi/Manifest
new file mode 100644
index 000000000000..32bfd8aae0db
--- /dev/null
+++ b/net-wireless/unifi/Manifest
@@ -0,0 +1,20 @@
+AUX mongod-wrapper 302 BLAKE2B ae5ae5ead5b7a7876a60a8b4e2d65a7881a6fc29a514643ca9c7ea9e819d05dbcfb2c573be79140ad5fcab5e86a353e8ee591f581160e10ed9d8a011629bfa7d SHA512 4a799730074e4d2b0143bf77e9f7540819e042a7edcfc8bdc678a028c3752b1f96184f76d8a0557f6aeedbe333c91a1704aef8b8c873cce4abce6c3214ede3ce
+AUX unifi.confd 222 BLAKE2B 3b566a4667b4138f5ad8da53099342708949becfaaa2e5bdb85779f2b39675c0e234f21d57ea0a9ee1c13b41003682823fc5b2ad5132b57ddb4730fdeccb3691 SHA512 20e67959a0f22c7ef1aebcae5248ce76b9049b24e531e560ed0b9eb6b86b7ae10c57ce41517c9276fa11cb05ddc27e8a69b80350d0b8c5590fbe23152f676cc6
+AUX unifi.initd 840 BLAKE2B 1c0210a44f96d4ab9ce23cdaa1d4307eafafdf4d8969c6917def008b965dc4e46daa6c681d38426ecbb3fdea8c137efe3d012eb0ecde696a2410d501b5cf54d2 SHA512 882d932e667d89557fb6302aa16e0720c0f868c8fdcfd093609b9a580a92359c5b4860429434c6d83bbfc57710f386458330e895f949ce55efb27483c2565e0f
+AUX unifi.initd-r1 648 BLAKE2B 583d5ad1922c6eb83ba3b1388f6240107b4b0e1a479ebc463c94742f8f76d5c96adc84358e93a3b014fb2fcfc9c227af8c6f57dbfe993e6d7bbf1248ea763fc1 SHA512 d09e1b10bcc94d8459bc842bc6b94e06f8a7876bc3fe45b704e914c46bb66fc5ef03c78d51507f176450a0fbb199a5a2492a7c01cd27edf68de748f43ea1a3d4
+AUX unifi.service 435 BLAKE2B d982d8ae1f4bf2fa6affc149e0edf94e8471283b0353b370d9e95934a6d60d6b700cfdc302e489cafe74d128735b0188bfa4422f30295b267d104a455fe4f1aa SHA512 6dc1dd188515c30ad105d839a2112a75f925f3453cc5eb29b727adb2dbf8bdf53be62eab94b01dfdb483f135fef092c7b6235afd63c61a996efe2d87d4fa6995
+DIST unifi-5.6.39.zip 63559153 BLAKE2B 377c9cbcb49f3f7fe687c7877ca37b4cf4c62076da1a05ce64599be86b8503b910e941bdaa93b9bf77ed259e46ed5355befb695c0cff41157fe1e43a10643216 SHA512 456407a0fe140ef35718591777fcc1084ca9ee4f70c97deb554318390aa3e530c5dfbbbe57b659f83d52ca44be8ebd57071cfad2bf7f0f180fa5f2fa9100a1d9
+DIST unifi-5.7.28.zip 79362245 BLAKE2B 5edb7b92d602ba780b0fa7613360ada39f09b347b247945761af80d0180d4653b19cb5cd1d7bd11332a85de8481c4981b111e572cb755a83b676362494a5505c SHA512 f6ba667a2f0b5959ed715a190fdbdfe308ea256c2d485f96d43fe797912dfe6992cbaed95add5899293fabdd371c1814572bf1189a4ce93c632743dca40b87e3
+DIST unifi-5.8.23.zip 80086708 BLAKE2B ea7aec61d74132a47843084f1987e6e016c4fb1ec96d077dac2a9b122003274b0314927404468669a5d7cc0bdb6a307c97bca09f663b180d15bf18436b35408b SHA512 2b42df2a84574ac9e282c7ff59eb86ce29170ea7ef5957690dec8772c90acda3c08c633b3bceeac08bb73ff1460143207a64d2405de19436faf20a042849231b
+DIST unifi-5.8.24.zip 80086706 BLAKE2B 00530b5e141e9444120efeb6ea5b3106781fb5b15a1ade44b71675a726ae7245221af694b36a922a4d047f78567a7bd9e1354d6dde442dfccd58a49f87079403 SHA512 cf7145eeeed779893c1c9709eef7364154503dd1232f88cce38facc748426d19c5422decbd5e3a80d857a2d82969258045944b491c7b228467d8e4a7c29a0ec1
+DIST unifi-5.9.4.zip 102808708 BLAKE2B 3b1479bd65837667f2abff594426ecc3491475d1cf6d842d07cdc8868cabf59facc857263fcfb1ef30fdb8dbb4c0a037b7e04736b8debf0f4f795494fc62ee26 SHA512 01e2d8c2d48a552e3b5d03cb97b0241e0561a4c88e52f13ec2d2a8a8b7d75ba7d9eb7878e37876efe5581e439afaac359ae6e3e7b2bb3d0719ebdbb10b06778c
+EBUILD unifi-5.6.39-r1.ebuild 1729 BLAKE2B 77a4fb38b6e82763f83f072d595e3f39306aed4ce39f98bfe6783e85eb1c83ab0fc996e94d25b86cd4bad196ae898dace5eb7469147cb3394cda1699ffec1900 SHA512 4415d13c43c30238c756542f6931c12bb6cbcd0163cb6e2c522b6adef39f0c5d3c069d25facdb12575fc0463a8aa3fd479f3274009083a645139d656ce998ae2
+EBUILD unifi-5.6.39.ebuild 1726 BLAKE2B be5c3312dfb28320e32f2b01f9d4cbd997720b94da1a9bdd3395fe9fd975d472eda73eda175e4b0679bc320844aacc140622fd6b6339fa7dd4784588ee35b96f SHA512 60499cd250cc77eb1a9ae05932f55ce1d64ac61606a31cd515f8a603651ff1d0802e5644160d55ef6cf4072d620de81c49ca55c126950aa876fae8ac69a2e6d3
+EBUILD unifi-5.7.28-r1.ebuild 1750 BLAKE2B ab2381e2fce8a2e71723773acdb4bc0f8996c25663af28b580137f18e27dcaf511e8271b3249c87c062e530e6648049a034a174a523d2968485cbba3b0a6dd74 SHA512 e0c73eff569c7ed8d16ec9c2815312150f1abd3b058437a1449c0d01a4caa403d0f2878dc94ba4f8f3ecb97545232cf74e6abc586729e5c1f0691c978e52a581
+EBUILD unifi-5.7.28.ebuild 1747 BLAKE2B 99733735bc4d4dda54b67fc97830dc72a873e2998f92b7e2164d0f4bea1bd3f0aec450dfe1902111cfa1125b0efc17fe11410d9047098dea60f0432a89f6b00b SHA512 eda3ebcd582130663514729c2fce08647027ad39b545bdf21be587e317cabef7ffc2a8b714f88336cc41503f5f7640525199cc2207bc7c617906230f226c7171
+EBUILD unifi-5.8.23-r1.ebuild 1750 BLAKE2B f179a377d37061f017715280b8231a4e7b8219dad6821200a05445f5e2d52830b03e1ebfd092aa4141ee5e0611e538816901aaa9c74b2613b5faa78637f4f178 SHA512 f707d8793cda6db537bac979768bc7399a0473e102b3f9f9fbffaeb72269121daa3bc4047ac9af2da08545332f1bbb58b5bad7361e8436c9e5f5ab39683001b0
+EBUILD unifi-5.8.23.ebuild 1747 BLAKE2B ff3016996e6e78398aa2d124d2e3f74f3f0563a3baf90a7c21cb653477817d64a32da6915edebde763b6d9f2c16c7af52e36d25d29569bcb5bd2b59a969b490a SHA512 e1ff8abdc93ee260b538750f3f184a6cdc6a68f2cdd4b23f0a58e3a5552cf88f63a167924608b34a07b3301131800a7f4d1cac96432c89a2d357a92603c059bf
+EBUILD unifi-5.8.24.ebuild 1739 BLAKE2B eef3ca7c137f8f6e87395678d4560e14f0bc1c2f81ef6d7f8ec077fdf89016110fc9e3b588e0af3f619e40b8cc802e51db889279b6381a93ae0fcce102e840c2 SHA512 4c02705694d13aee8d582e2010de2feabc442e30397bc6ff2feaf0a5d703ecaadf6ef9e2a0b8c972cfb687acb93e6ac4b49a6d7288d3abf12a34d960bda76bd7
+EBUILD unifi-5.9.4-r1.ebuild 1727 BLAKE2B 8aca9dc5cd7ec20467bffd5f6d13a3818391383cb39b8bcc0f3b30fb4d4c26f8a3b92dfefc2c9b9b77d17a52a4d1bb1413ff51d6786f55cd910a666b13ebad96 SHA512 cd8b6b98ee2d203ae806572131c2985badf1e9252374ac7ef1051a97a99feb4b830bfe19ff60d09c450076c73f93948e9746a4115bd1285622e199bad4bc2926
+EBUILD unifi-5.9.4.ebuild 1724 BLAKE2B 1000c8803b9ec71ac2871fc0f7c3b3d20baa388807fc2f6c6b77689d6d55b0bb4cb31d57950fdd0cdca26ece065529a1c6c01526071b70e47827568679ec721a SHA512 5a5886ebc00a78e5c305f971d2eee93ef90de69f6bc0387be7be5f11ae17ecdd7c030f012087a08907fb7e2cb2e05a3206c9c5823c87034223b5c9e0b0c6af14
+MISC metadata.xml 803 BLAKE2B 5d50d4d0c8353661b471d243682812f77cc9a969d3117c6cf1fff60ecef4e83767b8e235cb0e010383bf1f754a7f1a1261a73427b3bfc1446f7ef08ba837ab36 SHA512 2588b43cf7049379def1b487815c317377e8e04293e54dd6035c50ce612f0ce3ac2039c3802eb7b9b6be172c49aef68f28a547fec5f565e42acaf0d2fdac8abe
diff --git a/net-wireless/unifi/files/mongod-wrapper b/net-wireless/unifi/files/mongod-wrapper
new file mode 100755
index 000000000000..21637de50a0f
--- /dev/null
+++ b/net-wireless/unifi/files/mongod-wrapper
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# Remove --nohttpinterface argument, since it does not exist on MongoDB >= 3.6.x anymore
+# See https://community.ubnt.com/t5/UniFi-Routing-Switching/MongoDB-3-6/td-p/2195435
+remove_nohttpinterface_arg=$(echo $* | sed -e 's/--nohttpinterface//')
+/usr/bin/mongod ${remove_nohttpinterface_arg}
diff --git a/net-wireless/unifi/files/unifi.confd b/net-wireless/unifi/files/unifi.confd
new file mode 100644
index 000000000000..580c18d332b7
--- /dev/null
+++ b/net-wireless/unifi/files/unifi.confd
@@ -0,0 +1,6 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Specifies the path of an used Java runtime,
+# if it's not set, the system default is being used.
+# JAVA_HOME=""
diff --git a/net-wireless/unifi/files/unifi.initd b/net-wireless/unifi/files/unifi.initd
new file mode 100644
index 000000000000..48fd9dd3b4a4
--- /dev/null
+++ b/net-wireless/unifi/files/unifi.initd
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ACE_LIB="lib/ace.jar"
+DAEMON="${JAVA_HOME-/etc/java-config-2/current-system-vm}"/bin/java
+JAVA_OPTS="-Djava.library.path= -Dorg.xerial.snappy.tempdir=/usr/lib/unifi/tmp"
+UNIFI_GROUP="unifi"
+UNIFI_PATH="/usr/lib/unifi"
+UNIFI_USER="unifi"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting UniFi Controller"
+ start-stop-daemon --start --quiet --background --user ${UNIFI_USER} --group ${UNIFI_GROUP} --chdir ${UNIFI_PATH} --exec ${DAEMON} -- ${JAVA_OPTS} -jar ${ACE_LIB} start
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping UniFi Controller"
+ start-stop-daemon --start --quiet --background --user ${UNIFI_USER} --group ${UNIFI_GROUP} --chdir ${UNIFI_PATH} --exec ${DAEMON} -- ${JAVA_OPTS} -jar ${ACE_LIB} stop
+ eend $?
+}
diff --git a/net-wireless/unifi/files/unifi.initd-r1 b/net-wireless/unifi/files/unifi.initd-r1
new file mode 100644
index 000000000000..2db36571dac0
--- /dev/null
+++ b/net-wireless/unifi/files/unifi.initd-r1
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ACE_LIB="lib/ace.jar"
+DAEMON="${JAVA_HOME-/etc/java-config-2/current-system-vm}"/bin/java
+JAVA_OPTS="-Dorg.xerial.snappy.tempdir=/usr/lib/unifi/tmp -Djava.library.path="
+UNIFI_PATH="/usr/lib/unifi"
+
+UNIFI_USER="unifi"
+UNIFI_GROUP="unifi"
+
+name="UniFi Controller"
+
+start_stop_daemon_args="--chdir ${UNIFI_PATH}"
+
+command="${DAEMON}"
+command_args="${JAVA_OPTS} -jar ${ACE_LIB} start"
+command_background=true
+pidfile="/run/${RC_SVCNAME}.pid"
+
+command_user="${UNIFI_USER}:${UNIFI_GROUP}"
+
+command_progress=true
+retry=TERM/60
diff --git a/net-wireless/unifi/files/unifi.service b/net-wireless/unifi/files/unifi.service
new file mode 100644
index 000000000000..00c00d7f3c9e
--- /dev/null
+++ b/net-wireless/unifi/files/unifi.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=UniFi Controller
+After=network-online.target
+
+[Service]
+Type=simple
+User=unifi
+Group=unifi
+WorkingDirectory=/usr/lib/unifi
+ExecStart=/usr/bin/java -Djava.library.path= -Dorg.xerial.snappy.tempdir=/usr/lib/unifi/tmp -jar /usr/lib/unifi/lib/ace.jar start
+ExecStop=/usr/bin/java -Djava.library.path= -Dorg.xerial.snappy.tempdir=/usr/lib/unifi/tmp -jar /usr/lib/unifi/lib/ace.jar stop
+
+[Install]
+WantedBy=network.target
diff --git a/net-wireless/unifi/metadata.xml b/net-wireless/unifi/metadata.xml
new file mode 100644
index 000000000000..57ba2066974e
--- /dev/null
+++ b/net-wireless/unifi/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>bkohler@gentoo.org</email>
+ <name>Ben Kohler</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>ck+gentoo@bl4ckb0x.de</email>
+ <name>Conrad Kostecki</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>
+ UniFi is a management controller software for Ubiquiti UniFi APs.
+ It's purpose is to configure and monitor all those APs.
+ Also all kind of statistics are collected, which can be accessed through UniFi.
+ There is also an internal RADIUS server, which can be used for WPA2-Enterprise.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-wireless/unifi/unifi-5.6.39-r1.ebuild b/net-wireless/unifi/unifi-5.6.39-r1.ebuild
new file mode 100644
index 000000000000..4f41ed02126f
--- /dev/null
+++ b/net-wireless/unifi/unifi-5.6.39-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# Used, when it's an unstable, beta or release candidate
+RC_SUFFIX=""
+
+inherit systemd user
+
+DESCRIPTION="A Management Controller for Ubiquiti Networks UniFi APs"
+HOMEPAGE="https://www.ubnt.com"
+SRC_URI="https://dl.ubnt.com/unifi/${PV}${RC_SUFFIX}/UniFi.unix.zip -> ${P}.zip"
+
+KEYWORDS="~amd64 ~x86"
+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"
+SLOT="0/5.6"
+
+RDEPEND="dev-db/mongodb
+ virtual/jre:1.8"
+
+DEPEND="app-arch/unzip"
+
+RESTRICT="bindist mirror"
+
+S="${WORKDIR}/UniFi"
+
+DOCS=( "readme.txt" )
+
+QA_PREBUILT="usr/lib/unifi/lib/native/Linux/x86_64/*.so"
+
+pkg_setup() {
+ enewgroup unifi
+ enewuser unifi -1 -1 /var/lib/unifi unifi
+}
+
+src_prepare() {
+ # Remove unneeded files Linux, Mac and Windows
+ rm -r lib/native/Linux/armhf lib/native/{Mac,Windows} || die
+
+ default
+}
+
+src_install() {
+ # Install MongoDB wrapper script, to avoid problems with >= 3.6.0
+ # See https://community.ubnt.com/t5/UniFi-Routing-Switching/MongoDB-3-6/td-p/2195435
+ exeinto /usr/lib/unifi/bin
+ newexe "${FILESDIR}"/mongod-wrapper mongod
+
+ insinto /usr/lib/unifi
+ doins -r dl lib webapps
+
+ diropts -o unifi -g unifi
+ keepdir /var/lib/unifi/{conf,data,run,tmp,work} /var/log/unifi
+
+ for symlink in conf data run tmp work; do
+ dosym ../../../var/lib/unifi/${symlink} /usr/lib/unifi/${symlink}
+ done
+ dosym ../../../var/log/unifi /usr/lib/unifi/logs
+
+ newinitd "${FILESDIR}"/unifi.initd-r1 unifi
+ systemd_dounit "${FILESDIR}"/unifi.service
+
+ newconfd "${FILESDIR}"/unifi.confd unifi
+
+ echo 'CONFIG_PROTECT="/var/lib/unifi"' > "${T}"/99unifi || die
+ doenvd "${T}"/99unifi
+
+ einstalldocs
+}
diff --git a/net-wireless/unifi/unifi-5.6.39.ebuild b/net-wireless/unifi/unifi-5.6.39.ebuild
new file mode 100644
index 000000000000..aeda8f7c164b
--- /dev/null
+++ b/net-wireless/unifi/unifi-5.6.39.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# Used, when it's an unstable, beta or release candidate
+RC_SUFFIX=""
+
+inherit systemd user
+
+DESCRIPTION="A Management Controller for Ubiquiti Networks UniFi APs"
+HOMEPAGE="https://www.ubnt.com"
+SRC_URI="https://dl.ubnt.com/unifi/${PV}${RC_SUFFIX}/UniFi.unix.zip -> ${P}.zip"
+
+KEYWORDS="~amd64 ~x86"
+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"
+SLOT="0/5.6"
+
+RDEPEND="dev-db/mongodb
+ virtual/jre:1.8"
+
+DEPEND="app-arch/unzip"
+
+RESTRICT="bindist mirror"
+
+S="${WORKDIR}/UniFi"
+
+DOCS=( "readme.txt" )
+
+QA_PREBUILT="usr/lib/unifi/lib/native/Linux/x86_64/*.so"
+
+pkg_setup() {
+ enewgroup unifi
+ enewuser unifi -1 -1 /var/lib/unifi unifi
+}
+
+src_prepare() {
+ # Remove unneeded files Linux, Mac and Windows
+ rm -r lib/native/Linux/armhf lib/native/{Mac,Windows} || die
+
+ default
+}
+
+src_install() {
+ # Install MongoDB wrapper script, to avoid problems with >= 3.6.0
+ # See https://community.ubnt.com/t5/UniFi-Routing-Switching/MongoDB-3-6/td-p/2195435
+ exeinto /usr/lib/unifi/bin
+ newexe "${FILESDIR}"/mongod-wrapper mongod
+
+ insinto /usr/lib/unifi
+ doins -r dl lib webapps
+
+ diropts -o unifi -g unifi
+ keepdir /var/lib/unifi/{conf,data,run,tmp,work} /var/log/unifi
+
+ for symlink in conf data run tmp work; do
+ dosym ../../../var/lib/unifi/${symlink} /usr/lib/unifi/${symlink}
+ done
+ dosym ../../../var/log/unifi /usr/lib/unifi/logs
+
+ newinitd "${FILESDIR}"/unifi.initd unifi
+ systemd_dounit "${FILESDIR}"/unifi.service
+
+ newconfd "${FILESDIR}"/unifi.confd unifi
+
+ echo 'CONFIG_PROTECT="/var/lib/unifi"' > "${T}"/99unifi || die
+ doenvd "${T}"/99unifi
+
+ einstalldocs
+}
diff --git a/net-wireless/unifi/unifi-5.7.28-r1.ebuild b/net-wireless/unifi/unifi-5.7.28-r1.ebuild
new file mode 100644
index 000000000000..c164485244d9
--- /dev/null
+++ b/net-wireless/unifi/unifi-5.7.28-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# Used, when it's an unstable, beta or release candidate
+RC_SUFFIX="-5c442c6b54"
+
+inherit systemd user
+
+DESCRIPTION="A Management Controller for Ubiquiti Networks UniFi APs"
+HOMEPAGE="https://www.ubnt.com"
+SRC_URI="https://dl.ubnt.com/unifi/${PV}${RC_SUFFIX}/UniFi.unix.zip -> ${P}.zip"
+
+KEYWORDS="~amd64 ~x86"
+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"
+SLOT="0/5.7"
+
+RDEPEND="dev-db/mongodb
+ virtual/jre:1.8"
+
+DEPEND="app-arch/unzip"
+
+RESTRICT="bindist mirror"
+
+S="${WORKDIR}/UniFi"
+
+DOCS=( "readme.txt" )
+
+QA_PREBUILT="usr/lib/unifi/lib/native/Linux/x86_64/*.so"
+
+pkg_setup() {
+ enewgroup unifi
+ enewuser unifi -1 -1 /var/lib/unifi unifi
+}
+
+src_prepare() {
+ # Remove unneeded files Linux, Mac and Windows
+ rm -r lib/native/Linux/{aarch64,armv7} lib/native/{Mac,Windows} || die
+
+ default
+}
+
+src_install() {
+ # Install MongoDB wrapper script, to avoid problems with >= 3.6.0
+ # See https://community.ubnt.com/t5/UniFi-Routing-Switching/MongoDB-3-6/td-p/2195435
+ exeinto /usr/lib/unifi/bin
+ newexe "${FILESDIR}"/mongod-wrapper mongod
+
+ insinto /usr/lib/unifi
+ doins -r dl lib webapps
+
+ diropts -o unifi -g unifi
+ keepdir /var/lib/unifi/{conf,data,run,tmp,work} /var/log/unifi
+
+ for symlink in conf data run tmp work; do
+ dosym ../../../var/lib/unifi/${symlink} /usr/lib/unifi/${symlink}
+ done
+ dosym ../../../var/log/unifi /usr/lib/unifi/logs
+
+ newinitd "${FILESDIR}"/unifi.initd-r1 unifi
+ systemd_dounit "${FILESDIR}"/unifi.service
+
+ newconfd "${FILESDIR}"/unifi.confd unifi
+
+ echo 'CONFIG_PROTECT="/var/lib/unifi"' > "${T}"/99unifi || die
+ doenvd "${T}"/99unifi
+
+ einstalldocs
+}
diff --git a/net-wireless/unifi/unifi-5.7.28.ebuild b/net-wireless/unifi/unifi-5.7.28.ebuild
new file mode 100644
index 000000000000..bc8c89abc804
--- /dev/null
+++ b/net-wireless/unifi/unifi-5.7.28.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# Used, when it's an unstable, beta or release candidate
+RC_SUFFIX="-5c442c6b54"
+
+inherit systemd user
+
+DESCRIPTION="A Management Controller for Ubiquiti Networks UniFi APs"
+HOMEPAGE="https://www.ubnt.com"
+SRC_URI="https://dl.ubnt.com/unifi/${PV}${RC_SUFFIX}/UniFi.unix.zip -> ${P}.zip"
+
+KEYWORDS="~amd64 ~x86"
+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"
+SLOT="0/5.7"
+
+RDEPEND="dev-db/mongodb
+ virtual/jre:1.8"
+
+DEPEND="app-arch/unzip"
+
+RESTRICT="bindist mirror"
+
+S="${WORKDIR}/UniFi"
+
+DOCS=( "readme.txt" )
+
+QA_PREBUILT="usr/lib/unifi/lib/native/Linux/x86_64/*.so"
+
+pkg_setup() {
+ enewgroup unifi
+ enewuser unifi -1 -1 /var/lib/unifi unifi
+}
+
+src_prepare() {
+ # Remove unneeded files Linux, Mac and Windows
+ rm -r lib/native/Linux/{aarch64,armv7} lib/native/{Mac,Windows} || die
+
+ default
+}
+
+src_install() {
+ # Install MongoDB wrapper script, to avoid problems with >= 3.6.0
+ # See https://community.ubnt.com/t5/UniFi-Routing-Switching/MongoDB-3-6/td-p/2195435
+ exeinto /usr/lib/unifi/bin
+ newexe "${FILESDIR}"/mongod-wrapper mongod
+
+ insinto /usr/lib/unifi
+ doins -r dl lib webapps
+
+ diropts -o unifi -g unifi
+ keepdir /var/lib/unifi/{conf,data,run,tmp,work} /var/log/unifi
+
+ for symlink in conf data run tmp work; do
+ dosym ../../../var/lib/unifi/${symlink} /usr/lib/unifi/${symlink}
+ done
+ dosym ../../../var/log/unifi /usr/lib/unifi/logs
+
+ newinitd "${FILESDIR}"/unifi.initd unifi
+ systemd_dounit "${FILESDIR}"/unifi.service
+
+ newconfd "${FILESDIR}"/unifi.confd unifi
+
+ echo 'CONFIG_PROTECT="/var/lib/unifi"' > "${T}"/99unifi || die
+ doenvd "${T}"/99unifi
+
+ einstalldocs
+}
diff --git a/net-wireless/unifi/unifi-5.8.23-r1.ebuild b/net-wireless/unifi/unifi-5.8.23-r1.ebuild
new file mode 100644
index 000000000000..0bf53df426d5
--- /dev/null
+++ b/net-wireless/unifi/unifi-5.8.23-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# Used, when it's an unstable, beta or release candidate
+RC_SUFFIX="-d5a5bbfda4"
+
+inherit systemd user
+
+DESCRIPTION="A Management Controller for Ubiquiti Networks UniFi APs"
+HOMEPAGE="https://www.ubnt.com"
+SRC_URI="https://dl.ubnt.com/unifi/${PV}${RC_SUFFIX}/UniFi.unix.zip -> ${P}.zip"
+
+KEYWORDS="~amd64 ~x86"
+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"
+SLOT="0/5.8"
+
+RDEPEND="dev-db/mongodb
+ virtual/jre:1.8"
+
+DEPEND="app-arch/unzip"
+
+RESTRICT="bindist mirror"
+
+S="${WORKDIR}/UniFi"
+
+DOCS=( "readme.txt" )
+
+QA_PREBUILT="usr/lib/unifi/lib/native/Linux/x86_64/*.so"
+
+pkg_setup() {
+ enewgroup unifi
+ enewuser unifi -1 -1 /var/lib/unifi unifi
+}
+
+src_prepare() {
+ # Remove unneeded files Linux, Mac and Windows
+ rm -r lib/native/Linux/{aarch64,armv7} lib/native/{Mac,Windows} || die
+
+ default
+}
+
+src_install() {
+ # Install MongoDB wrapper script, to avoid problems with >= 3.6.0
+ # See https://community.ubnt.com/t5/UniFi-Routing-Switching/MongoDB-3-6/td-p/2195435
+ exeinto /usr/lib/unifi/bin
+ newexe "${FILESDIR}"/mongod-wrapper mongod
+
+ insinto /usr/lib/unifi
+ doins -r dl lib webapps
+
+ diropts -o unifi -g unifi
+ keepdir /var/lib/unifi/{conf,data,run,tmp,work} /var/log/unifi
+
+ for symlink in conf data run tmp work; do
+ dosym ../../../var/lib/unifi/${symlink} /usr/lib/unifi/${symlink}
+ done
+ dosym ../../../var/log/unifi /usr/lib/unifi/logs
+
+ newinitd "${FILESDIR}"/unifi.initd-r1 unifi
+ systemd_dounit "${FILESDIR}"/unifi.service
+
+ newconfd "${FILESDIR}"/unifi.confd unifi
+
+ echo 'CONFIG_PROTECT="/var/lib/unifi"' > "${T}"/99unifi || die
+ doenvd "${T}"/99unifi
+
+ einstalldocs
+}
diff --git a/net-wireless/unifi/unifi-5.8.23.ebuild b/net-wireless/unifi/unifi-5.8.23.ebuild
new file mode 100644
index 000000000000..265ecf2d858d
--- /dev/null
+++ b/net-wireless/unifi/unifi-5.8.23.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# Used, when it's an unstable, beta or release candidate
+RC_SUFFIX="-d5a5bbfda4"
+
+inherit systemd user
+
+DESCRIPTION="A Management Controller for Ubiquiti Networks UniFi APs"
+HOMEPAGE="https://www.ubnt.com"
+SRC_URI="https://dl.ubnt.com/unifi/${PV}${RC_SUFFIX}/UniFi.unix.zip -> ${P}.zip"
+
+KEYWORDS="~amd64 ~x86"
+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"
+SLOT="0/5.8"
+
+RDEPEND="dev-db/mongodb
+ virtual/jre:1.8"
+
+DEPEND="app-arch/unzip"
+
+RESTRICT="bindist mirror"
+
+S="${WORKDIR}/UniFi"
+
+DOCS=( "readme.txt" )
+
+QA_PREBUILT="usr/lib/unifi/lib/native/Linux/x86_64/*.so"
+
+pkg_setup() {
+ enewgroup unifi
+ enewuser unifi -1 -1 /var/lib/unifi unifi
+}
+
+src_prepare() {
+ # Remove unneeded files Linux, Mac and Windows
+ rm -r lib/native/Linux/{aarch64,armv7} lib/native/{Mac,Windows} || die
+
+ default
+}
+
+src_install() {
+ # Install MongoDB wrapper script, to avoid problems with >= 3.6.0
+ # See https://community.ubnt.com/t5/UniFi-Routing-Switching/MongoDB-3-6/td-p/2195435
+ exeinto /usr/lib/unifi/bin
+ newexe "${FILESDIR}"/mongod-wrapper mongod
+
+ insinto /usr/lib/unifi
+ doins -r dl lib webapps
+
+ diropts -o unifi -g unifi
+ keepdir /var/lib/unifi/{conf,data,run,tmp,work} /var/log/unifi
+
+ for symlink in conf data run tmp work; do
+ dosym ../../../var/lib/unifi/${symlink} /usr/lib/unifi/${symlink}
+ done
+ dosym ../../../var/log/unifi /usr/lib/unifi/logs
+
+ newinitd "${FILESDIR}"/unifi.initd unifi
+ systemd_dounit "${FILESDIR}"/unifi.service
+
+ newconfd "${FILESDIR}"/unifi.confd unifi
+
+ echo 'CONFIG_PROTECT="/var/lib/unifi"' > "${T}"/99unifi || die
+ doenvd "${T}"/99unifi
+
+ einstalldocs
+}
diff --git a/net-wireless/unifi/unifi-5.8.24.ebuild b/net-wireless/unifi/unifi-5.8.24.ebuild
new file mode 100644
index 000000000000..307f0db8a4f1
--- /dev/null
+++ b/net-wireless/unifi/unifi-5.8.24.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# Used, when it's an unstable, beta or release candidate
+RC_SUFFIX=""
+
+inherit systemd user
+
+DESCRIPTION="A Management Controller for Ubiquiti Networks UniFi APs"
+HOMEPAGE="https://www.ubnt.com"
+SRC_URI="https://dl.ubnt.com/unifi/${PV}${RC_SUFFIX}/UniFi.unix.zip -> ${P}.zip"
+
+KEYWORDS="~amd64 ~x86"
+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"
+SLOT="0/5.8"
+
+RDEPEND="dev-db/mongodb
+ virtual/jre:1.8"
+
+DEPEND="app-arch/unzip"
+
+RESTRICT="bindist mirror"
+
+S="${WORKDIR}/UniFi"
+
+DOCS=( "readme.txt" )
+
+QA_PREBUILT="usr/lib/unifi/lib/native/Linux/x86_64/*.so"
+
+pkg_setup() {
+ enewgroup unifi
+ enewuser unifi -1 -1 /var/lib/unifi unifi
+}
+
+src_prepare() {
+ # Remove unneeded files Linux, Mac and Windows
+ rm -r lib/native/Linux/{aarch64,armv7} lib/native/{Mac,Windows} || die
+
+ default
+}
+
+src_install() {
+ # Install MongoDB wrapper script, to avoid problems with >= 3.6.0
+ # See https://community.ubnt.com/t5/UniFi-Routing-Switching/MongoDB-3-6/td-p/2195435
+ exeinto /usr/lib/unifi/bin
+ newexe "${FILESDIR}"/mongod-wrapper mongod
+
+ insinto /usr/lib/unifi
+ doins -r dl lib webapps
+
+ diropts -o unifi -g unifi
+ keepdir /var/lib/unifi/{conf,data,run,tmp,work} /var/log/unifi
+
+ for symlink in conf data run tmp work; do
+ dosym ../../../var/lib/unifi/${symlink} /usr/lib/unifi/${symlink}
+ done
+ dosym ../../../var/log/unifi /usr/lib/unifi/logs
+
+ newinitd "${FILESDIR}"/unifi.initd-r1 unifi
+ systemd_dounit "${FILESDIR}"/unifi.service
+
+ newconfd "${FILESDIR}"/unifi.confd unifi
+
+ echo 'CONFIG_PROTECT="/var/lib/unifi"' > "${T}"/99unifi || die
+ doenvd "${T}"/99unifi
+
+ einstalldocs
+}
diff --git a/net-wireless/unifi/unifi-5.9.4-r1.ebuild b/net-wireless/unifi/unifi-5.9.4-r1.ebuild
new file mode 100644
index 000000000000..c678667c4e7f
--- /dev/null
+++ b/net-wireless/unifi/unifi-5.9.4-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# Used, when it's an unstable, beta or release candidate
+RC_SUFFIX="-b647df56b7"
+
+inherit systemd user
+
+DESCRIPTION="A Management Controller for Ubiquiti Networks UniFi APs"
+HOMEPAGE="https://www.ubnt.com"
+SRC_URI="https://dl.ubnt.com/unifi/${PV}${RC_SUFFIX}/UniFi.unix.zip -> ${P}.zip"
+
+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"
+SLOT="0/5.9"
+
+RDEPEND="dev-db/mongodb
+ virtual/jre:1.8"
+
+DEPEND="app-arch/unzip"
+
+RESTRICT="bindist mirror"
+
+S="${WORKDIR}/UniFi"
+
+DOCS=( "readme.txt" )
+
+QA_PREBUILT="usr/lib/unifi/lib/native/Linux/x86_64/*.so"
+
+pkg_setup() {
+ enewgroup unifi
+ enewuser unifi -1 -1 /var/lib/unifi unifi
+}
+
+src_prepare() {
+ # Remove unneeded files Linux, Mac and Windows
+ rm -r lib/native/Linux/{aarch64,armv7} lib/native/{Mac,Windows} || die
+
+ default
+}
+
+src_install() {
+ # Install MongoDB wrapper script, to avoid problems with >= 3.6.0
+ # See https://community.ubnt.com/t5/UniFi-Routing-Switching/MongoDB-3-6/td-p/2195435
+ exeinto /usr/lib/unifi/bin
+ newexe "${FILESDIR}"/mongod-wrapper mongod
+
+ insinto /usr/lib/unifi
+ doins -r dl lib webapps
+
+ diropts -o unifi -g unifi
+ keepdir /var/lib/unifi/{conf,data,run,tmp,work} /var/log/unifi
+
+ for symlink in conf data run tmp work; do
+ dosym ../../../var/lib/unifi/${symlink} /usr/lib/unifi/${symlink}
+ done
+ dosym ../../../var/log/unifi /usr/lib/unifi/logs
+
+ newinitd "${FILESDIR}"/unifi.initd-r1 unifi
+ systemd_dounit "${FILESDIR}"/unifi.service
+
+ newconfd "${FILESDIR}"/unifi.confd unifi
+
+ echo 'CONFIG_PROTECT="/var/lib/unifi"' > "${T}"/99unifi || die
+ doenvd "${T}"/99unifi
+
+ einstalldocs
+}
diff --git a/net-wireless/unifi/unifi-5.9.4.ebuild b/net-wireless/unifi/unifi-5.9.4.ebuild
new file mode 100644
index 000000000000..9ca7b2b27c36
--- /dev/null
+++ b/net-wireless/unifi/unifi-5.9.4.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# Used, when it's an unstable, beta or release candidate
+RC_SUFFIX="-b647df56b7"
+
+inherit systemd user
+
+DESCRIPTION="A Management Controller for Ubiquiti Networks UniFi APs"
+HOMEPAGE="https://www.ubnt.com"
+SRC_URI="https://dl.ubnt.com/unifi/${PV}${RC_SUFFIX}/UniFi.unix.zip -> ${P}.zip"
+
+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"
+SLOT="0/5.9"
+
+RDEPEND="dev-db/mongodb
+ virtual/jre:1.8"
+
+DEPEND="app-arch/unzip"
+
+RESTRICT="bindist mirror"
+
+S="${WORKDIR}/UniFi"
+
+DOCS=( "readme.txt" )
+
+QA_PREBUILT="usr/lib/unifi/lib/native/Linux/x86_64/*.so"
+
+pkg_setup() {
+ enewgroup unifi
+ enewuser unifi -1 -1 /var/lib/unifi unifi
+}
+
+src_prepare() {
+ # Remove unneeded files Linux, Mac and Windows
+ rm -r lib/native/Linux/{aarch64,armv7} lib/native/{Mac,Windows} || die
+
+ default
+}
+
+src_install() {
+ # Install MongoDB wrapper script, to avoid problems with >= 3.6.0
+ # See https://community.ubnt.com/t5/UniFi-Routing-Switching/MongoDB-3-6/td-p/2195435
+ exeinto /usr/lib/unifi/bin
+ newexe "${FILESDIR}"/mongod-wrapper mongod
+
+ insinto /usr/lib/unifi
+ doins -r dl lib webapps
+
+ diropts -o unifi -g unifi
+ keepdir /var/lib/unifi/{conf,data,run,tmp,work} /var/log/unifi
+
+ for symlink in conf data run tmp work; do
+ dosym ../../../var/lib/unifi/${symlink} /usr/lib/unifi/${symlink}
+ done
+ dosym ../../../var/log/unifi /usr/lib/unifi/logs
+
+ newinitd "${FILESDIR}"/unifi.initd unifi
+ systemd_dounit "${FILESDIR}"/unifi.service
+
+ newconfd "${FILESDIR}"/unifi.confd unifi
+
+ echo 'CONFIG_PROTECT="/var/lib/unifi"' > "${T}"/99unifi || die
+ doenvd "${T}"/99unifi
+
+ einstalldocs
+}