diff options
author | Grey Christoforo | 2023-02-14 09:55:29 +0100 |
---|---|---|
committer | Grey Christoforo | 2023-02-14 09:55:29 +0100 |
commit | 44329156c7bc20a5afc8a9542d569efeb2c7c731 (patch) | |
tree | b1d1b9a648da6da3cc03ae3771e2dc0f74607f7d | |
parent | 0d490cc99d8bef1e14aa07ea8a33617ce7c03148 (diff) | |
download | aur-44329156c7bc20a5afc8a9542d569efeb2c7c731.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 60 | ||||
-rw-r--r-- | .gitignore | 13 | ||||
-rw-r--r-- | PKGBUILD | 170 | ||||
-rw-r--r-- | sunshine-git.install | 8 |
4 files changed, 167 insertions, 84 deletions
@@ -1,35 +1,59 @@ pkgbase = sunshine-git - pkgdesc = Open source implementation of NVIDIA's GameStream, as used by the NVIDIA Shield - pkgver = 0.13.0.957.4b658cd + pkgdesc = Game Stream server for Moonlight, latest git + pkgver = 0.18.3.r0.g9563419 pkgrel = 1 - url = https://github.com/SunshineStream/sunshine - install = sunshine.install + url = https://github.com/LizardByte/Sunshine + install = sunshine-git.install arch = x86_64 - arch = i686 license = GPL3 makedepends = git - makedepends = cmake makedepends = boost - makedepends = make + makedepends = cmake + makedepends = ninja + makedepends = nodejs + makedepends = npm + depends = avahi depends = boost-libs - depends = ffmpeg4.4 - depends = openssl + depends = curl + depends = libevdev + depends = libmfx depends = libpulse - depends = opus - depends = libxtst + depends = libva + depends = libvdpau depends = libx11 - depends = libxfixes - depends = libevdev depends = libxcb + depends = libxfixes depends = libxrandr + depends = libxtst + depends = numactl + depends = openssl + depends = opus depends = udev + optdepends = cuda: NvFBC capture support + optdepends = libcap + optdepends = libdrm provides = sunshine conflicts = sunshine - source = sunshine-git::git+https://github.com/SunshineStream/sunshine.git - source = systemd-user-config.patch - source = udev.rules + conflicts = sunshine-nox + source = git+https://github.com/LizardByte/Sunshine.git + source = git+https://github.com/moonlight-stream/moonlight-common-c.git + source = git+https://gitlab.com/eidheim/Simple-Web-Server.git + source = git+https://github.com/ViGEm/ViGEmClient.git + source = git+https://github.com/miniupnp/miniupnp.git + source = git+https://github.com/FFmpeg/nv-codec-headers.git + source = git+https://github.com/michaeltyson/TPCircularBuffer.git + source = git+https://github.com/LizardByte/build-deps.git + source = git+https://github.com/sleepybishop/nanors.git + source = git+https://github.com/cgutman/enet.git + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP sha256sums = SKIP - sha256sums = 1642eb8672b137e94aa16e4aadde37f68bf1920dfadd1325cca480d7731f38c9 - sha256sums = 5ce01689247cb01d3f119cac32c731607d99bb875dcdd39c92b547f76d2befa0 pkgname = sunshine-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..312f63e7aded --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +src/ +pkg/ +Sunshine/ +build-deps/ +moonlight-common-c/ +enet/ +nanors/ +nv-codec-headers/ +Simple-Web-Server/ +TPCircularBuffer/ +ViGEmClient/ +miniupnp/ +*.pkg.tar.* @@ -1,83 +1,121 @@ -# Maintainer: Jacek Szafarkiewicz <szafar at linux dot pl> -# Contributor: Levente Polyak <anthraxx[at]archlinux[dot]org> +# Maintainer: Grey Christoforo <first name at last name dot net> pkgname=sunshine-git -pkgver=0.13.0.957.4b658cd +pkgver=0.18.3.r0.g9563419 pkgrel=1 -pkgdesc="Open source implementation of NVIDIA's GameStream, as used by the NVIDIA Shield" -url="https://github.com/SunshineStream/sunshine" -arch=('x86_64' 'i686') +pkgdesc="Game Stream server for Moonlight, latest git" +arch=('x86_64') +url=https://github.com/LizardByte/Sunshine license=('GPL3') - -depends=('boost-libs' 'ffmpeg4.4' 'openssl' 'libpulse' 'opus' 'libxtst' 'libx11' 'libxfixes' 'libevdev' 'libxcb' 'libxrandr' 'udev') -makedepends=('git' 'cmake' 'boost' 'make') - -provides=('sunshine') -conflicts=("sunshine") - -source=("$pkgname::git+https://github.com/SunshineStream/sunshine.git" - "systemd-user-config.patch" - "udev.rules") +install=sunshine-git.install + +depends=( +avahi +boost-libs +curl +libevdev +libmfx +libpulse +libva +libvdpau +libx11 +libxcb +libxfixes +libxrandr +libxtst +numactl +openssl +opus +udev +) +makedepends=( +git +boost +cmake +ninja +nodejs +npm +) +optdepends=( +'cuda: NvFBC capture support' +'libcap' +'libdrm' +) + +provides=(sunshine) +conflicts=(sunshine sunshine-nox) + +source=( +git+https://github.com/LizardByte/Sunshine.git +git+https://github.com/moonlight-stream/moonlight-common-c.git +git+https://gitlab.com/eidheim/Simple-Web-Server.git +git+https://github.com/ViGEm/ViGEmClient.git +git+https://github.com/miniupnp/miniupnp.git +git+https://github.com/FFmpeg/nv-codec-headers.git +git+https://github.com/michaeltyson/TPCircularBuffer.git +git+https://github.com/LizardByte/build-deps.git +git+https://github.com/sleepybishop/nanors.git +git+https://github.com/cgutman/enet.git +) sha256sums=('SKIP' - '1642eb8672b137e94aa16e4aadde37f68bf1920dfadd1325cca480d7731f38c9' - '5ce01689247cb01d3f119cac32c731607d99bb875dcdd39c92b547f76d2befa0') -install=sunshine.install - -_assets_path=/usr/share/sunshine + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP') pkgver() { - cd "$pkgname" - printf "%s.%s.%s" "$(git describe --tags $(git rev-list --tags --max-count=1) | sed 's/^v//')" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + cd Sunshine + git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } prepare() { - cd "$pkgname" - git submodule update --recursive --init - - patch -p1 < ../systemd-user-config.patch + cd Sunshine + git rm -f third-party/ffmpeg-windows-x86_64 + git rm -f third-party/ffmpeg-macos-x86_64 + git rm -f third-party/ffmpeg-macos-aarch64 + git rm -f third-party/ffmpeg-linux-aarch64 + git submodule init + git config submodule.third-party/moonlight-common-c.url "${srcdir}/moonlight-common-c" + git config submodule.third-party/Simple-Web-Server.url "${srcdir}/Simple-Web-Server" + git config submodule.third-party/ViGEmClient.url "${srcdir}/ViGEmClient" + git config submodule.third-party/miniupnp.url "${srcdir}/miniupnp" + git config submodule.third-party/nv-codec-headers.url "${srcdir}/nv-codec-headers" + git config submodule.third-party/TPCircularBuffer.url "${srcdir}/TPCircularBuffer" + git config submodule.third-party/ffmpeg-linux-x86_64.url "${srcdir}/build-deps" + git config submodule.third-party/nanors.url "${srcdir}/nanors" + git -c protocol.file.allow=always submodule update + + pushd third-party/moonlight-common-c + git submodule init + git config submodule.enet.url "${srcdir}/enet" + git -c protocol.file.allow=always submodule update + popd } build() { - export CFLAGS="${CFLAGS/-Werror=format-security/}" - export CXXFLAGS="${CXXFLAGS/-Werror=format-security/}" - - cmake \ - -S "$pkgname" \ - -B build \ - -Wno-dev \ - -D SUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \ - -D SUNSHINE_ASSETS_DIR="$_assets_path" \ - \ - -D LIBAVCODEC_INCLUDE_DIR=/usr/include/ffmpeg4.4 \ - -D LIBAVCODEC_LIBRARIES=/usr/lib/ffmpeg4.4/libavcodec.so \ - -D LIBAVDEVICE_INCLUDE_DIR=/usr/include/ffmpeg4.4 \ - -D LIBAVDEVICE_LIBRARIES=/usr/lib/ffmpeg4.4/libavdevice.so \ - -D LIBAVFORMAT_INCLUDE_DIR=/usr/include/ffmpeg4.4 \ - -D LIBAVFORMAT_LIBRARIES=/usr/lib/ffmpeg4.4/libavformat.so \ - -D LIBAVUTIL_INCLUDE_DIR=/usr/include/ffmpeg4.4 \ - -D LIBAVUTIL_LIBRARIES=/usr/lib/ffmpeg4.4/libavutil.so \ - -D LIBSWSCALE_INCLUDE_DIR=/usr/include/ffmpeg4.4 \ - -D LIBAVUTIL_LIBRARIES=/usr/lib/ffmpeg4.4/libavutil.so \ - -D LIBSWSCALE_INCLUDE_DIR=/usr/include/ffmpeg4.4 \ - -D LIBSWSCALE_LIBRARIES=/usr/lib/ffmpeg4.4/libswscale.so - - make -C build + pushd Sunshine + npm install + popd + + export CFLAGS="${CFLAGS/-Werror=format-security/}" + export CXXFLAGS="${CXXFLAGS/-Werror=format-security/}" + + cmake -B build_dir -S Sunshine -W no-dev -G Ninja \ + -D CMAKE_BUILD_TYPE=None \ + -D SUNSHINE_ENABLE_CUDA=1 \ + -D SUNSHINE_ENABLE_X11=1 \ + -D CMAKE_INSTALL_PREFIX=/usr \ + -D SUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \ + -D SUNSHINE_ASSETS_DIR="share/sunshine" + + cmake --build build_dir } package() { - pushd "$pkgname/assets" - install -Dvm644 sunshine.conf "$pkgdir/$_assets_path/sunshine.conf" - install -Dvm644 apps_linux.json "$pkgdir/$_assets_path/apps_linux.json" - - find web shaders/opengl -type f -print0 | xargs -0 -I {} install -Dvm644 {} "$pkgdir/$_assets_path/{}" - popd - - pushd build - install -Dvm755 sunshine "$pkgdir/usr/bin/sunshine" - install -Dvm644 sunshine.service "$pkgdir/usr/lib/systemd/user/sunshine.service" - popd - - install -Dvm644 udev.rules "$pkgdir/usr/lib/udev/rules.d/85-sunshine.rules" + DESTDIR="${pkgdir}" cmake --install build_dir } - -# vim: ts=2 sw=2 et: diff --git a/sunshine-git.install b/sunshine-git.install new file mode 100644 index 000000000000..98328ef488b5 --- /dev/null +++ b/sunshine-git.install @@ -0,0 +1,8 @@ +post_install() { + sudo setcap cap_sys_admin+p /usr/bin/$(readlink $(which sunshine)) + if ! getent group input > /dev/null; then + echo "Creating group input" + groupadd -r input + fi +} + |