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