summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2022-04-10 17:15:19 +0200
committerConrad Kostecki <conikost@gentoo.org>2022-04-10 17:24:49 +0200
commiteeaac5e6063359e940fd8599bea9cd130b68c4c5 (patch)
treec2ce64700e3677771fa05384f279aca47e882bf1 /net-wireless
parentdev-java/fop: Enable tests on fop-core (diff)
downloadgentoo-eeaac5e6063359e940fd8599bea9cd130b68c4c5.tar.gz
gentoo-eeaac5e6063359e940fd8599bea9cd130b68c4c5.tar.bz2
gentoo-eeaac5e6063359e940fd8599bea9cd130b68c4c5.zip
net-wireless/unifi: force java8
Closes: https://bugs.gentoo.org/792279 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'net-wireless')
-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/unifi-6.5.55-r1.ebuild (renamed from net-wireless/unifi/unifi-6.5.55.ebuild)15
3 files changed, 11 insertions, 43 deletions
diff --git a/net-wireless/unifi/files/unifi.initd-r1 b/net-wireless/unifi/files/unifi.initd-r1
deleted file mode 100644
index 2db36571dac0..000000000000
--- a/net-wireless/unifi/files/unifi.initd-r1
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/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
deleted file mode 100644
index 00c00d7f3c9e..000000000000
--- a/net-wireless/unifi/files/unifi.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[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/unifi-6.5.55.ebuild b/net-wireless/unifi/unifi-6.5.55-r1.ebuild
index 707826628a0b..aea001cc7e1f 100644
--- a/net-wireless/unifi/unifi-6.5.55.ebuild
+++ b/net-wireless/unifi/unifi-6.5.55-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -6,7 +6,7 @@ EAPI=8
# Set this var for any releases except stable
RC_SUFFIX="-1d0581c00d"
-inherit systemd
+inherit java-pkg-2 systemd
DESCRIPTION="A Management Controller for Ubiquiti Networks UniFi APs"
HOMEPAGE="https://www.ubnt.com"
@@ -65,6 +65,10 @@ src_prepare() {
default
}
+src_compile() {
+ :;
+}
+
src_install() {
insinto /usr/lib/unifi
doins -r bin dl lib webapps
@@ -77,8 +81,11 @@ src_install() {
done
dosym ../../../var/log/unifi /usr/lib/unifi/logs
- newinitd "${FILESDIR}"/unifi.initd-r1 unifi
- systemd_dounit "${FILESDIR}"/unifi.service
+ java-pkg_regjar "${D}"/usr/lib/unifi/lib/*.jar
+ java-pkg_dolauncher unifi --java_args '-Dorg.xerial.snappy.tempdir=/usr/lib/unifi/tmp -Djava.library.path=' --jar ace.jar --pwd '/usr/lib/unifi'
+
+ newinitd "${FILESDIR}"/unifi.initd-r2 unifi
+ systemd_newunit "${FILESDIR}"/unifi.service-r1 unifi.service
newconfd "${FILESDIR}"/unifi.confd unifi