From 1e9023338c61638dce1564164dbd9450ac254d47 Mon Sep 17 00:00:00 2001 From: myothk Date: Mon, 1 Jul 2024 02:56:00 +0630 Subject: [PATCH] New package: sunshine-0.23.1 --- .../patches/fix-systemd-requirement.patch | 42 +++++++++++++++++++ srcpkgs/sunshine/template | 28 +++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 srcpkgs/sunshine/patches/fix-systemd-requirement.patch create mode 100644 srcpkgs/sunshine/template diff --git a/srcpkgs/sunshine/patches/fix-systemd-requirement.patch b/srcpkgs/sunshine/patches/fix-systemd-requirement.patch new file mode 100644 index 00000000000000..b48db54889809c --- /dev/null +++ b/srcpkgs/sunshine/patches/fix-systemd-requirement.patch @@ -0,0 +1,42 @@ +--- a/cmake/packaging/linux.cmake ++++ b/cmake/packaging/linux.cmake +@@ -11,13 +11,10 @@ if(${SUNSHINE_BUILD_APPIMAGE} OR ${SUNSHINE_BUILD_FLATPAK}) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service" + DESTINATION "${SUNSHINE_ASSETS_DIR}/systemd/user") + else() +- find_package(Systemd) + find_package(Udev) + + install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/60-sunshine.rules" + DESTINATION "${UDEV_RULES_INSTALL_DIR}") +- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service" +- DESTINATION "${SYSTEMD_USER_UNIT_INSTALL_DIR}") + endif() + + # Post install + +--- a/cmake/dependencies/common.cmake ++++ b/cmake/dependencies/common.cmake +@@ -39,10 +39,7 @@ elseif(APPLE) + elseif(UNIX) + set(FFMPEG_PLATFORM_LIBRARIES va va-drm va-x11 vdpau X11) + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") +- list(APPEND FFMPEG_PLATFORM_LIBRARIES mfx) + set(FFMPEG_PREPARED_BINARIES "${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/linux-x86_64") +- set(CPACK_DEB_PLATFORM_PACKAGE_DEPENDS "libmfx1,") +- set(CPACK_RPM_PLATFORM_PACKAGE_REQUIRES "intel-mediasdk >= 22.3.0,") + elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") + set(FFMPEG_PREPARED_BINARIES "${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/linux-aarch64") + elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64") + +--- a/packaging/linux/sunshine.desktop ++++ b/packaging/linux/sunshine.desktop +@@ -1,7 +1,7 @@ + [Desktop Entry] + Type=Application + Name=@PROJECT_NAME@ +-Exec=/usr/bin/env systemctl start --u sunshine ++Exec=sunshine + Version=1.0 + Comment=@PROJECT_DESCRIPTION@ + Icon=sunshine diff --git a/srcpkgs/sunshine/template b/srcpkgs/sunshine/template new file mode 100644 index 00000000000000..4e63c4c202bf3e --- /dev/null +++ b/srcpkgs/sunshine/template @@ -0,0 +1,28 @@ +# Template file for 'sunshine' +pkgname=sunshine +version=0.23.1 +revision=1 +build_style=cmake +configure_args="-Wno-dev -DBUILD_TESTS=OFF -DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine + -DSUNSHINE_ASSETS_DIR=/usr/share/sunshine" +hostmakedepends="boost cmake git make nodejs pkg-config" +makedepends="boost-devel doxygen graphviz libayatana-appindicator-devel libboost_filesystem + libboost_locale libboost_program_options libcap-devel libcurl-devel libdrm-devel libevdev-devel + libnuma-devel libnotify-devel libopusenc-devel libva-devel libvdpau-devel libX11-devel + libxcb-devel libXcursor-devel libXfixes-devel libXi-devel libXinerama-devel libXrandr-devel + libXtst-devel MesaLib-devel miniupnpc-devel nv-codec-headers opus-devel openssl-devel + pulseaudio-devel wayland-protocols" +short_desc="Self-hosted GameStream host for Moonlight" +maintainer="myothk " +license="GPL-3.0-only" +homepage="https://app.lizardbyte.dev" +_repo="https://github.com/LizardByte/Sunshine.git" +do_fetch() { + [ -d "${pkgname}-${version}" ] && rm -rf "${pkgname}-${version}" + git clone ${_repo} --branch=v${version} --single-branch --recurse-submodules "${pkgname}-${version}" +} +pre_configure() { + export BRANCH=master + export BUILD_VERSION=${version} + export COMMIT=$(git rev-parse --short HEAD) +}