Gentoo Archives: gentoo-commits

From: Ben Kohler <bkohler@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/unifi-video/
Date: Mon, 30 Jul 2018 20:43:46
Message-Id: 1532983395.773bb96d00b9df35adf0ec5c9d534d34218a8076.bkohler@gentoo
1 commit: 773bb96d00b9df35adf0ec5c9d534d34218a8076
2 Author: Ben Kohler <bkohler <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 30 20:42:34 2018 +0000
4 Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 30 20:43:15 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=773bb96d
7
8 media-video/unifi-video: bump to 3.9.8_beta1 (unkeyworded)
9
10 Package-Manager: Portage-2.3.44, Repoman-2.3.10
11
12 media-video/unifi-video/Manifest | 1 +
13 .../unifi-video/unifi-video-3.9.8_beta1.ebuild | 83 ++++++++++++++++++++++
14 2 files changed, 84 insertions(+)
15
16 diff --git a/media-video/unifi-video/Manifest b/media-video/unifi-video/Manifest
17 index db2ca191aa8..b28563ef483 100644
18 --- a/media-video/unifi-video/Manifest
19 +++ b/media-video/unifi-video/Manifest
20 @@ -1 +1,2 @@
21 DIST unifi-video.Ubuntu16.04_amd64.v3.9.7.deb 117374890 BLAKE2B b0f274da3052471472cd2405ec0a5d79fd97cbc30f014ede42a004dcffc4d27b9b5ecc36f32b4f60f8c47ba73b85795d2851345f5472b85192cf836bfb929173 SHA512 9a0f48d81f3935baad4004681cabe2ff46f4f86f8770c260c98fbd724de2949427de8ec706d86d612a9ccbcda69ca227aa4a123c3208e0a4ab7c0a51540c06f8
22 +DIST unifi-video.Ubuntu16.04_amd64.v3.9.8-beta.1.deb 117380976 BLAKE2B 7fea704c3b780d51c3d0fc1de24b74654ba438b5223b368bbd6b42110b98fb22f0aa29816b6acec9961a9fa4f6dbace54361c64c4c12ae6a39b855c9e91702a1 SHA512 a4782c3b5319d7bc54d5df3dc64fdfec86e729636cc2e5479d7ca3a8f5112c57c83c0ac421be3cc0ce88975d6f47dd7bb57743d6802164531fdafed2bbe484bb
23
24 diff --git a/media-video/unifi-video/unifi-video-3.9.8_beta1.ebuild b/media-video/unifi-video/unifi-video-3.9.8_beta1.ebuild
25 new file mode 100644
26 index 00000000000..3b4c14cd3ad
27 --- /dev/null
28 +++ b/media-video/unifi-video/unifi-video-3.9.8_beta1.ebuild
29 @@ -0,0 +1,83 @@
30 +# Copyright 1999-2018 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=6
34 +
35 +inherit systemd user
36 +
37 +MY_PV="${PV/_beta/-beta.}"
38 +DESCRIPTION="UniFi Video Server"
39 +HOMEPAGE="https://www.ubnt.com/download/unifi-video/"
40 +SRC_URI="https://dl.ubnt.com/firmwares/ufv/v${MY_PV}/unifi-video.Ubuntu16.04_amd64.v${MY_PV}.deb"
41 +
42 +LICENSE="GPL-3"
43 +SLOT="0"
44 +KEYWORDS=""
45 +IUSE=""
46 +RESTRICT="mirror"
47 +
48 +DEPEND=""
49 +RDEPEND="dev-db/mongodb
50 + dev-java/commons-daemon
51 + sys-apps/lsb-release
52 + sys-libs/libcap
53 + virtual/jre:1.8"
54 +
55 +S=${WORKDIR}
56 +QA_PREBUILT="/usr/lib*/${PN}/lib/*.so /usr/lib*/${PN}/bin/*"
57 +
58 +pkg_setup() {
59 + enewuser ${PN}
60 + enewgroup ${PN}
61 +}
62 +
63 +src_unpack() {
64 + default
65 + unpack "${WORKDIR}"/data.tar.gz
66 +}
67 +
68 +src_prepare() {
69 + eapply "${FILESDIR}"/commons-daemon-move.patch
70 + sed -i usr/sbin/${PN} \
71 + -e '/require_root$/d' \
72 + -e '/update_limits$/d' \
73 + -e '/ulimit/d' \
74 + -e '/coredump_filter/d' || die
75 + default
76 +}
77 +
78 +src_install() {
79 + static_dir="/usr/$(get_libdir)/${PN}"
80 + #install static data
81 + insinto ${static_dir}
82 + doins -r usr/lib/${PN}/*
83 + fperms -R +x ${static_dir}/bin
84 + fowners -R ${PN}:${PN} ${static_dir}/conf/evostream/
85 +
86 + #wrapper to work around mongodb-3.6 compat issue
87 + exeinto ${static_dir}/bin/
88 + newexe "${FILESDIR}"/mongod-wrapper mongod
89 +
90 + #prepare runtime-data dirs which live in /var but are symlinked from static
91 + #data dir, and are writable by non-root user
92 + dodir /var/log/${PN}
93 + fowners ${PN}:${PN} /var/log/${PN}
94 + dosym ../../../var/log/${PN} ${static_dir}/logs
95 +
96 + dodir /var/lib/${PN}/work
97 + fowners ${PN}:${PN} /var/lib/${PN}/work
98 + dosym ../../../var/lib/${PN}/work ${static_dir}/work
99 +
100 + keepdir /var/lib/${PN}/data
101 + fowners ${PN}:${PN} /var/lib/${PN}/data
102 + dosym ../../../var/lib/${PN}/data ${static_dir}/data
103 +
104 + echo "CONFIG_PROTECT=\"/var/lib/${PN}/data/system.properties\"" > "${T}"/99${PN}
105 + doenvd "${T}"/99${PN}
106 +
107 + into /usr
108 + dosbin usr/sbin/${PN}
109 +
110 + newinitd "${FILESDIR}"/${PN}.initd ${PN}
111 + systemd_dounit "${FILESDIR}"/${PN}.service
112 +}