diff options
author | Ben Kohler <bkohler@gentoo.org> | 2018-06-29 08:58:30 -0500 |
---|---|---|
committer | Ben Kohler <bkohler@gentoo.org> | 2018-06-29 09:12:58 -0500 |
commit | 7751ceea39908447f08e3c87522158bd87212897 (patch) | |
tree | a1a0afdaa351a050d9170b0f5098e4f29880d551 /net-wireless | |
parent | dev-ada/gnatcoll-bindings: Fix used C compiler (diff) | |
download | gentoo-7751ceea39908447f08e3c87522158bd87212897.tar.gz gentoo-7751ceea39908447f08e3c87522158bd87212897.tar.bz2 gentoo-7751ceea39908447f08e3c87522158bd87212897.zip |
net-wireless/unifi: revbumps for revised init script
This new init script should handle stop & restart much more nicely.
Also it's been simplified a bit, moving much of the long s-s-d command
into relevant variables. Thanks ConiKost.
Package-Manager: Portage-2.3.41, Repoman-2.3.9
Diffstat (limited to 'net-wireless')
-rw-r--r-- | net-wireless/unifi/files/unifi.initd-r1 | 25 | ||||
-rw-r--r-- | net-wireless/unifi/unifi-5.6.39-r1.ebuild | 70 | ||||
-rw-r--r-- | net-wireless/unifi/unifi-5.7.28-r1.ebuild | 70 | ||||
-rw-r--r-- | net-wireless/unifi/unifi-5.8.23-r1.ebuild | 70 | ||||
-rw-r--r-- | net-wireless/unifi/unifi-5.9.4-r1.ebuild | 69 |
5 files changed, 304 insertions, 0 deletions
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/unifi-5.6.39-r1.ebuild b/net-wireless/unifi/unifi-5.6.39-r1.ebuild new file mode 100644 index 000000000000..b96d147f49c2 --- /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/{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-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.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.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 +} |