summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Kohler <bkohler@gentoo.org>2018-06-25 19:02:29 -0500
committerBen Kohler <bkohler@gentoo.org>2018-06-25 19:03:16 -0500
commit6d09f5cde33491d5505b27b088bce0306b1c1040 (patch)
treeb8ec6574ac7392a00d56bf02f075fb5903f1b700 /net-wireless
parentapp-backup/spideroak-bin: Downgrade to 7.2.0 (diff)
downloadgentoo-6d09f5cde33491d5505b27b088bce0306b1c1040.tar.gz
gentoo-6d09f5cde33491d5505b27b088bce0306b1c1040.tar.bz2
gentoo-6d09f5cde33491d5505b27b088bce0306b1c1040.zip
net-wireless/unifi: new package
Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'net-wireless')
-rw-r--r--net-wireless/unifi/Manifest4
-rwxr-xr-xnet-wireless/unifi/files/mongod-wrapper3
-rw-r--r--net-wireless/unifi/files/unifi.confd6
-rw-r--r--net-wireless/unifi/files/unifi.initd23
-rw-r--r--net-wireless/unifi/files/unifi.service14
-rw-r--r--net-wireless/unifi/files/unifi.service.conf4
-rw-r--r--net-wireless/unifi/metadata.xml9
-rw-r--r--net-wireless/unifi/unifi-5.6.39.ebuild58
-rw-r--r--net-wireless/unifi/unifi-5.7.28.ebuild58
-rw-r--r--net-wireless/unifi/unifi-5.8.23.ebuild63
-rw-r--r--net-wireless/unifi/unifi-5.9.4.ebuild63
11 files changed, 305 insertions, 0 deletions
diff --git a/net-wireless/unifi/Manifest b/net-wireless/unifi/Manifest
new file mode 100644
index 000000000000..7b86edb3788b
--- /dev/null
+++ b/net-wireless/unifi/Manifest
@@ -0,0 +1,4 @@
+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.9.4.zip 102808708 BLAKE2B 3b1479bd65837667f2abff594426ecc3491475d1cf6d842d07cdc8868cabf59facc857263fcfb1ef30fdb8dbb4c0a037b7e04736b8debf0f4f795494fc62ee26 SHA512 01e2d8c2d48a552e3b5d03cb97b0241e0561a4c88e52f13ec2d2a8a8b7d75ba7d9eb7878e37876efe5581e439afaac359ae6e3e7b2bb3d0719ebdbb10b06778c
diff --git a/net-wireless/unifi/files/mongod-wrapper b/net-wireless/unifi/files/mongod-wrapper
new file mode 100755
index 000000000000..f2eb2a437520
--- /dev/null
+++ b/net-wireless/unifi/files/mongod-wrapper
@@ -0,0 +1,3 @@
+#!/bin/bash
+cleaned_args=$(echo $* | sed -e 's/--nohttpinterface//')
+/usr/bin/mongod ${cleaned_args}
diff --git a/net-wireless/unifi/files/unifi.confd b/net-wireless/unifi/files/unifi.confd
new file mode 100644
index 000000000000..78a59910ac49
--- /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
+
+# /etc/conf.d/unifi.conf
+
+#JAVA_HOME="/usr"
diff --git a/net-wireless/unifi/files/unifi.initd b/net-wireless/unifi/files/unifi.initd
new file mode 100644
index 000000000000..7aded2123df5
--- /dev/null
+++ b/net-wireless/unifi/files/unifi.initd
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+PID_FILE="/run/unifi.pid"
+DAEMON="${JAVA_HOME-/usr}"/bin/java
+UNIFI_PATH="/usr/lib/unifi"
+
+start() {
+ ebegin "Starting unifi"
+ cd "${UNIFI_PATH}"
+ start-stop-daemon --start --quiet -b \
+ --pidfile "${PID_FILE}" -m \
+ --exec ${DAEMON} -- -jar lib/ace.jar start
+ eend $?
+ #--user nobody --group nobody \
+}
+
+stop() {
+ ebegin "Stopping unifi"
+ start-stop-daemon --quiet --stop -R 20 --pidfile "${PID_FILE}"
+ eend $?
+}
diff --git a/net-wireless/unifi/files/unifi.service b/net-wireless/unifi/files/unifi.service
new file mode 100644
index 000000000000..11385a0e913b
--- /dev/null
+++ b/net-wireless/unifi/files/unifi.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=UniFi Controller
+Requires=network.target
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/java -jar /usr/lib/unifi/lib/ace.jar start
+ExecStop=/usr/bin/java -jar /usr/lib/unifi/lib/ace.jar stop
+User=unifi
+Group=unifi
+WorkingDirectory=/usr/lib/unifi
+
+[Install]
+WantedBy=network.target
diff --git a/net-wireless/unifi/files/unifi.service.conf b/net-wireless/unifi/files/unifi.service.conf
new file mode 100644
index 000000000000..0ef221d3b734
--- /dev/null
+++ b/net-wireless/unifi/files/unifi.service.conf
@@ -0,0 +1,4 @@
+[Service]
+RuntimeDirectory=unifi
+User=unifi
+Group=unifi
diff --git a/net-wireless/unifi/metadata.xml b/net-wireless/unifi/metadata.xml
new file mode 100644
index 000000000000..ee9a82ac4170
--- /dev/null
+++ b/net-wireless/unifi/metadata.xml
@@ -0,0 +1,9 @@
+<?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>
+</pkgmetadata>
+
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..cd3ade4f06f4
--- /dev/null
+++ b/net-wireless/unifi/unifi-5.6.39.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd user
+
+# for stable candidates set RC_SUFFIX="-xxxxxxxxxx"
+RC_SUFFIX=""
+
+DESCRIPTION="Management Controller for UniFi APs"
+HOMEPAGE="https://www.ubnt.com/download/unifi"
+SRC_URI="http://dl.ubnt.com/unifi/${PV}${RC_SUFFIX}/UniFi.unix.zip -> ${P}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+RESTRICT="mirror"
+
+DEPEND=""
+RDEPEND="dev-db/mongodb
+ virtual/jre"
+
+S=${WORKDIR}/UniFi
+QA_PREBUILT="/usr/lib64/unifi/lib/native/*"
+
+pkg_setup() {
+ enewuser ${PN}
+ enewgroup ${PN}
+}
+
+src_install(){
+ static_dir="/usr/$(get_libdir)/${PN}"
+ #install static data
+ insinto ${static_dir}
+ doins -r *
+ #prepare runtime-data dirs which live in /var but are symlinked from static
+ #data dir, and are writable by non-root user
+ dodir /var/log/${PN}
+ fowners ${PN}:${PN} /var/log/${PN}
+ dosym ../../../var/log/${PN} ${static_dir}/logs
+
+ dodir /var/lib/${PN}/work
+ fowners ${PN}:${PN} /var/lib/${PN}/work
+ dosym ../../../var/lib/${PN}/work ${static_dir}/work
+
+ keepdir /var/lib/${PN}/data
+ fowners ${PN}:${PN} /var/lib/${PN}/data
+ dosym ../../../var/lib/${PN}/data ${static_dir}/data
+
+ echo "CONFIG_PROTECT=\"/var/lib/${PN}/data/system.properties\"" > "${T}"/99${PN}
+ doenvd "${T}"/99${PN}
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
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..0e23b1ca6d59
--- /dev/null
+++ b/net-wireless/unifi/unifi-5.7.28.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd user
+
+# for not-stable releases set RC_SUFFIX="-xxxxxxxxxx"
+RC_SUFFIX="-5c442c6b54"
+
+DESCRIPTION="Management Controller for UniFi APs"
+HOMEPAGE="https://www.ubnt.com/download/unifi"
+SRC_URI="http://dl.ubnt.com/unifi/${PV}${RC_SUFFIX}/UniFi.unix.zip -> ${P}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+RESTRICT="mirror"
+
+DEPEND=""
+RDEPEND="dev-db/mongodb
+ virtual/jre"
+
+S=${WORKDIR}/UniFi
+QA_PREBUILT="/usr/lib64/unifi/lib/native/*"
+
+pkg_setup() {
+ enewuser ${PN}
+ enewgroup ${PN}
+}
+
+src_install(){
+ static_dir="/usr/$(get_libdir)/${PN}"
+ #install static data
+ insinto ${static_dir}
+ doins -r *
+ #prepare runtime-data dirs which live in /var but are symlinked from static
+ #data dir, and are writable by non-root user
+ dodir /var/log/${PN}
+ fowners ${PN}:${PN} /var/log/${PN}
+ dosym ../../../var/log/${PN} ${static_dir}/logs
+
+ dodir /var/lib/${PN}/work
+ fowners ${PN}:${PN} /var/lib/${PN}/work
+ dosym ../../../var/lib/${PN}/work ${static_dir}/work
+
+ keepdir /var/lib/${PN}/data
+ fowners ${PN}:${PN} /var/lib/${PN}/data
+ dosym ../../../var/lib/${PN}/data ${static_dir}/data
+
+ echo "CONFIG_PROTECT=\"/var/lib/${PN}/data/system.properties\"" > "${T}"/99${PN}
+ doenvd "${T}"/99${PN}
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
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..ea971a293b13
--- /dev/null
+++ b/net-wireless/unifi/unifi-5.8.23.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd user
+
+# for not-stable releases set RC_SUFFIX="-xxxxxxxxxx"
+RC_SUFFIX=""
+
+DESCRIPTION="Management Controller for UniFi APs"
+HOMEPAGE="https://www.ubnt.com/download/unifi"
+SRC_URI="http://dl.ubnt.com/unifi/${PV}${RC_SUFFIX}/UniFi.unix.zip -> ${P}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+RESTRICT="mirror"
+
+DEPEND=""
+RDEPEND="dev-db/mongodb
+ virtual/jre"
+
+S=${WORKDIR}/UniFi
+QA_PREBUILT="/usr/lib64/unifi/lib/native/*"
+
+pkg_setup() {
+ enewuser ${PN}
+ enewgroup ${PN}
+}
+
+src_install(){
+ static_dir="/usr/$(get_libdir)/${PN}"
+ #install static data
+ insinto ${static_dir}
+ doins -r *
+
+ #wrapper to work around mongodb-3.6 compat issue
+ exeinto ${static_dir}/bin/
+ newexe "${FILESDIR}"/mongod-wrapper mongod
+
+ #prepare runtime-data dirs which live in /var but are symlinked from static
+ #data dir, and are writable by non-root user
+ dodir /var/log/${PN}
+ fowners ${PN}:${PN} /var/log/${PN}
+ dosym ../../../var/log/${PN} ${static_dir}/logs
+
+ dodir /var/lib/${PN}/work
+ fowners ${PN}:${PN} /var/lib/${PN}/work
+ dosym ../../../var/lib/${PN}/work ${static_dir}/work
+
+ keepdir /var/lib/${PN}/data
+ fowners ${PN}:${PN} /var/lib/${PN}/data
+ dosym ../../../var/lib/${PN}/data ${static_dir}/data
+
+ echo "CONFIG_PROTECT=\"/var/lib/${PN}/data/system.properties\"" > "${T}"/99${PN}
+ doenvd "${T}"/99${PN}
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
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..b51420746ef7
--- /dev/null
+++ b/net-wireless/unifi/unifi-5.9.4.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd user
+
+# for not-stable releases set RC_SUFFIX="-xxxxxxxxxx"
+RC_SUFFIX="-b647df56b7"
+
+DESCRIPTION="Management Controller for UniFi APs"
+HOMEPAGE="https://www.ubnt.com/download/unifi"
+SRC_URI="http://dl.ubnt.com/unifi/${PV}${RC_SUFFIX}/UniFi.unix.zip -> ${P}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+#KEYWORDS="~amd64"
+IUSE=""
+RESTRICT="mirror"
+
+DEPEND=""
+RDEPEND="dev-db/mongodb
+ virtual/jre"
+
+S=${WORKDIR}/UniFi
+QA_PREBUILT="/usr/lib64/unifi/lib/native/*"
+
+pkg_setup() {
+ enewuser ${PN}
+ enewgroup ${PN}
+}
+
+src_install(){
+ static_dir="/usr/$(get_libdir)/${PN}"
+ #install static data
+ insinto ${static_dir}
+ doins -r *
+
+ #wrapper to work around mongodb-3.6 compat issue
+ exeinto ${static_dir}/bin/
+ newexe "${FILESDIR}"/mongod-wrapper mongod
+
+ #prepare runtime-data dirs which live in /var but are symlinked from static
+ #data dir, and are writable by non-root user
+ dodir /var/log/${PN}
+ fowners ${PN}:${PN} /var/log/${PN}
+ dosym ../../../var/log/${PN} ${static_dir}/logs
+
+ dodir /var/lib/${PN}/work
+ fowners ${PN}:${PN} /var/lib/${PN}/work
+ dosym ../../../var/lib/${PN}/work ${static_dir}/work
+
+ keepdir /var/lib/${PN}/data
+ fowners ${PN}:${PN} /var/lib/${PN}/data
+ dosym ../../../var/lib/${PN}/data ${static_dir}/data
+
+ echo "CONFIG_PROTECT=\"/var/lib/${PN}/data/system.properties\"" > "${T}"/99${PN}
+ doenvd "${T}"/99${PN}
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}