summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@gentoo.org>2022-07-19 14:52:39 -0400
committerCraig Andrews <candrews@gentoo.org>2022-07-20 08:14:31 -0400
commit5523d24cba6631172d6e4f7ea9e9c718713ad42c (patch)
tree2325cd218f759a68bcc696bd4e2c075c30a3086d
parentwww-apps/readarr: An ebook and audiobook collection manager (diff)
downloadgentoo-5523d24cba6631172d6e4f7ea9e9c718713ad42c.tar.gz
gentoo-5523d24cba6631172d6e4f7ea9e9c718713ad42c.tar.bz2
gentoo-5523d24cba6631172d6e4f7ea9e9c718713ad42c.zip
www-apps/jellyfin: Add confd to facilitate greater configurability
Allows easier modification of Jelly's log, cache, data, and configuration directories, and allows configuration of a proxy. Signed-off-by: Craig Andrews <candrews@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/26487 Signed-off-by: Craig Andrews <candrews@gentoo.org>
-rw-r--r--www-apps/jellyfin/files/jellyfin.confd15
-rw-r--r--www-apps/jellyfin/files/jellyfin.init-r124
-rw-r--r--www-apps/jellyfin/jellyfin-10.8.1-r2.ebuild57
3 files changed, 96 insertions, 0 deletions
diff --git a/www-apps/jellyfin/files/jellyfin.confd b/www-apps/jellyfin/files/jellyfin.confd
new file mode 100644
index 000000000000..310bef364b90
--- /dev/null
+++ b/www-apps/jellyfin/files/jellyfin.confd
@@ -0,0 +1,15 @@
+# This is the directory that will hold all Jellyfin data, and is also used as a default base directory for some other paths below.
+#JELLYFIN_DATA_DIR=/var/lib/jellyfin
+
+# This is the directory where the Jellyfin logs will be stored.
+#JELLYFIN_LOG_DIR=/var/log/jellyfin
+
+# This is the directory containing the server cache.
+#JELLYFIN_CACHE_DIR=/var/cache/jellyfin
+
+# This is the directory containing the server configuration files.
+#JELLYFIN_CONFIG_DIR=/etc/jellyfin
+
+# To configure Jellyfin to use a proxy, set http_proxy and/or https_proxy
+# export http_proxy=192.168.33.10:3128
+# export https_proxy=192.168.33.10:3129
diff --git a/www-apps/jellyfin/files/jellyfin.init-r1 b/www-apps/jellyfin/files/jellyfin.init-r1
new file mode 100644
index 000000000000..c45a532d5c0c
--- /dev/null
+++ b/www-apps/jellyfin/files/jellyfin.init-r1
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+
+: ${JELLYFIN_CACHE_DIR:=/var/cache/jellyfin}
+: ${JELLYFIN_LOG_DIR:=/var/log/jellyfin}
+: ${JELLYFIN_DATA_DIR:=/var/lib/jellyfin}
+: ${JELLYFIN_CONFIG_DIR:=/etc/jellyfin}
+
+pidfile="/run/${RC_SVCNAME}.pid"
+command="/opt/jellyfin/jellyfin"
+command_args="--logdir ${JELLYFIN_LOG_DIR} --cachedir ${JELLYFIN_CACHE_DIR} --configdir ${JELLYFIN_CONFIG_DIR} --datadir ${JELLYFIN_DATA_DIR}"
+command_user="${RC_SVCNAME}:${RC_SVCNAME}"
+command_background=true
+
+start_pre() {
+ # Ensure that our dirs are correct
+ checkpath --directory --owner jellyfin:jellyfin --mode 0775 \
+ ${JELLYFIN_LOG_DIR}
+ checkpath --directory --owner jellyfin:jellyfin --mode 0775 \
+ ${JELLYFIN_CACHE_DIR}
+ checkpath --directory --owner jellyfin:jellyfin --mode 0775 \
+ ${JELLYFIN_CONFIG_DIR}
+ checkpath --directory --owner jellyfin:jellyfin --mode 0775 \
+ ${JELLYFIN_DATA_DIR}
+}
diff --git a/www-apps/jellyfin/jellyfin-10.8.1-r2.ebuild b/www-apps/jellyfin/jellyfin-10.8.1-r2.ebuild
new file mode 100644
index 000000000000..76685995e7ca
--- /dev/null
+++ b/www-apps/jellyfin/jellyfin-10.8.1-r2.ebuild
@@ -0,0 +1,57 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit systemd
+
+DESCRIPTION="Jellyfin puts you in control of managing and streaming your media"
+HOMEPAGE="https://jellyfin.readthedocs.io/en/latest/"
+
+SRC_URI="
+ arm64? (
+ https://repo.jellyfin.org/releases/server/linux/stable/combined/${PN}_${PV}_arm64.tar.gz
+ https://repo.jellyfin.org/archive/linux/stable/${PV}/combined/${PN}_${PV}_arm64.tar.gz
+ )
+ amd64? (
+ https://repo.jellyfin.org/releases/server/linux/stable/combined/${PN}_${PV}_amd64.tar.gz
+ https://repo.jellyfin.org/archive/linux/stable/${PV}/combined/${PN}_${PV}_amd64.tar.gz
+ )"
+
+RESTRICT="mirror test"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+DEPEND="acct-user/jellyfin"
+RDEPEND="${DEPEND}
+ media-video/ffmpeg[vpx,x264]"
+BDEPEND="acct-user/jellyfin"
+INST_DIR="/opt/${PN}"
+QA_PREBUILT="${INST_DIR#/}/*.so ${INST_DIR#/}/jellyfin ${INST_DIR#/}/createdump"
+
+src_unpack() {
+ unpack ${A}
+ mv ${PN}_${PV} ${P} || die
+}
+
+src_prepare() {
+ default
+
+ # https://github.com/jellyfin/jellyfin/issues/7471
+ # https://github.com/dotnet/runtime/issues/57784
+ rm libcoreclrtraceptprovider.so || die
+}
+
+src_install() {
+ keepdir /var/log/jellyfin
+ fowners jellyfin:jellyfin /var/log/jellyfin
+ keepdir /etc/jellyfin
+ fowners jellyfin:jellyfin /etc/jellyfin
+ insinto ${INST_DIR}
+ dodir ${INST_DIR}
+ doins -r "${S}"/*
+ chmod 755 "${D}${INST_DIR}/jellyfin"
+ newinitd "${FILESDIR}/${PN}.init-r1" "${PN}"
+ newconfd "${FILESDIR}"/${PN}.confd "${PN}"
+ systemd_dounit "${FILESDIR}/${PN}.service"
+}