commit: 0c5276e4940f2bbd352653c2e3efdeeb9b6cfc81
Author: Ben Kohler gentoo org>
AuthorDate: Tue Jun 26 00:49:41 2018 +
Commit: Ben Kohler gentoo org>
CommitDate: Tue Jun 26 00:49:41 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c5276e4
media-video/unifi-video: new package
Package-Manager: Portage-2.3.40, Repoman-2.3.9
media-video/unifi-video/Manifest | 1 +
.../unifi-video/files/commons-daemon-move.patch| 12
media-video/unifi-video/files/mongod-wrapper | 3 +
media-video/unifi-video/files/unifi-video.confd| 0
media-video/unifi-video/files/unifi-video.initd| 20 ++
media-video/unifi-video/files/unifi-video.service | 11 +++
media-video/unifi-video/metadata.xml | 9 +++
media-video/unifi-video/unifi-video-3.9.7.ebuild | 83 ++
8 files changed, 139 insertions(+)
diff --git a/media-video/unifi-video/Manifest b/media-video/unifi-video/Manifest
new file mode 100644
index 000..db2ca191aa8
--- /dev/null
+++ b/media-video/unifi-video/Manifest
@@ -0,0 +1 @@
+DIST unifi-video.Ubuntu16.04_amd64.v3.9.7.deb 117374890 BLAKE2B
b0f274da3052471472cd2405ec0a5d79fd97cbc30f014ede42a004dcffc4d27b9b5ecc36f32b4f60f8c47ba73b85795d2851345f5472b85192cf836bfb929173
SHA512
9a0f48d81f3935baad4004681cabe2ff46f4f86f8770c260c98fbd724de2949427de8ec706d86d612a9ccbcda69ca227aa4a123c3208e0a4ab7c0a51540c06f8
diff --git a/media-video/unifi-video/files/commons-daemon-move.patch
b/media-video/unifi-video/files/commons-daemon-move.patch
new file mode 100644
index 000..448f77249e8
--- /dev/null
+++ b/media-video/unifi-video/files/commons-daemon-move.patch
@@ -0,0 +1,12 @@
+--- a/usr/sbin/unifi-video
b/usr/sbin/unifi-video
+@@ -271,7 +271,7 @@
+ JSVC_OPTS="${JSVC_OPTS} \
+ -user ${PKGUSER} \
+ -home ${JAVA_HOME} \
+- -cp /usr/share/java/commons-daemon.jar:${MAINJAR} \
++ -cp /usr/share/commons-daemon/lib/commons-daemon.jar:${MAINJAR} \
+ -pidfile ${PIDFILE} \
+ -procname ${NAME} \
+ ${JSVC_EXTRA_OPTS} \
+
diff --git a/media-video/unifi-video/files/mongod-wrapper
b/media-video/unifi-video/files/mongod-wrapper
new file mode 100755
index 000..f2eb2a43752
--- /dev/null
+++ b/media-video/unifi-video/files/mongod-wrapper
@@ -0,0 +1,3 @@
+#!/bin/bash
+cleaned_args=$(echo $* | sed -e 's/--nohttpinterface//')
+/usr/bin/mongod ${cleaned_args}
diff --git a/media-video/unifi-video/files/unifi-video.confd
b/media-video/unifi-video/files/unifi-video.confd
new file mode 100644
index 000..e69de29bb2d
diff --git a/media-video/unifi-video/files/unifi-video.initd
b/media-video/unifi-video/files/unifi-video.initd
new file mode 100644
index 000..55d6e805453
--- /dev/null
+++ b/media-video/unifi-video/files/unifi-video.initd
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+PID_FILE="/run/unifi-video.pid"
+
+start() {
+ ebegin "Starting unifi-video"
+ start-stop-daemon --start --quiet -b \
+ --pidfile "${PID_FILE}" -m \
+ --exec /usr/sbin/unifi-video start
+ eend $?
+ #--user nobody --group nobody \
+}
+
+stop() {
+ ebegin "Stopping unifi-video"
+ start-stop-daemon --quiet --stop -R 20 --pidfile "${PID_FILE}"
+ eend $?
+}
diff --git a/media-video/unifi-video/files/unifi-video.service
b/media-video/unifi-video/files/unifi-video.service
new file mode 100644
index 000..6587be4f1ca
--- /dev/null
+++ b/media-video/unifi-video/files/unifi-video.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=UniFi Video Server
+Requires=network.target
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/unifi-video -D start
+ExecStop=/usr/sbin/unifi-video -D stop
+
+[Install]
+WantedBy=network.target
diff --git a/media-video/unifi-video/metadata.xml
b/media-video/unifi-video/metadata.xml
new file mode 100644
index 000..ee9a82ac417
--- /dev/null
+++ b/media-video/unifi-video/metadata.xml
@@ -0,0 +1,9 @@
+
+http://www.gentoo.org/dtd/metadata.dtd;>
+
+
+ bkoh...@gentoo.org
+ Ben Kohler
+
+
+
diff --git a/media-video/unifi-video/unifi-video-3.9.7.ebuild
b/media-video/unifi-video/unifi-video-3.9.7.ebuild
new file mode 100644
index 000..be829f6a0a9
--- /dev/null
+++ b/media-video/unifi-video/unifi-video-3.9.7.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd user
+
+MY_PV="${PV/_beta/-beta.}"
+DESCRIPTION="UniFi Video Server"
+HOMEPAGE="https://www.ubnt.com/download/unifi-video/;
+SRC_URI="https://dl.ubnt.com/firmwares/ufv/v${MY_PV}/unifi-video.Ubuntu16.04_amd64.v${MY_PV}.deb;
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+RESTRICT="mirror"
+
+DEPEND=""
+RDEPEND="dev-db/mongodb
+ dev-java/commons-daemon
+ sys-apps/lsb-release
+