unitas-jitsi/net-misc/jicofo-bin/jicofo-bin-1.0.692.ebuild

66 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/}
MY_PV=$(ver_rs 2 '-')
MY_EV="-hf-1"
DESCRIPTION="JItsi Meet COnference FOcus: a conference focus for Jitsi Meet application"
HOMEPAGE="https://jitsi.org/"
SRC_URI_BASE="https://download.jitsi.org/stable"
SRC_URI=${SRC_URI_BASE}/${MY_PN}_${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}
##QA_PREBUILT="*"
pkg_setup() {
enewgroup jitsi
enewuser jicofo -1 /bin/bash /usr/share/jicofo jitsi
}
src_install() {
insinto /etc/jitsi/jicofo/
newins ${FILESDIR}/config-${PV}.example config.example
doins ${FILESDIR}/jicofo.conf.example
echo "org.jitsi.jicofo.BRIDGE_MUC=JvbRoom@conference.example.com" > etc/jitsi/jicofo/sip-communicator.properties.example
dodoc usr/share/doc/jicofo/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 jicofo:jitsi /usr/share/jicofo
fperms 755 /usr/share/jicofo/collect-dump-logs.sh
fperms 755 /usr/share/jicofo/jicofo.sh
fowners -R jicofo:jitsi /etc/jitsi/jicofo
fperms 750 /etc/jitsi/jicofo
fperms 600 /etc/jitsi/jicofo/sip-communicator.properties.example
newinitd "${FILESDIR}/${MY_PN}-init-${PV}.d" "${MY_PN}"
systemd_newunit "${FILESDIR}"/${MY_PN}-${PV}.service ${MY_PN}.service
systemd_newunit "${FILESDIR}"/${MY_PN}-i-${PV}.service ${MY_PN}@.service
}