From nobody Fri Mar 03 21:31:17 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PT1PL486Cz3wMN8; Fri, 3 Mar 2023 21:31:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PT1PL151Bz4DSK; Fri, 3 Mar 2023 21:31:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677879078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9qLHAIf61ijsppLcMvTFBcEgm9rgZQR1x9oSW1bezis=; b=eS7d4D+S4SEHNmbFn9MzeUWnLC3tNCVwl+2RcwC6C7vo3HtqdoY5HLpzCzM2SFNeto90pb aPBQv9nPu3z2GXkobYgd1sw/513Oz/TWobAd+X4YUwXGYuwD+vSy/DwclcTi8MX1tVRvzC KyRnauoqC/rhBvdhaUax/77HbxZdM1KikTNNbi8ZWiwsxkmiRn6LP2JIC8MXTkd+IwTZwo 0JkR42kpETaaKWhMypOcN+koV2ygoFLpjd3XrTTr19CtDJHpgi1RvGsdLMouvyGpS68Scf awPXplN/h+ylyMDUJCTXUrE1b+IuirQ4fq8IAJUj/YEFREUYtKnN3eRHr6OH2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677879078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9qLHAIf61ijsppLcMvTFBcEgm9rgZQR1x9oSW1bezis=; b=YK1uk7VOer2LJnM/exhc84uQO/NnBi11z1YYx3ei+TBT1eu167wBsXGhD8p0JfQfXMYilL qiWOHnzxg9UR3mHlaq2i9SenezJldZSEEhwQn3cCasHn0NjlsIjpcfyxASFhq7kSyQbjGH IH7/t4NO/5aryMBU++RKk0OMv6xE4hoyFFweuK4L+LiT25EbmmkY2q4Cj5i23Br7Tj/Gak 4DRKrmRlzkKLyxsch1u1DaL+4rTzcKSG/ztb/WanEcvb2zpHbNUdglkKVf2yyAwqtNn2Tc FtsRbeHXKV5G1PgGXi65+Tmgv1o5aByqw60uUZ3t1vG65voTPoCYRE7B9PcKqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677879078; a=rsa-sha256; cv=none; b=RA6mkMVKevb9yxsRIJ1g9vdr3ZTVl9ZOmzHxTCKJDik8DJ01v49Nd2yXTGU3Ljp8jB/GnU q+CnWzcazOtbWeY9+lt4+kBWC/PwppuYB36htn/75yTTlG8IZ2hL0/H4/aUlXo4Shcgr3t sQA6yMMJisS1VsWA1qs+3hHii25FU/8qkzOtuHG+6ww4jm1jm0aHkeVbhg2GLYCQjG7qaZ YlxUw5EHvXXUkkuagX93qTv/sjGaK5VUhiZF+MvWOw8+tPrGOA4bbWnS6Mn96qV7E+gN2d nf9f6ijKlxmscvvelM6xeiIS/KZU4StMx4mtmRFwSTSJS1F1tFZqM7gNgg9G0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PT1PL00G9z1CvL; Fri, 3 Mar 2023 21:31:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 323LVHA6022747; Fri, 3 Mar 2023 21:31:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 323LVHCn022746; Fri, 3 Mar 2023 21:31:17 GMT (envelope-from git) Date: Fri, 3 Mar 2023 21:31:17 GMT Message-Id: <202303032131.323LVHCn022746@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Robert Clausecker Subject: git: 92747e09c4c6 - main - multimedia/jellyfin: Add port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 92747e09c4c666afa7c5554ccde9299f7c14b3fe Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=92747e09c4c666afa7c5554ccde9299f7c14b3fe commit 92747e09c4c666afa7c5554ccde9299f7c14b3fe Author: Michiel van Baak Jansen AuthorDate: 2023-02-21 21:17:02 +0000 Commit: Robert Clausecker CommitDate: 2023-03-03 21:31:07 +0000 multimedia/jellyfin: Add port Jellyfin is the volunteer-built media solution that puts you in control of your media. Stream to any device from your own server, with no strings attached. Your media, your server, your way. WWW: https://jellyfin.org/ Maintainer becomes submitter. Already maintainer of other ports. Port installs binaries downloaded from a website without any local compilation. The submitter has done the same for numerous previous ports due to difficulties in locally building .NET based ports. See PR for some discussion. PR: 269754 Approved by: flo (mentor) Differential Revision: https://reviews.freebsd.org/D38861 --- GIDs | 2 +- UIDs | 2 +- multimedia/Makefile | 1 + multimedia/jellyfin/Makefile | 56 + multimedia/jellyfin/distinfo | 5 + multimedia/jellyfin/files/jellyfin.in | 72 ++ multimedia/jellyfin/files/pkg-message.in | 53 + multimedia/jellyfin/pkg-descr | 5 + multimedia/jellyfin/pkg-plist | 1998 ++++++++++++++++++++++++++++++ 9 files changed, 2192 insertions(+), 2 deletions(-) diff --git a/GIDs b/GIDs index 6fc638476d57..3813fa67b7ec 100644 --- a/GIDs +++ b/GIDs @@ -809,7 +809,7 @@ opensearch:*:855: # free: 865 # free: 866 # free: 867 -# free: 868 +jellyfin:*:868: keyd:*:869: buildbot:*:870: # free: 871 diff --git a/UIDs b/UIDs index dc3ac10d4abc..1421025df405 100644 --- a/UIDs +++ b/UIDs @@ -814,7 +814,7 @@ opensearch:*:855:855::0:0:opensearch user:/nonexistent:/usr/sbin/nologin # free: 865 # free: 866 # free: 867 -# free: 868 +jellyfin:*:868:868::0:0:Jellyfin:/nonexistent:/usr/sbin/nologin keyd:*:869:869::0:0:Key remapping daemon for evdev:/nonexistent:/usr/sbin/nologin buildbot:*:870:870::0:0:Buildbot user:/var/db/buildbot:/usr/sbin/nologin archiva:*:871:871::0:0:Apache Archiva Daemon:/nonexistent:/usr/sbin/nologin diff --git a/multimedia/Makefile b/multimedia/Makefile index 4b47adfb55cf..7875ba189f9b 100644 --- a/multimedia/Makefile +++ b/multimedia/Makefile @@ -133,6 +133,7 @@ SUBDIR += hypnotix SUBDIR += intel-media-sdk SUBDIR += iso2mkv + SUBDIR += jellyfin SUBDIR += jmref SUBDIR += kaffeine SUBDIR += kamoso diff --git a/multimedia/jellyfin/Makefile b/multimedia/jellyfin/Makefile new file mode 100644 index 000000000000..1e00184a9ac5 --- /dev/null +++ b/multimedia/jellyfin/Makefile @@ -0,0 +1,56 @@ +PORTNAME= jellyfin +DISTVERSION= 10.8.9 +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 \ + openssl>0:security/openssl \ + sqlite3>0:databases/sqlite3 + +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/distinfo b/multimedia/jellyfin/distinfo new file mode 100644 index 000000000000..35c4e65dd354 --- /dev/null +++ b/multimedia/jellyfin/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1677009100 +SHA256 (jellyfin-combined_10.8.9_freebsd-amd64.tar.gz) = e1171e511d74566874a9824236125d50dfc2ff464dcee29573bd990056729c58 +SIZE (jellyfin-combined_10.8.9_freebsd-amd64.tar.gz) = 70424803 +SHA256 (libSkiaSharp.so) = dbcf1e116bda5a6d0a1865d353de769aed936cd89e22f7db921613e5cbedaccf +SIZE (libSkiaSharp.so) = 7555664 diff --git a/multimedia/jellyfin/files/jellyfin.in b/multimedia/jellyfin/files/jellyfin.in new file mode 100755 index 000000000000..8cb52bc5cc60 --- /dev/null +++ b/multimedia/jellyfin/files/jellyfin.in @@ -0,0 +1,72 @@ +#!/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() { + 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 | grep -q inet6 + if [ $? == 1 ]; then + export DOTNET_SYSTEM_NET_DISABLEIPV6=1 + 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" + diff --git a/multimedia/jellyfin/files/pkg-message.in b/multimedia/jellyfin/files/pkg-message.in new file mode 100755 index 000000000000..e2cee2db9a17 --- /dev/null +++ b/multimedia/jellyfin/files/pkg-message.in @@ -0,0 +1,53 @@ +[ +{ type: install + message: <