aboutsummaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
authorOzan Türkyılmaz <ozan.turkyilmaz@gmail.com>2023-07-08 10:11:03 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-07-08 16:40:41 +0700
commit7a4fb628fb516b5ad8ed21d4d77b6cc123591c3c (patch)
tree985bb888fb328cba1a8a643addeb01edbad3c1e2 /multimedia
parent8acb97f6a399d2bc1e52ad33d7934cf3ff4210f0 (diff)
multimedia/jellyfin-bin: Added (Software Media System).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/jellyfin-bin/README12
-rw-r--r--multimedia/jellyfin-bin/README.SLACKWARE14
-rw-r--r--multimedia/jellyfin-bin/doinst.sh24
-rw-r--r--multimedia/jellyfin-bin/jellyfin8
-rw-r--r--multimedia/jellyfin-bin/jellyfin-bin.SlackBuild91
-rw-r--r--multimedia/jellyfin-bin/jellyfin-bin.info10
-rw-r--r--multimedia/jellyfin-bin/rc.jellyfin77
-rw-r--r--multimedia/jellyfin-bin/slack-desc19
8 files changed, 255 insertions, 0 deletions
diff --git a/multimedia/jellyfin-bin/README b/multimedia/jellyfin-bin/README
new file mode 100644
index 0000000000000..9417a5d22b5e3
--- /dev/null
+++ b/multimedia/jellyfin-bin/README
@@ -0,0 +1,12 @@
+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.
+
+By default, jellyfin will use below folders:
+ -Data /opt/jellyfin/data
+ -Cache /opt/jellyfin/cache
+ -Log /opt/jellyfin/log
+ -Config /opt/jellyfin/config
+To change them, edit /etc/default/jellyfin
+
+For more information read README.SLACKWARE
diff --git a/multimedia/jellyfin-bin/README.SLACKWARE b/multimedia/jellyfin-bin/README.SLACKWARE
new file mode 100644
index 0000000000000..e5c2ea53c8c19
--- /dev/null
+++ b/multimedia/jellyfin-bin/README.SLACKWARE
@@ -0,0 +1,14 @@
+The default configuration is under /etc/default/jellyfin and is s below:
+
+DATADIR=/opt/jellyfin/data
+CACHEDIR=/opt/jellyfin/cache
+CONFIGDIR=/opt/jellyfin/config
+LOGDIR=/opt/jellyfin/log
+
+You can change them as you need and the package updates won't override
+them
+
+It is also possible to run jellyfin under its own user: Usually people
+use jellyfin:jellyfin. If you want to run it under its own user, then
+you have to change the permissions of the DATADIR, CACHEDIR, CONFIGFIR,
+and LOGDIR so jellyfin user can read and write to the folders. \ No newline at end of file
diff --git a/multimedia/jellyfin-bin/doinst.sh b/multimedia/jellyfin-bin/doinst.sh
new file mode 100644
index 0000000000000..cda26e8011670
--- /dev/null
+++ b/multimedia/jellyfin-bin/doinst.sh
@@ -0,0 +1,24 @@
+# FUNCTION: config()
+# DESCRIPTION: Discards identical copies of config and rc.INIT files.
+# ARGUMENTS: A single filename.
+# NOTE
+# Files should be installed with a .new extension.
+# Example: etc/rc.d/rc.myshinynewdaemon.new
+# We don't clobber if it's avoidable.
+# "slackpkg new-config" is one way that users can list+process .new files.
+
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+# Does the finished package have config files in etc/?
+config etc/default/jellyfin.new
diff --git a/multimedia/jellyfin-bin/jellyfin b/multimedia/jellyfin-bin/jellyfin
new file mode 100644
index 0000000000000..ab57c7ab1c3e3
--- /dev/null
+++ b/multimedia/jellyfin-bin/jellyfin
@@ -0,0 +1,8 @@
+# Below is the default values. Change them as you need them
+DATADIR=/opt/jellyfin/data
+CACHEDIR=/opt/jellyfin/cache
+CONFIGDIR=/opt/jellyfin/config
+LOGDIR=/opt/jellyfin/log
+
+#USER=jellyfin
+#GROUP=jellyfin \ No newline at end of file
diff --git a/multimedia/jellyfin-bin/jellyfin-bin.SlackBuild b/multimedia/jellyfin-bin/jellyfin-bin.SlackBuild
new file mode 100644
index 0000000000000..71afca1f6b187
--- /dev/null
+++ b/multimedia/jellyfin-bin/jellyfin-bin.SlackBuild
@@ -0,0 +1,91 @@
+#!/bin/bash
+
+# Slackware build script for jellyfin-bin
+
+# Copyright 2023 Ozan Türkyılmaz Türkiye
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=jellyfin-bin
+APPNAME=jellyfin
+ARCHFIX=amd64
+VERSION=${VERSION:-10.8.10}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf "$APPNAME"_"$VERSION"
+tar xvf $CWD/"$APPNAME"_"$VERSION"_"$ARCHFIX".tar.gz
+cd "$APPNAME"_"$VERSION"
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+mkdir -p $PKG/opt/jellyfin
+cd $PKG/opt/jellyfin
+mkdir -p data cache config log
+cp -r $TMP/"$APPNAME"_"$VERSION" $PKG/opt/jellyfin
+ln -s "$APPNAME"_"$VERSION" "$APPNAME"
+
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/etc/rc.d/
+cat $CWD/rc.jellyfin > $PKG/etc/rc.d/rc.jellyfin
+mkdir -p $PKG/etc/default/
+cat $CWD/jellyfin > $PKG/etc/default/jellyfin.new
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/multimedia/jellyfin-bin/jellyfin-bin.info b/multimedia/jellyfin-bin/jellyfin-bin.info
new file mode 100644
index 0000000000000..ac9af6bdff80d
--- /dev/null
+++ b/multimedia/jellyfin-bin/jellyfin-bin.info
@@ -0,0 +1,10 @@
+PRGNAM="jellyfin-bin"
+VERSION="10.8.10"
+HOMEPAGE="https://jellyfin.org"
+DOWNLOAD="UNSUPPORTED"
+MD5SUM=""
+DOWNLOAD_x86_64="https://repo.jellyfin.org/releases/server/linux/stable/combined/jellyfin_10.8.10_amd64.tar.gz"
+MD5SUM_x86_64="ea9a6e8679adc10509d83fae242d9f82"
+REQUIRES=""
+MAINTAINER="Ozan Türkyılmaz"
+EMAIL="ozan.turkyilmaz@gmail.com"
diff --git a/multimedia/jellyfin-bin/rc.jellyfin b/multimedia/jellyfin-bin/rc.jellyfin
new file mode 100644
index 0000000000000..6af29237e2e8f
--- /dev/null
+++ b/multimedia/jellyfin-bin/rc.jellyfin
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides: Jellyfin Media Server
+# Required-Start:
+# Required-Stop:
+# Default-Start: S
+# Default-Stop:
+# Short-Description: Jellyfin Media Server
+# Description: Runs Jellyfin Media Server
+### END INIT INFO
+
+# Load the defaults
+. /etc/default/jellyfin
+
+
+start() {
+if [ -x /opt/jellyfin/jellyfin/jellyfin ]; then
+ if [ "$USER" = "" ]; then
+ echo "Starting Jellyfin Media Server"
+ /usr/bin/daemon --name=jellyfin --pidfile=/var/run/jellyfin.pid -- \
+ /opt/jellyfin/jellyfin/jellyfin \
+ -d $DATADIR \
+ -C $CACHEDIR \
+ -c $CONFIGDIR \
+ -l $LOGDIR
+ else
+ echo "Starting Jellyfin Media Server"
+ /usr/bin/daemon --name=jellyfin --pidfile=/var/run/jellyfin.pid -- \
+ /opt/jellyfin/jellyfin/jellyfin \
+ -d $DATADIR \
+ -C $CACHEDIR \
+ -c $CONFIGDIR \
+ -l $LOGDIR \
+ -u $USER:$GROUP
+ fi
+fi
+}
+
+stop() {
+echo "Stopping Jellyfin Media Server"
+if /usr/bin/daemon --name=jellyfin --pidfile=/var/run/jellyfin.pid --running ; then
+ /usr/bin/daemon --name=jellyfin --pidfile=/var/run/jellyfin.pid --stop
+fi
+}
+
+restart() {
+echo "Restarting Jellyfin Media Server"
+if /usr/bin/daemon --name=jellyfin --pidfile=/var/run/jellyfin.pid --running ; then
+ /usr/bin/daemon --name=jellyfin --pidfile=/var/run/jellyfin.pid --restart
+ fi
+}
+
+status() {
+/usr/bin/daemon --name=jellyfin --running --pidfile=/var/run/jellyfin.pid --verbose
+}
+
+case "$1" in
+start)
+ start
+ ;;
+stop)
+ stop
+ ;;
+restart)
+ restart
+ ;;
+status)
+ status
+ ;;
+*)
+ echo $"Usage: $0 {start|stop|restart|status}"
+ exit 1
+esac
+
+
+
diff --git a/multimedia/jellyfin-bin/slack-desc b/multimedia/jellyfin-bin/slack-desc
new file mode 100644
index 0000000000000..5e16fd2f03254
--- /dev/null
+++ b/multimedia/jellyfin-bin/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+jellyfin-bin: jellyfin-bin (The Free Software Media System)
+jellyfin-bin:
+jellyfin-bin:
+jellyfin-bin: Jellyfin is a volunteer-built media solution that puts you in control
+jellyfin-bin: of your media. Stream to any device from your own server, with no
+jellyfin-bin: strings attached. Your media, your server, your way.
+jellyfin-bin:
+jellyfin-bin: https://jellyfin.org/
+jellyfin-bin:
+jellyfin-bin:
+jellyfin-bin: