media-video/unifi-video: bump to 3.10.5
authorBen Kohler <bkohler@gentoo.org>
Wed, 12 Jun 2019 19:25:16 +0000 (14:25 -0500)
committerBen Kohler <bkohler@gentoo.org>
Tue, 18 Jun 2019 16:21:38 +0000 (11:21 -0500)
Package-Manager: Portage-2.3.67, Repoman-2.3.14
Signed-off-by: Ben Kohler <bkohler@gentoo.org>
media-video/unifi-video/Manifest
media-video/unifi-video/unifi-video-3.10.5.ebuild [new file with mode: 0644]

index 7c232e6ec4d0aac6327b607f862ecdff4d588205..fe07e1f360a65b11bf5a768107273383be37a31e 100644 (file)
@@ -1,3 +1,4 @@
 DIST unifi-video.Ubuntu16.04_amd64.v3.10.1.deb 162379830 BLAKE2B 8183cf0ea37507059b87f5f51a377a12cb2f5fab31675eac720cffa2f9c60e46e6a8eb68279992703722ba40c3fbe7a9a723596ee20e31ccec0959841851325d SHA512 3ac83e3ff7beb8c765c8908b80c7747807da73e3a9e077a9f5a22aaf3e307c369258c7ea6651e18ca74b570d359fa65b6cbfce0017cb73cb916a2bc8614b374d
 DIST unifi-video.Ubuntu16.04_amd64.v3.10.4.deb 161279504 BLAKE2B a9bac456218a1908e67bcebeadd06672ce6de4a24e62cd99dedc6de4e36774047531e8b00429e0dc8eb536e6ad77de236d89da83edfbaef8d7a7feb04df6c482 SHA512 d45f97905078ee6f9911bbea239d72432dda849c5fa16a11c2576e1dac78a0b612e420ae59f11ff7bdfec3c7eca9396a72d249d4fc90f93f9e92c57571f19093
+DIST unifi-video.Ubuntu16.04_amd64.v3.10.5.deb 161280194 BLAKE2B ae326fe818261124fb8bd1939e55cc2dfa1bb8bfd3350bb5b94ec74fe9a7ec57853548dfbf8ddf33699e0281a5cb918926a6fb93b6de07339072bca51bab2a46 SHA512 4e431f72e5c51952bb7a1e97d6cab407e03d7a42cfaaed97cbf65dbc0b7ebec2a04675783bebed6d0a3d69b1ef5988f6af4770a9ce680258999c481ccefd0bd2
 DIST unifi-video.Ubuntu16.04_amd64.v3.9.12.deb 117448948 BLAKE2B 83769ec07fccbcd955115493510bcd58b88433b7d7204be29d6329674cf4d6dea7fe4b6aedd0e89f852d89ae9a298a9284386aeb4480f43a91dbe6ea958ab10b SHA512 0e2eaefdee74b6b6c5ae54870673591ce4e2d2e4c07e068987f609597c43a12308aebdce705e316555378e04eeb13aaa0c00b496097123960215773cbfa69348
diff --git a/media-video/unifi-video/unifi-video-3.10.5.ebuild b/media-video/unifi-video/unifi-video-3.10.5.ebuild
new file mode 100644 (file)
index 0000000..c975418
--- /dev/null
@@ -0,0 +1,80 @@
+# Copyright 1999-2019 Gentoo Authors
+# 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
+       sys-libs/libcap
+       virtual/jre:1.8"
+
+S=${WORKDIR}
+QA_PREBUILT="usr/lib*/${PN}/lib/*.so usr/lib*/${PN}/bin/*"
+
+pkg_setup() {
+       enewuser ${PN}
+       enewgroup ${PN}
+}
+
+src_unpack() {
+       default
+       unpack "${WORKDIR}"/data.tar.gz
+}
+
+src_prepare() {
+       eapply "${FILESDIR}"/commons-daemon-move.patch
+       sed -i usr/sbin/${PN} \
+               -e '/require_root$/d' \
+               -e '/update_limits$/d' \
+               -e '/ulimit/d' \
+               -e '/coredump_filter/d' || die
+       default
+}
+
+src_install() {
+       static_dir="/usr/$(get_libdir)/${PN}"
+       #install static data
+       insinto ${static_dir}
+       doins -r usr/lib/${PN}/*
+       fperms -R +x ${static_dir}/bin
+       fowners -R ${PN}:${PN} ${static_dir}/conf/evostream/
+
+       #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}
+
+       into /usr
+       dosbin usr/sbin/${PN}
+       dosym ../../../bin/mongod ${static_dir}/bin/mongod
+
+       newinitd "${FILESDIR}"/${PN}.initd ${PN}
+       systemd_dounit "${FILESDIR}"/${PN}.service
+}