summaryrefslogtreecommitdiffstats
path: root/multimedia
diff options
context:
space:
mode:
author Martin Bångens2023-04-15 01:08:40 +0200
committer Willy Sudiarto Raharjo2023-04-15 02:15:30 +0200
commit505b30cc1fb18044f96e6ae6fff73d4c9ae92b32 (patch)
treeecaeeca0ff8ca7e6c6f40dfac854bd6c8f22bad7 /multimedia
parentf151288d92bc64fddb7932329f2e923e2329759e (diff)
downloadslackbuilds-505b30cc1fb18044f96e6ae6fff73d4c9ae92b32.tar.gz
multimedia/stremio: Added (The Next Generation Media Center)
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/stremio/README10
-rw-r--r--multimedia/stremio/doinst.sh9
-rw-r--r--multimedia/stremio/no-js-download.patch43
-rw-r--r--multimedia/stremio/slack-desc19
-rw-r--r--multimedia/stremio/stremio.SlackBuild111
-rw-r--r--multimedia/stremio/stremio.info20
6 files changed, 212 insertions, 0 deletions
diff --git a/multimedia/stremio/README b/multimedia/stremio/README
new file mode 100644
index 0000000000..b971a8eddb
--- /dev/null
+++ b/multimedia/stremio/README
@@ -0,0 +1,10 @@
+Stream videos like a slacker! With this application you can stream
+everything form netflix, HBO, Disney+, AppleTV+, Popcorn Time, Youtube.
+It uses plugins that can be installed by one click in the application.
+You can resume a movie from another device and they don't record you're
+activity. It has all modern features and its a full media center.
+Integrates well with kde and other desktop environments.
+Defaults to wayland and fallback to X11 and uses mpv, qt and js.
+You will have a huge library of movies and you can even stream local
+files or a magnet link from the clipboard, auto download subtitles,
+TV Channels, radio.
diff --git a/multimedia/stremio/doinst.sh b/multimedia/stremio/doinst.sh
new file mode 100644
index 0000000000..c307679a34
--- /dev/null
+++ b/multimedia/stremio/doinst.sh
@@ -0,0 +1,9 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
+ln -sf "$(which node)" "/usr/share/stremio/node"
diff --git a/multimedia/stremio/no-js-download.patch b/multimedia/stremio/no-js-download.patch
new file mode 100644
index 0000000000..06a7416f24
--- /dev/null
+++ b/multimedia/stremio/no-js-download.patch
@@ -0,0 +1,43 @@
+--- b/release.makefile 2023-04-13 18:46:36.368966456 +0200
++++ a/release.makefile 2023-04-13 18:55:38.068985747 +0200
+@@ -1,6 +1,6 @@
+
+ BUILD_DIR := build
+-INSTALL_DIR := ${PREFIX}/opt/stremio
++INSTALL_DIR := ${PREFIX}/usr/share/stremio
+
+ ICON_BIN := smartcode-stremio.svg
+
+@@ -8,12 +8,13 @@
+
+ STREMIO_BIN := ${BUILD_DIR}/stremio
+
+-ALL: ${STREMIO_BIN} ${SERVER_JS} icons
++ALL: ${STREMIO_BIN} icons
+
+ install:
+ make -C ${BUILD_DIR} install
+ install -Dm 644 ${SERVER_JS} "${INSTALL_DIR}/server.js"
+- install -Dm 644 smartcode-stremio.desktop "${INSTALL_DIR}/smartcode-stremio.desktop"
++ install -Dm 644 stremio.asar "${INSTALL_DIR}/stremio.asar"
++ install -Dm 644 smartcode-stremio.desktop "${INSTALL_DIR}/../applications/com.stremio.stremio.desktop"
+ cp -r icons "${INSTALL_DIR}/"
+- ln -s "${shell which node}" "${INSTALL_DIR}/node"
++
+ ifneq ("$(wildcard ../mpv-build/mpv/build)","")
+@@ -28,14 +29,11 @@
+ mkdir -p "$@"
+ cd "$@" && printf 16,22,24,32,64,128 | xargs -I^ -d, sh -c 'rsvg-convert ../images/stremio.svg -w ^ -o smartcode-stremio_^.png && rsvg-convert ../images/stremio_tray_white.svg -w ^ -o smartcode-stremio-tray_^.png'
+
+-${SERVER_JS}:
+- wget "https://s3-eu-west-1.amazonaws.com/stremio-artifacts/four/v$(shell ./dist-utils/common/get-version.sh)/server.js" -qO ${SERVER_JS} || rm ${SERVER_JS}
+-
+ ${STREMIO_BIN}:
+ mkdir -p ${BUILD_DIR}
+ cd ${BUILD_DIR} && cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${PREFIX}" ..
+ make -j -C ${BUILD_DIR}
+
+ clean:
+- rm -rf ${BUILD_DIR} ${SERVER_JS} icons
++ rm -rf ${BUILD_DIR} icons
+
diff --git a/multimedia/stremio/slack-desc b/multimedia/stremio/slack-desc
new file mode 100644
index 0000000000..81e5c79bc8
--- /dev/null
+++ b/multimedia/stremio/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------------------------------------------------------|
+stremio: stremio (The Next Generation Media Center)
+stremio:
+stremio: Stremio is a modern media center that's a one-stop solution for your
+stremio: video entertainment. You discover, watch and organize video content
+stremio: from easy to install addons. Movies, TV shows, live TV or web channels
+stremio:
+stremio:
+stremio:
+stremio:
+stremio:
+stremio:
diff --git a/multimedia/stremio/stremio.SlackBuild b/multimedia/stremio/stremio.SlackBuild
new file mode 100644
index 0000000000..380d8c0cf0
--- /dev/null
+++ b/multimedia/stremio/stremio.SlackBuild
@@ -0,0 +1,111 @@
+#!/bin/bash
+
+# Slackware build script for stremio
+
+# Copyright 2023 Martin Bångens Sweden
+# 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=stremio
+VERSION=${VERSION:-4.4.159}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+# git submodules
+CHROMA=99045142479ba0e2fc3b9cccb72e348c67cd5829
+LIBMPV=b0eae77cf6dc59aaf142b7d079cb13a0904fd3ee
+SINGLEAPPLICATION=aede311d28d20179216c5419b581087be2a8409f
+
+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 stremio-shell-$VERSION
+tar xvf $CWD/stremio-shell-$VERSION.tar.gz
+cd stremio-shell-$VERSION
+
+tar xvzf $CWD/razerchroma-$CHROMA.tar.gz --strip-components=1 -C deps/chroma
+tar xvzf $CWD/libmpv-$LIBMPV.tar.gz --strip-components=1 -C deps/libmpv
+tar xvzf $CWD/SingleApplication-$SINGLEAPPLICATION.tar.gz --strip-components=1 -C deps/singleapplication
+
+cp $CWD/server.js server.js
+cp $CWD/stremio.asar stremio.asar
+cat $CWD/no-js-download.patch | patch -Np1 --verbose || exit 1
+sed -i 's|opt/stremio|usr/share/stremio|g' CMakeLists.txt
+
+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 {} \;
+
+make -f release.makefile PREFIX="$PKG"
+make -f release.makefile PREFIX="$PKG" install
+
+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/usr/bin"
+ln -sf /usr/share/stremio/stremio "$PKG/usr/bin/stremio"
+
+while read -r -d '' _file
+do
+ _res="$(printf '%s' "$_file" | sed 's/\.png$//;s/^.*_//')"
+ mkdir -p "$PKG/usr/share/icons/hicolor/${_res}x${_res}/apps"
+ ln -sf /usr/share/stremio/icons/smartcode-stremio_${_res}.png \
+ "$PKG/usr/share/icons/hicolor/${_res}x${_res}/apps/smartcode-stremio.png"
+ ln -sf /usr/share/stremio/icons/smartcode-stremio-tray_${_res}.png \
+ "$PKG/usr/share/icons/hicolor/${_res}x${_res}/apps/smartcode-stremio-tray.png"
+done < <(find "$PKG/usr/share/stremio/icons" -maxdepth 1 -type f -name 'smartcode-stremio_*.png' -print0)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ LICENSE.md \
+ README.md \
+ $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/stremio/stremio.info b/multimedia/stremio/stremio.info
new file mode 100644
index 0000000000..e0b1908c70
--- /dev/null
+++ b/multimedia/stremio/stremio.info
@@ -0,0 +1,20 @@
+PRGNAM="stremio"
+VERSION="4.4.159"
+HOMEPAGE="https://www.stremio.com"
+DOWNLOAD="https://github.com/Stremio/stremio-shell/archive/v4.4.159/stremio-shell-4.4.159.tar.gz \
+ https://github.com/Ivshti/razerchroma/archive/9904514/razerchroma-99045142479ba0e2fc3b9cccb72e348c67cd5829.tar.gz \
+ https://github.com/Ivshti/libmpv/archive/b0eae77/libmpv-b0eae77cf6dc59aaf142b7d079cb13a0904fd3ee.tar.gz \
+ https://github.com/itay-grudev/SingleApplication/archive/aede311/SingleApplication-aede311d28d20179216c5419b581087be2a8409f.tar.gz \
+ https://dl.strem.io/four/v4.4.159/server.js \
+ https://dl.strem.io/four/v4.4.159/stremio.asar"
+MD5SUM="9b037dc020108c84f23d62256f588c46\
+ ae4749875770e58021d751aea80acf4b\
+ 1a3c6c3054b171289799bd54b68db6c1\
+ 1caffe59b5bf00c1ffa8ef2889b86f8b\
+ eff4ba648431c0ab9817a68b8f462215\
+ d07b0e981c29b3086da847391408bf9f"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="mpv nodejs"
+MAINTAINER="Martin Bångens"
+EMAIL="marbangens@gmail.com"