62 lines
1.6 KiB
Bash
62 lines
1.6 KiB
Bash
|
# 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/}
|
||
|
|
||
|
DESCRIPTION="Jitsi Videobridge is a WebRTC compatible Selective Forwarding Unit"
|
||
|
HOMEPAGE="https://jitsi.org/"
|
||
|
|
||
|
SRC_URI_BASE="https://download.jitsi.org/stable"
|
||
|
SRC_URI="x86? ( ${SRC_URI_BASE}/${MY_PN}_${PV}-1_i386.deb )
|
||
|
amd64? ( ${SRC_URI_BASE}/${MY_PN}_${PV}-1_amd64.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
|
||
|
echo "org.jitsi.videobridge.AUTHORIZED_SOURCE_REGEXP=focus@auth.meet.example.com/.*" > etc/jitsi/videobridge/sip-communicator.properties
|
||
|
|
||
|
dodoc usr/share/doc/jitsi-videobridge/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
|
||
|
|
||
|
newinitd "${FILESDIR}/${MY_PN}-init.d" "${MY_PN}"
|
||
|
|
||
|
systemd_dounit lib/systemd/system/jitsi-videobridge.service
|
||
|
}
|