www-servers/jellyfin-bin: fixes; add group dep
Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Maciej Barć <xgqt@protonmail.com>
This commit is contained in:
parent
553bcf80fd
commit
679674beab
35
www-servers/jellyfin-bin/files/jellyfin
Executable file
35
www-servers/jellyfin-bin/files/jellyfin
Executable file
@ -0,0 +1,35 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
# Copyright 1999-2020 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public Licence v2
|
||||
|
||||
|
||||
name=jellyfin
|
||||
|
||||
cfgfile="/etc/conf.d/${name}"
|
||||
|
||||
command="/usr/lib/${name}/bin/${name}"
|
||||
command_user="${name}"
|
||||
command_background="yes"
|
||||
|
||||
pidfile="/run/${name}.pid"
|
||||
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
echo "Running with:"
|
||||
echo " JELLYFIN_ARGS=${JELLYFIN_ARGS}"
|
||||
echo " JELLYFIN_CACHE_DIR=${JELLYFIN_CACHE_DIR}"
|
||||
echo " JELLYFIN_CONFIG_DIR=${JELLYFIN_CONFIG_DIR}"
|
||||
echo " JELLYFIN_DATA_DIR=${JELLYFIN_DATA_DIR}"
|
||||
echo " JELLYFIN_FFMPEG_OPT=${JELLYFIN_FFMPEG_OPT}"
|
||||
echo " JELLYFIN_LOG_DIR=${JELLYFIN_LOG_DIR}"
|
||||
echo " JELLYFIN_NOWEBAPP_OPT=${JELLYFIN_NOWEBAPP_OPT}"
|
||||
echo " JELLYFIN_RESTART_OPT=${JELLYFIN_RESTART_OPT}"
|
||||
echo " JELLYFIN_SERVICE_OPT=${JELLYFIN_SERVICE_OPT}"
|
||||
echo " JELLYFIN_USER=${JELLYFIN_USER}"
|
||||
echo " JELLYFIN_WEB_OPT=${JELLYFIN_WEB_OPT}"
|
||||
}
|
@ -27,8 +27,13 @@ SLOT="0"
|
||||
KEYWORDS="-* ~amd64 ~arm64"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
DEPEND="
|
||||
!www-servers/jellyfin
|
||||
acct-group/jellyfin
|
||||
acct-user/jellyfin
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
>=media-video/ffmpeg-4.2.2
|
||||
dev-db/sqlite
|
||||
media-libs/fontconfig
|
||||
@ -66,23 +71,27 @@ src_unpack() {
|
||||
src_install() {
|
||||
# Install the Server part
|
||||
insinto usr/lib/
|
||||
doins -r usr/lib/${MY_PN}
|
||||
doins -r "usr/lib/${MY_PN}"
|
||||
insinto etc
|
||||
doins -r etc/${MY_PN}
|
||||
insinto etc/default
|
||||
doins etc/default/${MY_PN}
|
||||
doins -r "etc/${MY_PN}"
|
||||
|
||||
# Install the Web UI part
|
||||
insinto usr/lib/${MY_PN}/bin/${MY_PN}-web
|
||||
doins -r usr/share/${MY_PN}/web/*
|
||||
insinto "usr/lib/${MY_PN}/bin/${MY_PN}-web"
|
||||
doins -r "usr/share/${MY_PN}/web"/*
|
||||
|
||||
# Install wrappers and services
|
||||
# Install wrappers
|
||||
make_wrapper "${MY_PN}" "${EPREFIX}/usr/lib/${MY_PN}/bin/${MY_PN}"
|
||||
dosym "${EPREFIX}/usr/bin/jellyfin" "${EPREFIX}/usr/bin/jellyfin-bin"
|
||||
systemd_dounit lib/systemd/system/${MY_PN}.service
|
||||
systemd_install_serviced etc/systemd/system/${MY_PN}.service.d/${MY_PN}.service.conf
|
||||
dosym "${EPREFIX}/usr/bin/${MY_PN}" "${EPREFIX}/usr/bin/${PN}"
|
||||
|
||||
# Install services
|
||||
newinitd "${FILESDIR}/${MY_PN}" "${MY_PN}"
|
||||
doconfd "etc/default/${MY_PN}"
|
||||
dosym "${EPREFIX}/etc/conf.d/${MY_PN}" "${EPREFIX}/etc/default/${MY_PN}"
|
||||
systemd_dounit "lib/systemd/system/${MY_PN}.service"
|
||||
systemd_install_serviced "etc/systemd/system/${MY_PN}.service.d/${MY_PN}.service.conf"
|
||||
|
||||
# Fix permissions
|
||||
fperms +x /usr/lib/${MY_PN}/*
|
||||
fperms +x /usr/lib/${MY_PN}/bin/*
|
||||
chmod +x "${ED}/usr/lib/${MY_PN}"/* || die
|
||||
chmod +x "${ED}/usr/lib/${MY_PN}/bin"/* || die
|
||||
chown -R jellyfin:jellyfin "${ED}/usr/lib/${MY_PN}" || die
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user