%global build_timestamp %(date +"%Y%m%d") Name: sunshine Version: 2024.629.13903 Summary: Sunshine is a self-hosted game stream host for Moonlight. Release: 1%{?dist} License: GPLv3+ URL: https://github.com/LizardByte/Sunshine Source0: sunshine.sysusers Patch0: legion-go-mod.patch Patch1: disable-version-check.patch Patch2: no-cmake-dirty-version.patch Patch3: update-message.patch BuildRequires: boost-devel BuildRequires: cmake BuildRequires: doxygen BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: libayatana-appindicator3-devel BuildRequires: libcap-devel BuildRequires: libcurl-devel BuildRequires: libdrm-devel BuildRequires: libevdev-devel BuildRequires: libgudev BuildRequires: libnotify-devel BuildRequires: libva-devel BuildRequires: libvdpau-devel BuildRequires: libX11-devel BuildRequires: libxcb-devel BuildRequires: libXcursor-devel BuildRequires: libXfixes-devel BuildRequires: libXi-devel BuildRequires: libXinerama-devel BuildRequires: libXrandr-devel BuildRequires: libXtst-devel BuildRequires: git BuildRequires: graphviz BuildRequires: mesa-libGL-devel BuildRequires: miniupnpc-devel BuildRequires: npm BuildRequires: numactl-devel BuildRequires: openssl-devel BuildRequires: opus-devel BuildRequires: pulseaudio-libs-devel BuildRequires: python3.11 BuildRequires: rpm-build BuildRequires: systemd-udev BuildRequires: systemd-rpm-macros %{?sysusers_requires_compat} BuildRequires: wget BuildRequires: which Requires: boost >= 1.81.0 Requires: libcap >= 2.22 Requires: libcurl >= 7.0 Requires: libdrm > 2.4.97 Requires: libevdev >= 1.5.6 Requires: libopusenc >= 0.2.1 Requires: libva >= 2.14.0 Requires: libvdpau >= 1.5 Requires: libwayland-client >= 1.20.0 Requires: libX11 >= 1.7.3.1 Requires: miniupnpc >= 2.2.4 Requires: numactl-libs >= 2.0.14 Requires: openssl >= 3.0.2 Requires: pulseaudio-libs >= 10.0 Requires: libayatana-appindicator3 >= 0.5.3 %description 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. %prep git clone --single-branch --branch master https://github.com/LizardByte/Sunshine cd Sunshine git fetch --tags git checkout v%{version} git submodule update --init --recursive npm install # patches %autopatch -p1 %build # once again, disabling CUDA until NVIDIA updates it for Fedora 40 # Dynamically locate nvcc #wget https://developer.download.nvidia.com/compute/cuda/12.4.1/local_installers/cuda_12.4.1_550.54.15_linux.run #chmod +x cuda_12.4.1_550.54.15_linux.run #./cuda_12.4.1_550.54.15_linux.run --silent --toolkit --override --no-drm --no-man-page --no-opengl-libs --toolkitpath=$HOME/cuda-12.4 #export PATH=$HOME/cuda-12.4/bin:${PATH} #export LD_LIBRARY_PATH=$HOME/cuda-12.4/lib64:${LD_LIBRARY_PATH} #NVCC_PATH=$(which nvcc) #-DCMAKE_CUDA_COMPILER=$NVCC_PATH \ # Set up the build directory for Sunshine and configure the build with cmake mkdir -p %{_builddir}/Sunshine/build cd %{_builddir}/Sunshine/build # Configure cmake cmake .. \ -DCMAKE_BUILD_TYPE=Release \ -DTESTS_ENABLE_PYTHON_TESTS=OFF \ -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_BOOST_USE_STATIC=ON \ -DSUNSHINE_ENABLE_CUDA=OFF \ -DSUNSHINE_ASSETS_DIR=%{_datadir}/sunshine \ -DSUNSHINE_EXECUTABLE_PATH=%{_bindir}/sunshine \ -DSUNSHINE_ENABLE_WAYLAND=ON \ -DSUNSHINE_ENABLE_X11=ON \ -DSUNSHINE_ENABLE_DRM=ON %make_build %install install -p -D -m 0644 %{SOURCE0} %{buildroot}%{_sysusersdir}/sunshine.conf cd %{_builddir}/Sunshine/build %make_install # Add modules-load configuration install -D -m 0644 /dev/stdin %{buildroot}/usr/lib/modules-load.d/uhid.conf <