From 72e745f2ff24ff2661a3773eec7b1e2c46a57354 Mon Sep 17 00:00:00 2001 From: Jake Day Date: Fri, 15 Sep 2023 22:11:22 +0900 Subject: games/sunshine: Added (game stream host). Signed-off-by: Andrew Clemons Signed-off-by: Willy Sudiarto Raharjo --- games/sunshine/README | 11 +++ games/sunshine/doinst.sh | 3 + games/sunshine/slack-desc | 19 +++++ games/sunshine/sunshine.SlackBuild | 141 +++++++++++++++++++++++++++++++++++++ games/sunshine/sunshine.info | 30 ++++++++ 5 files changed, 204 insertions(+) create mode 100644 games/sunshine/README create mode 100644 games/sunshine/doinst.sh create mode 100644 games/sunshine/slack-desc create mode 100644 games/sunshine/sunshine.SlackBuild create mode 100644 games/sunshine/sunshine.info (limited to 'games/sunshine') diff --git a/games/sunshine/README b/games/sunshine/README new file mode 100644 index 0000000000..8ebc26880d --- /dev/null +++ b/games/sunshine/README @@ -0,0 +1,11 @@ +sunshine (game stream host for Moonlight) + +Sunshine is a self-hosted game stream host for Moonlight. Offering low +latency, cloud gaming server capabilities with support for AMD, Intel, +and Nvidia GPUs for hardware encoding. Software encoding is also +available. You can connect to Sunshine from any Moonlight client on a +variety of devices. A web UI is provided to allow configuration, and +client pairing, from your favorite web browser. Pair from the local +server or any mobile device. + +Homepage: https://github.com/LizardByte/Sunshine diff --git a/games/sunshine/doinst.sh b/games/sunshine/doinst.sh new file mode 100644 index 0000000000..5fb28930db --- /dev/null +++ b/games/sunshine/doinst.sh @@ -0,0 +1,3 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi diff --git a/games/sunshine/slack-desc b/games/sunshine/slack-desc new file mode 100644 index 0000000000..285c4197e7 --- /dev/null +++ b/games/sunshine/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 ':'. + + |-----handy-ruler------------------------------------------------------| +sunshine: sunshine (game stream host for Moonlight) +sunshine: +sunshine: Sunshine is a self-hosted game stream host for Moonlight. Offering low +sunshine: latency, cloud gaming server capabilities with support for AMD, Intel, +sunshine: and Nvidia GPUs for hardware encoding. Software encoding is also +sunshine: available. You can connect to Sunshine from any Moonlight client on a +sunshine: variety of devices. A web UI is provided to allow configuration, and +sunshine: client pairing, from your favorite web browser. Pair from the local +sunshine: server or any mobile device. +sunshine: +sunshine: Homepage: https://github.com/LizardByte/Sunshine diff --git a/games/sunshine/sunshine.SlackBuild b/games/sunshine/sunshine.SlackBuild new file mode 100644 index 0000000000..70dcf2ffd0 --- /dev/null +++ b/games/sunshine/sunshine.SlackBuild @@ -0,0 +1,141 @@ +#!/bin/bash + +# Copyright 2023 Jake Day, Maryville, TN, USA +# 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=sunshine +VERSION=${VERSION:-0.20.0} +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 the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +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} + +DIRNAME=Sunshine-$VERSION + +MOONLIGHT=${MOONLIGHT:-2bb026c763fc18807d7e4a93f918054c488f84e1} +ENET=${ENET:-880e41f3ab572ad6d8f064c6cc77e04f46d00956} +SIMWEBSRV=${SIMWEBSRV:-v3.1.1} +VIGEMCLIENT=${VIGEMCLIENT:-dc2f3da093938c3dcc8b7697707b7017e4a917fa} +MINIUPNP=${MINIUPNP:-fb5c328a5e8fd57a3ec0f5d33915377a5d3581f3} +NVCODECHDRS=${NVCODECHDRS:-dc3e4484dc83485734e503991fe5ed3bdf256fba} +TPCIRCBUF=${TPCIRCBUF:-8833b3a73fab6530cc51e2063a85cced01714cfb} +FFMPEG=${FFMPEG:-6deb7d7366fc6e09afb3cb235cab6780bfa550b9} +NANORS=${NANORS:-e9e242e98e27037830490b2a752895ca68f75f8b} +TRAY=${TRAY:-14b7797ac230ac4edeec9b82563a7a73a16572da} + +DEPS=$PKG/$DIRNAME/third-party + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $PKG +rm -rf $DIRNAME +tar xvf $CWD/$DIRNAME.tar.gz + +tar xvf $CWD/moonlight-common-c-$MOONLIGHT.tar.gz -C \ + $DEPS/moonlight-common-c/ --strip-components 1 +tar xvf $CWD/enet-$ENET.tar.gz -C \ + $DEPS/moonlight-common-c/enet/ --strip-components 1 +tar xvf $CWD/Simple-Web-Server-$SIMWEBSRV.tar.gz -C \ + $DEPS/Simple-Web-Server/ --strip-components 1 +tar xvf $CWD/ViGEmClient-$VIGEMCLIENT.tar.gz -C \ + $DEPS/ViGEmClient/ --strip-components 1 +tar xvf $CWD/miniupnp-$MINIUPNP.tar.gz -C \ + $DEPS/miniupnp/ --strip-components 1 +tar xvf $CWD/nv-codec-headers-$NVCODECHDRS.tar.gz -C \ + $DEPS/nv-codec-headers/ --strip-components 1 +tar xvf $CWD/TPCircularBuffer-$TPCIRCBUF.tar.gz -C \ + $DEPS/TPCircularBuffer/ --strip-components 1 +tar xvf $CWD/build-deps-$FFMPEG.tar.gz -C \ + $DEPS/ffmpeg-linux-x86_64/ --strip-components 1 +tar xvf $CWD/nanors-$NANORS.tar.gz -C \ + $DEPS/nanors/ --strip-components 1 +tar xvf $CWD/tray-$TRAY.tar.gz -C \ + $DEPS/tray/ --strip-components 1 + +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +# Make sure top-level perms are correct: +chmod 0755 . + +cd $DIRNAME +mkdir build +cd build + +npm install + +BRANCH=master BUILD_VERSION=$VERSION COMMIT=release \ + cmake -D CMAKE_INSTALL_PREFIX=/usr -D SUNSHINE_ASSETS_DIR="share/assets/sunshine" .. +make + +cd $PKG + +mkdir -p $PKG/usr/share/assets/sunshine +cp -a $DIRNAME/src_assets/common/assets/* $PKG/usr/share/assets/sunshine/ +cp -a $DIRNAME/src_assets/linux/assets/* $PKG/usr/share/assets/sunshine/ +cp -a $DIRNAME/node_modules $PKG/usr/share/assets/sunshine/web/ +mkdir -p $PKG/usr/lib/udev/rules.d +cp -a $DIRNAME/src_assets/linux/misc/85-sunshine.rules $PKG/usr/lib/udev/rules.d/ +mkdir -p $PKG/usr/share/icons +cp -a $DIRNAME/sunshine.svg $PKG/usr/share/icons/ +mkdir -p $PKG/usr/bin +cp -a $DIRNAME/build/sunshine-$VERSION $PKG/usr/bin/sunshine-$VERSION +cp -a $DIRNAME/build/sunshine $PKG/usr/bin/sunshine + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + $PKG/$DIRNAME/README.rst \ + $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 + +rm -rf $DIRNAME + +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 + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/games/sunshine/sunshine.info b/games/sunshine/sunshine.info new file mode 100644 index 0000000000..537a236e5f --- /dev/null +++ b/games/sunshine/sunshine.info @@ -0,0 +1,30 @@ +PRGNAM="sunshine" +VERSION="0.20.0" +HOMEPAGE="https://github.com/LizardByte/Sunshine" +DOWNLOAD="UNSUPPORTED" +MD5SUM="" +DOWNLOAD_x86_64="https://github.com/LizardByte/Sunshine/archive/v0.20.0/Sunshine-0.20.0.tar.gz \ + https://github.com/moonlight-stream/moonlight-common-c/archive/2bb026c763fc18807d7e4a93f918054c488f84e1/moonlight-common-c-2bb026c763fc18807d7e4a93f918054c488f84e1.tar.gz \ + https://github.com/cgutman/enet/archive/880e41f3ab572ad6d8f064c6cc77e04f46d00956/enet-880e41f3ab572ad6d8f064c6cc77e04f46d00956.tar.gz \ + https://gitlab.com/eidheim/Simple-Web-Server/-/archive/v3.1.1/Simple-Web-Server-v3.1.1.tar.gz \ + https://github.com/ViGEm/ViGEmClient/archive/dc2f3da093938c3dcc8b7697707b7017e4a917fa/ViGEmClient-dc2f3da093938c3dcc8b7697707b7017e4a917fa.tar.gz \ + https://github.com/miniupnp/miniupnp/archive/fb5c328a5e8fd57a3ec0f5d33915377a5d3581f3/miniupnp-fb5c328a5e8fd57a3ec0f5d33915377a5d3581f3.tar.gz \ + https://github.com/FFmpeg/nv-codec-headers/archive/dc3e4484dc83485734e503991fe5ed3bdf256fba/nv-codec-headers-dc3e4484dc83485734e503991fe5ed3bdf256fba.tar.gz \ + https://github.com/michaeltyson/TPCircularBuffer/archive/8833b3a73fab6530cc51e2063a85cced01714cfb/TPCircularBuffer-8833b3a73fab6530cc51e2063a85cced01714cfb.tar.gz \ + https://github.com/LizardByte/build-deps/archive/6deb7d7366fc6e09afb3cb235cab6780bfa550b9/build-deps-6deb7d7366fc6e09afb3cb235cab6780bfa550b9.tar.gz \ + https://github.com/sleepybishop/nanors/archive/e9e242e98e27037830490b2a752895ca68f75f8b/nanors-e9e242e98e27037830490b2a752895ca68f75f8b.tar.gz \ + https://github.com/dmikushin/tray/archive/14b7797ac230ac4edeec9b82563a7a73a16572da/tray-14b7797ac230ac4edeec9b82563a7a73a16572da.tar.gz" +MD5SUM_x86_64="8d286f7a2344fdc1353a43a3199ee2c9 \ + e3581235a993f0b693f601e36d58c90f \ + 9c31fb0b0a448371b436545b4631514d \ + 5d9e37cb150a8a8f77b32395ee873e87 \ + d4123883019c46577077aafb40969500 \ + 62093450c0528e16cbde7fe7bff37007 \ + b349540a2ae155f1c7e01a1081077d8b \ + c72ddf506eb5c33732bc54dccd797bb2 \ + 7ef64c679b313a9510f855a8f79941f1 \ + aacaa95b7d4c59c69bdac1f1b190a010 \ + 17fdbb1aafcba64798048ce2cd21daff" +REQUIRES="nodejs npm numactl intel-media-sdk cudatoolkit" +MAINTAINER="Jake Day" +EMAIL="jake@ninebysix.com" -- cgit v1.2.3-65-gdbad