unitas-jitsi/net-misc/jitsi-videobridge-bin/jitsi-videobridge-bin-2.1.4...

64 lines
1.5 KiB
Bash
Raw Normal View History

2021-02-03 18:54:02 +01:00
# Copyright 1999-2020 Unitas Network GmbH
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
inherit eutils systemd unpacker user
MY_PN=${PN/-bin/}
MY_PV=$(ver_rs 2 '-')
MY_EV="-g2f43d1b4-1"
DESCRIPTION="Jitsi Videobridge is a WebRTC compatible Selective Forwarding Unit"
HOMEPAGE="https://jitsi.org/"
SRC_URI_BASE="https://download.jitsi.org/stable"
SRC_URI=${SRC_URI_BASE}/${MY_PN}2_${MY_PV}${MY_EV}_all.deb
RESTRICT="mirror strip"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE=""
DEPEND=""
RDEPEND="virtual/jre"
S=${WORKDIR}
pkg_setup() {
enewgroup jitsi
enewuser jvb -1 /bin/bash /usr/share/jitsi-videobridge jitsi
}
src_install() {
insinto /etc/jitsi/videobridge/
doins ${FILESDIR}/config.example
doins ${FILESDIR}/jvb.conf.example
doins ${FILESDIR}/sip-communicator.properties.example
dodoc usr/share/doc/jitsi-videobridge2/README.Debian
rm -rf usr/share/doc
rm -rf etc/init.d
insinto /
doins -r etc usr
keepdir /var/log/jitsi
fowners root:jitsi /var/log/jitsi
fperms 775 /var/log/jitsi
fowners -R jvb:jitsi /usr/share/jitsi-videobridge
fperms 755 /usr/share/jitsi-videobridge/collect-dump-logs.sh
fperms 755 /usr/share/jitsi-videobridge/jvb.sh
fperms 755 /usr/share/jitsi-videobridge/graceful_shutdown.sh
fowners -R jvb:jitsi /etc/jitsi/videobridge
fperms 750 /etc/jitsi/videobridge
fperms 600 /etc/jitsi/videobridge/sip-communicator.properties.example
newinitd "${FILESDIR}/${MY_PN}-init.d" "${MY_PN}"
systemd_newunit lib/systemd/system/${MY_PN}2.service ${MY_PN}.service
}