public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ben Kohler" <bkohler@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/unifi-video/
Date: Wed, 18 Aug 2021 14:02:34 +0000 (UTC)	[thread overview]
Message-ID: <1629295347.8b1ba2f3a7a1133dce56adaad315c95b142e25bd.bkohler@gentoo> (raw)

commit:     8b1ba2f3a7a1133dce56adaad315c95b142e25bd
Author:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 18 14:02:11 2021 +0000
Commit:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Wed Aug 18 14:02:27 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b1ba2f3

media-video/unifi-video: fix EAPI=8 fallout

Somehow $DATAPATH was automatically being created before this EAPI=8
bump.

Closes: https://bugs.gentoo.org/808869
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>

 .../unifi-video/unifi-video-3.10.13-r4.ebuild      | 87 ++++++++++++++++++++++
 1 file changed, 87 insertions(+)

diff --git a/media-video/unifi-video/unifi-video-3.10.13-r4.ebuild b/media-video/unifi-video/unifi-video-3.10.13-r4.ebuild
new file mode 100644
index 00000000000..0ca08a362e9
--- /dev/null
+++ b/media-video/unifi-video/unifi-video-3.10.13-r4.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit systemd
+
+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.Ubuntu18.04_amd64.v${MY_PV}.deb"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+RESTRICT="mirror"
+
+DEPEND="acct-group/unifi-video
+	acct-user/unifi-video"
+RDEPEND="${DEPEND}
+	dev-db/mongodb
+	dev-java/commons-daemon
+	sys-apps/lsb-release
+	sys-apps/util-linux
+	sys-libs/libcap
+	virtual/jre:1.8"
+
+S=${WORKDIR}
+QA_PREBUILT="usr/lib*/${PN}/lib/*.so usr/lib*/${PN}/bin/*"
+
+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() {
+	export CODEPATH=/usr/lib/${PN}
+	export DATAPATH=/var/lib/${PN}
+	LOGPATH=${DATAPATH}/logs
+	VARLOGPATH=/var/log/${PN}
+
+	insinto /usr/lib
+	doins -r .${CODEPATH}
+	into /usr
+	dosbin usr/sbin/unifi-video
+
+	keepdir ${LOGPATH}
+	dodir ${DATAPATH}
+	fowners -R ${PN}:${PN} ${DATAPATH}
+	dosym ${LOGPATH} ${VARLOGPATH}
+	dosym ${LOGPATH} ${CODEPATH}/logs
+
+	dosym ${DATAPATH} ${CODEPATH}/data
+
+	fperms 500 ${CODEPATH}/bin/ubnt.avtool
+	fperms 500 ${CODEPATH}/bin/evostreamms
+	fperms 500 /usr/sbin/${PN}
+	fowners -R ${PN}:${PN} ${CODEPATH}
+	fperms -R 0400 ${CODEPATH}/lib/
+	fperms 500 ${CODEPATH}/lib/
+
+	echo "CONFIG_PROTECT=\"${DATAPATH}/system.properties\"" > "${T}"/99${PN}
+	doenvd "${T}"/99${PN}
+
+	dosym ../../../bin/mongod ${CODEPATH}/bin/mongod
+
+	newinitd "${FILESDIR}"/${PN}.initd ${PN}
+	systemd_dounit "${FILESDIR}"/${PN}.service
+}
+
+pkg_postinst() {
+	if [[ ! -f ${DATAPATH}/system.properties ]]; then
+		cp ${CODEPATH}/etc/system.properties ${DATAPATH}/system.properties
+		echo uuid=$(uuidgen) >> ${DATAPATH}/system.properties
+	fi
+}


             reply	other threads:[~2021-08-18 14:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18 14:02 Ben Kohler [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-12-16 12:54 [gentoo-commits] repo/gentoo:master commit in: media-video/unifi-video/ Ben Kohler
2021-12-16 12:54 Ben Kohler
2021-07-13 14:28 Ben Kohler
2020-12-28 14:47 Ben Kohler
2020-12-28 14:47 Ben Kohler
2020-11-15 15:30 Ben Kohler
2020-09-03 11:21 Ben Kohler
2020-05-20 11:24 Ben Kohler
2020-03-11 20:14 Ben Kohler
2019-10-22 13:03 Ben Kohler
2019-06-18 16:21 Ben Kohler
2019-05-31 19:51 Ben Kohler
2019-02-06 22:15 Ben Kohler
2018-12-10 23:12 Ben Kohler
2018-12-10 22:37 Ben Kohler
2018-10-24 18:50 Ben Kohler
2018-10-24 18:30 Ben Kohler
2018-08-02 17:31 Ben Kohler
2018-07-30 20:43 Ben Kohler
2018-07-30 12:34 Ben Kohler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1629295347.8b1ba2f3a7a1133dce56adaad315c95b142e25bd.bkohler@gentoo \
    --to=bkohler@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox