diff --git a/multimedia/jellyfin/Makefile b/multimedia/jellyfin/Makefile index e5a4ab026d72..1dd696d2f431 100644 --- a/multimedia/jellyfin/Makefile +++ b/multimedia/jellyfin/Makefile @@ -1,55 +1,56 @@ PORTNAME= jellyfin DISTVERSION= 10.8.13 +PORTREVISION= 1 CATEGORIES= multimedia MASTER_SITES= https://github.com/Thefrank/jellyfin-server-freebsd/releases/download/v${DISTVERSION}/ DISTFILES= jellyfin-combined_${DISTVERSION}_freebsd-${ARCH}.tar.gz \ libSkiaSharp.so EXTRACT_ONLY= jellyfin-combined_${DISTVERSION}_freebsd-${ARCH}.tar.gz MAINTAINER= michiel@vanbaak.eu COMMENT= Jellyfin Server Component with WebUI WWW= https://jellyfin.org/ LICENSE= BSD3CLAUSE GPLv2 LICENSE_COMB= multi ONLY_FOR_ARCHS= amd64 LIB_DEPENDS+= libfontconfig.so:x11-fonts/fontconfig RUN_DEPENDS= ca_root_nss>0:security/ca_root_nss \ ffmpeg>0:multimedia/ffmpeg \ icu>0:devel/icu \ krb5>0:security/krb5 \ libinotify>0:devel/libinotify \ libunwind>0:devel/libunwind \ mediainfo>0:multimedia/mediainfo USES= sqlite:3 ssl:run USE_RC_SUBR= jellyfin NO_BUILD= YES SUB_FILES= jellyfin pkg-message SUB_LIST= DATADIR=${LOCALBASE}/jellyfin \ GROUPS=${GROUPS} \ USERS=${USERS} NO_WRKSUBDIR= YES WRKSRC= ${WRKDIR}/jf USERS= jellyfin GROUPS= jellyfin .include do-install: cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}/${LOCALBASE}/jellyfin "! ( -type f -name *\.so -or -type f -name "jellyfin" )" cd ${WRKSRC} && ${COPYTREE_BIN} . ${STAGEDIR}/${LOCALBASE}/jellyfin " -type f -name "jellyfin" " ${INSTALL_DATA} ${DISTDIR}/libSkiaSharp.so ${STAGEDIR}/${LOCALBASE}/jellyfin && ${INSTALL_DATA} ${WRKSRC}/*.so ${STAGEDIR}/${LOCALBASE}/jellyfin #This can be done one of a number ways including: symlink, a .config override (using dllmap), or libmap. post-install: @${ECHO_CMD} "libe_sqlite3.so libsqlite3.so" \ >${STAGEDIR}${PREFIX}/etc/libmap.d/jellyfin.conf .include diff --git a/multimedia/jellyfin/files/jellyfin.in b/multimedia/jellyfin/files/jellyfin.in index 2bebe5580663..86ee201c0ff0 100755 --- a/multimedia/jellyfin/files/jellyfin.in +++ b/multimedia/jellyfin/files/jellyfin.in @@ -1,76 +1,78 @@ #!/bin/sh # PROVIDE: jellyfin # REQUIRE: LOGIN network # KEYWORD: shutdown # # extraargs typically can remain unset # extraargs accepts as string any of: # --nowebclient Indicates that the web server should not host the web client. # -w, --webdir Path to the Jellyfin web UI resources. Defaults to ./jellyfin-web # -c, --configdir Path to use for configuration data (user settings and pictures). # -l, --logdir Path to use for writing log files. Defaults to $datadir/log # --ffmpeg Path to external FFmpeg executable to use. Defaults to PATH. # --published-server-url Jellyfin Server URL to publish via auto discover process # # # variable definitions # jellyfin_exec_dir Path to the actual jellyfin binary Defaults to %%DATADIR%% # jellyfin_data_dir Path to use for the data folder (database files, etc.) Defaults to /var/db/jellyfin # jellyfin_cache_dir Path to use for caching. Defaults to /var/cache/jellyfin # jellyfin_pid_dir Path to use for the pid file. Defaults to /var/run/jellyfin . /etc/rc.subr name=jellyfin rcvar=jellyfin_enable load_rc_config $name : ${jellyfin_enable:=NO} : ${jellyfin_user:="jellyfin"} : ${jellyfin_group:="jellyfin"} : ${jellyfin_extraargs:=""} : ${jellyfin_exec_dir:="%%DATADIR%%"} : ${jellyfin_data_dir:="/var/db/jellyfin"} : ${jellyfin_cache_dir:="/var/cache/jellyfin"} : ${jellyfin_pid_dir:="/var/run/jellyfin"} pidfile="${jellyfin_pid_dir}/${name}_daemon.pid" pidfile_child="${jellyfin_pid_dir}/${name}_child.pid" command="/usr/sbin/daemon" start_precmd=${name}_precmd jellyfin_precmd() { + export PATH="/sbin:/bin:/usr/sbin:/usr/bin:%%LOCALBASE%%/sbin:%%LOCALBASE%%/bin" + if [ ! -d ${jellyfin_exec_dir} ]; then install -d -o ${jellyfin_user} -g ${jellyfin_group} ${jellyfin_exec_dir} fi if [ ! -d ${jellyfin_data_dir} ]; then install -d -o ${jellyfin_user} -g ${jellyfin_group} ${jellyfin_data_dir} fi if [ ! -d ${jellyfin_cache_dir} ]; then install -d -o ${jellyfin_user} -g ${jellyfin_group} ${jellyfin_cache_dir} fi if [ ! -d ${jellyfin_pid_dir} ]; then install -d -o ${jellyfin_user} -g ${jellyfin_group} ${jellyfin_pid_dir} fi # .NET 6+ use dual mode sockets to avoid the separate AF handling. # disable .NET use of V6 if no ipv6 is configured. # See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259194#c17 ifconfig -a -u -G lo | grep -q inet6 if [ $? == 1 ]; then export DOTNET_SYSTEM_NET_DISABLEIPV6=1 fi if [ `uname -K` -ge 1400092 ]; then export CLR_OPENSSL_VERSION_OVERRIDE=30 fi rc_flags="-r -f -p ${pidfile_child} -P ${pidfile} ${jellyfin_exec_dir}/jellyfin --datadir ${jellyfin_data_dir} --cachedir ${jellyfin_cache_dir} ${jellyfin_extraargs} >> /dev/null 2>&1 ${rc_flags}" } run_rc_command "$1"