diff --git a/cross/jellyfin-web/Makefile b/cross/jellyfin-web/Makefile new file mode 100644 index 00000000000..e686ae6d5f2 --- /dev/null +++ b/cross/jellyfin-web/Makefile @@ -0,0 +1,28 @@ +PKG_NAME = jellyfin-web +PKG_VERS = 10.7.2 +PKG_EXT = tar.gz +PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT) +PKG_DIST_SITE = https://github.com/jellyfin/jellyfin-web/archive +PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) +PKG_DIR = $(PKG_NAME)-$(PKG_VERS) + +HOMEPAGE = https://jellyfin.org +COMMENT = Jellyfin Web is the frontend used for most of the clients available for end users +LICENSE = GPLv2 + +.PHONY: jellyfin_compile_target +BUILD_DEPENDS = native/nodejs + +CONFIGURE_TARGET = nop +COMPILE_TARGET = jellyfin_compile_target +INSTALL_TARGET = nop + +include ../../mk/spksrc.cross-dotnet.mk + +ENV += NPM_CONFIG_USER=root +PATH := $(WORK_DIR)/../../../native/nodejs/work-native/node/bin:$(PATH) + +jellyfin_compile_target: + install -m 755 -d $(STAGING_INSTALL_PREFIX)/web + $(RUN) npm install && npm run build:production + cp -R $(WORK_DIR)/$(PKG_NAME)-$(PKG_VERS)/dist/* $(STAGING_INSTALL_PREFIX)/web diff --git a/cross/jellyfin-web/PLIST b/cross/jellyfin-web/PLIST new file mode 100644 index 00000000000..6cf65ef6c03 --- /dev/null +++ b/cross/jellyfin-web/PLIST @@ -0,0 +1 @@ +rsc:web/ diff --git a/cross/jellyfin-web/digests b/cross/jellyfin-web/digests new file mode 100644 index 00000000000..22a88a4a1be --- /dev/null +++ b/cross/jellyfin-web/digests @@ -0,0 +1,3 @@ +jellyfin-web-10.7.2.tar.gz SHA1 e23b49bfcac734eb0185046a271322ecd679b5df +jellyfin-web-10.7.2.tar.gz SHA256 bbd3987a06615bb25c1c08bbd05467761ef9e7eda3fb0e29de81da753ddb9196 +jellyfin-web-10.7.2.tar.gz MD5 ae95a49173999ed5c5c911627fb3d77c diff --git a/cross/jellyfin/Makefile b/cross/jellyfin/Makefile new file mode 100644 index 00000000000..6b0acf2dc40 --- /dev/null +++ b/cross/jellyfin/Makefile @@ -0,0 +1,20 @@ +PKG_NAME = jellyfin +PKG_VERS = 10.7.2 +PKG_EXT = tar.gz +PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT) +PKG_DIST_SITE = https://github.com/jellyfin/jellyfin/archive +PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) +PKG_DIR = $(PKG_NAME)-$(PKG_VERS) + +HOMEPAGE = https://jellyfin.org +COMMENT = The Free Software Media System. It is an alternative to the proprietary Emby and Plex. +LICENSE = GPLv2 + +DOTNET_VERSION=5.0 +BUILD_DEPENDS = native/dotnet-sdk-$(DOTNET_VERSION) + +DOTNET_OPTIMIZE=1 +DOTNET_OUTPUT_PATH=share +DOTNET_PACKAGE_NAME=Jellyfin.Server + +include ../../mk/spksrc.cross-dotnet.mk diff --git a/cross/jellyfin/PLIST b/cross/jellyfin/PLIST new file mode 100644 index 00000000000..dac3cb674f6 --- /dev/null +++ b/cross/jellyfin/PLIST @@ -0,0 +1,2 @@ +rsc:share +rsc:web diff --git a/cross/jellyfin/digests b/cross/jellyfin/digests new file mode 100644 index 00000000000..146f40efd6c --- /dev/null +++ b/cross/jellyfin/digests @@ -0,0 +1,3 @@ +jellyfin-10.7.2.tar.gz SHA1 080efb9a28ecd012ee9957b9e4e543eec3e75826 +jellyfin-10.7.2.tar.gz SHA256 9afe22c959396182ac8703eb88e319808dfec8ce3913ee6bb11434e9141037bf +jellyfin-10.7.2.tar.gz MD5 ee6402ce725adb5fdcb3f8df1c74c48e diff --git a/native/nodejs/Makefile b/native/nodejs/Makefile new file mode 100644 index 00000000000..be30fabf940 --- /dev/null +++ b/native/nodejs/Makefile @@ -0,0 +1,23 @@ +PKG_NAME = nodejs +# Latest Current Version: 13.13.0 (includes npm 6.14.4) +PKG_VERS = 13.13.0 +PKG_EXT = tar.xz +PKG_DIST_NAME = node-v$(PKG_VERS)-linux-x64.$(PKG_EXT) +PKG_DIST_SITE = https://nodejs.org/dist/v$(PKG_VERS) +PKG_DIR = node-v$(PKG_VERS)-linux-x64 + +DEPENDS = + +HOMEPAGE = https://nodejs.org/ +COMMENT = JavaScript runtime built on Chrome's V8 JavaScript engine. +LICENSE = https://github.com/nodejs/node/blob/master/LICENSE + +CONFIGURE_TARGET = nop +COMPILE_TARGET = nop +INSTALL_TARGET = nodejs-install + +include ../../mk/spksrc.native-cc.mk + +.PHONY: nodejs-install +nodejs-install: + mv -f $(WORK_DIR)/$(PKG_DIR)/ $(WORK_DIR)/node/ diff --git a/native/nodejs/digests b/native/nodejs/digests new file mode 100644 index 00000000000..e8d96925d31 --- /dev/null +++ b/native/nodejs/digests @@ -0,0 +1,3 @@ +node-v13.13.0-linux-x64.tar.xz SHA1 dfaa7351f74078ecd461d2b7b95c1f8caccfa048 +node-v13.13.0-linux-x64.tar.xz SHA256 41d60cda7422f53156711626d670f9b5079075b1ecc6736aea99319fe36c20a6 +node-v13.13.0-linux-x64.tar.xz MD5 7efabb595dd4d93d9932c1b2bf173e48 diff --git a/spk/jellyfin/Makefile b/spk/jellyfin/Makefile new file mode 100644 index 00000000000..c270bb2ccb4 --- /dev/null +++ b/spk/jellyfin/Makefile @@ -0,0 +1,37 @@ +SPK_NAME = jellyfin +SPK_VERS = 10.7.2 +SPK_REV = 1 +SPK_ICON = src/jellyfin.png +WIZARDS_DIR = src/wizard/ +DSM_UI_DIR = app + +DEPENDS = cross/libstdc++ cross/$(SPK_NAME) cross/$(SPK_NAME)-web + +MAINTAINER = publicarray +DESCRIPTION = "The Free Software Media System. It is an alternative to the proprietary Emby and Plex." +DISPLAY_NAME = Jellyfin +STARTABLE = yes +CHANGELOG = "Initial Release" +HOMEPAGE = https://jellyfin.org +HELPURL = https://jellyfin.org/docs/general/server/settings.html +SUPPORTURL = https://jellyfin.org/docs/general/getting-help.html +LICENSE = GPLv2 +LICENSE_FILE = $(WORK_DIR)/$(SPK_NAME)-$(SPK_VERS)/LICENSE +SPK_DEPENDS = "ffmpeg>=4.2" + +# 'auto' reserved value grabs SPK_NAME +SERVICE_USER = auto +SERVICE_SETUP = src/service-setup.sh + +CONF_DIR = src/conf + +# Service configuration +SERVICE_PORT = 8096 +SERVICE_PORT_TITLE = Jellyfin (HTTP) + +# Admin link +ADMIN_PORT = $(SERVICE_PORT) + +UNSUPPORTED_ARCHS = $(PPC_ARCHS) $(ARMv5_ARCHS) $(i686_ARCHS) $(ARMv7L_ARCHS) + +include ../../mk/spksrc.spk.mk diff --git a/spk/jellyfin/PLIST b/spk/jellyfin/PLIST new file mode 100644 index 00000000000..e69de29bb2d diff --git a/spk/jellyfin/src/app/config b/spk/jellyfin/src/app/config new file mode 100644 index 00000000000..5ebd16c5e7e --- /dev/null +++ b/spk/jellyfin/src/app/config @@ -0,0 +1,15 @@ +{ + ".url": { + "com.synocommunity.packages.jellyfin": { + "title": "Jellyfin", + "desc": "Jellyfin Web UI", + "icon": "images/jellyfin-{0}.png", + "type": "url", + "protocol": "http", + "port": "8096", + "url": "/", + "allUsers": true, + "grantPrivilege": "local" + } + } +} diff --git a/spk/jellyfin/src/conf/resource b/spk/jellyfin/src/conf/resource new file mode 100644 index 00000000000..1ce638045f1 --- /dev/null +++ b/spk/jellyfin/src/conf/resource @@ -0,0 +1 @@ +{"video-driver":{}} diff --git a/spk/jellyfin/src/jellyfin.png b/spk/jellyfin/src/jellyfin.png new file mode 100644 index 00000000000..94dfbaa1948 Binary files /dev/null and b/spk/jellyfin/src/jellyfin.png differ diff --git a/spk/jellyfin/src/service-setup.sh b/spk/jellyfin/src/service-setup.sh new file mode 100644 index 00000000000..0335a644b88 --- /dev/null +++ b/spk/jellyfin/src/service-setup.sh @@ -0,0 +1,25 @@ +# https://github.com/dotnet/core/issues/4011 +[ -z "$DOTNET_BUNDLE_EXTRACT_BASE_DIR" ] && export DOTNET_BUNDLE_EXTRACT_BASE_DIR="${XDG_CACHE_HOME:-"/var/packages/jellyfin/target/var/"}/dotnet_bundle_extract" + +JELLYFIN_ARGS="--service \ + --package-name synology \ + -d ${SYNOPKG_PKGVAR}/data \ + -C ${SYNOPKG_PKGVAR}/cache \ + -c ${SYNOPKG_PKGVAR}/config \ + -l ${SYNOPKG_PKGVAR}/log \ + -w ${SYNOPKG_PKGDEST}/web \ + --ffmpeg /var/packages/ffmpeg/target/bin/ffmpeg" + +SERVICE_COMMAND="env LD_LIBRARY_PATH=${SYNOPKG_PKGDEST}/lib ${SYNOPKG_PKGDEST}/share/jellyfin ${JELLYFIN_ARGS}" + +SVC_BACKGROUND=y +SVC_WRITE_PID=y + +GROUP=sc-media + +service_postinst () +{ + if [ "$SYNOPKG_DSM_VERSION_MAJOR" -ge 7 ]; then + mkdir -p --mode=0777 /var/packages/jellyfin/var/data/transcodes + fi +} diff --git a/spk/jellyfin/src/wizard/install_uifile b/spk/jellyfin/src/wizard/install_uifile new file mode 100644 index 00000000000..9030e8c65ad --- /dev/null +++ b/spk/jellyfin/src/wizard/install_uifile @@ -0,0 +1,13 @@ +[ + { + "step_title": "Important information", + "items": [ + { + "desc": "Permissions for the package are managed by a \"System internal user\" named sc-jellyfin.
For DSM 6 and below you can use the generic sc-media group instead.
For DSM 7 you may need to give sc-ffmpeg the same permissions as sc-jellyfin.
Please read Permission Management for details." + }, + { + "desc": "Information regarding Jellyfin troubleshooting and hardware acceleration support for your NAS can be found here" + } + ] + } +]