%global upstream_owner mmogr %global upstream_repo gamescope %global upstream_tag v3.15.14-flip2 # RPM Version: forbids '-'; keep the tag's `-flip2` suffix in the # vendor field of Release: so the NVR still pins to the fork variant # (`3.15.14-flip2.20260517180000.fc44` for tag v3.15.14-flip2). %global upstream_ver 3.15.14 %global flip_variant flip2 Name: gamescope-flipds Version: %{upstream_ver} Release: %{flip_variant}.20260517180000%{?dist} Summary: SteamOS-style compositor (mmogr Flip DS fork — DRM lease + dual-screen) # Gamescope itself is BSD-2-Clause; vendored subprojects (wlroots, # libliftoff, vkroots, libdisplay-info, openvr, reshade, glm, stb, # SPIRV-Headers) carry their own MIT/BSD/Zlib/MPL-2.0 mix. Tag the # package as the umbrella SPDX expression — see LICENSE files in each # vendored tree for specifics. License: BSD-2-Clause AND MIT AND Zlib AND MPL-2.0 AND BSD-3-Clause URL: https://github.com/%{upstream_owner}/%{upstream_repo} # Self-contained tarball generated by ./make-source-tarball.sh — bundles # all git submodules (wlroots, libliftoff, vkroots, libdisplay-info, # openvr, reshade, SPIRV-Headers) in-tree. Lives in the GitLab Generic # Package Registry attached to this project's repo. # # Upload (one-shot, when a new upstream_tag lands): # tarball=gamescope-flipds-%%{upstream_tag}-vendored.tar.gz # glab api -X PUT \ # "projects/linux-pocketds%%2Fcopr%%2Fgamescope-flipds/packages/generic/gamescope-flipds/%%{upstream_tag}/${tarball}" \ # -F file=@${tarball} # # Pinned SHA-256 (verify on download, see %prep): # 41aba68f00bad3f7877b24ececd29272619131c3f80e4843e20b7048ee7c088a Source0: https://gitlab.com/api/v4/projects/linux-pocketds%%2Fcopr%%2Fgamescope-flipds/packages/generic/gamescope-flipds/%{upstream_tag}/gamescope-flipds-%{upstream_tag}-vendored.tar.gz ExclusiveArch: aarch64 BuildRequires: gcc gcc-c++ BuildRequires: meson >= 0.58 BuildRequires: ninja-build BuildRequires: cmake BuildRequires: git BuildRequires: pkgconf-pkg-config BuildRequires: glslang BuildRequires: google-benchmark-devel # Graphics / display stack. BuildRequires: libdrm-devel BuildRequires: mesa-libEGL-devel BuildRequires: mesa-libgbm-devel # wlroots/render/gles2/meson.build needs glesv2.pc — provided by # mesa-libGLES-devel on Fedora. BuildRequires: mesa-libGLES-devel BuildRequires: vulkan-loader-devel BuildRequires: vulkan-headers BuildRequires: pixman-devel BuildRequires: hwdata-devel BuildRequires: libavif-devel BuildRequires: libdecor-devel # wlroots' color-management option (default: enabled) wants liblcms2. BuildRequires: lcms2-devel # wlroots/backend/session needs libseat (Fedora 44 ships it as a # subpackage of seatd; -devel provides libseat.pc). BuildRequires: libseat-devel # wlroots/xwayland needs the xwayland.pc shipped by Fedora's # xorg-x11-server-Xwayland-devel (or its xwayland-devel virtual # provide). gamescope uses XWayland to host Steam Big Picture inside # the gamescope compositor; disabling it would lose most apps. BuildRequires: xorg-x11-server-Xwayland-devel # wlroots/xwayland subdir hard-requires the full xcb stack: xcb, # xcb-composite, xcb-render, xcb-res, xcb-xfixes (all in libxcb-devel) # plus xcb-ewmh and xcb-icccm (xcb-util-wm-devel). xcb-errors is # optional but cheap. gamescope itself also pulls libxcb directly. BuildRequires: libxcb-devel BuildRequires: xcb-util-wm-devel BuildRequires: xcb-util-errors-devel # Wayland / X11. BuildRequires: wayland-devel BuildRequires: wayland-protocols-devel BuildRequires: libxkbcommon-devel BuildRequires: libX11-devel BuildRequires: libXdamage-devel BuildRequires: libXcomposite-devel BuildRequires: libXcursor-devel BuildRequires: libXrender-devel BuildRequires: libXext-devel BuildRequires: libXfixes-devel BuildRequires: libXxf86vm-devel BuildRequires: libXtst-devel BuildRequires: libXres-devel BuildRequires: libXmu-devel BuildRequires: libXi-devel # Input + media. BuildRequires: libinput-devel BuildRequires: libeis-devel BuildRequires: libcap-devel BuildRequires: systemd-devel BuildRequires: SDL2-devel BuildRequires: pipewire-devel BuildRequires: luajit-devel # Header-only deps that gamescope's meson.build can either consume from # the system (preferred) or fall back to the in-tree subprojects. BuildRequires: stb-devel BuildRequires: glm-devel # Conflicts with the stock Fedora gamescope (same binary, different # code base; concurrent install would clash on /usr/bin/gamescope). Conflicts: gamescope Requires: libdrm Requires: mesa-libEGL Requires: mesa-libgbm Requires: vulkan-loader Requires: pipewire Requires: libdecor Requires: libinput Requires: SDL2 Requires: hwdata Requires: libavif Requires: luajit %description mmogr's Flip-DS fork of Valve's gamescope (SteamOS session compositor). Differs from upstream in four user-visible ways: * --lease-connector : leases a connector + CRTC + plane and exposes the resulting DRM lease fd over a Unix socket. The flip-companion app picks the fd up to render the bottom panel directly from its own in-process Smithay compositor while gamescope holds the top panel for Steam Big Picture. * --ignore-touch-device : filters named touch devices from libinput so the bottom-panel touchscreen doesn't drive cursor events on the top panel. * HDR is disabled when the color-management pipeline isn't available (avoids a hard fail on devices whose KMS driver doesn't expose the COLOR_PIPELINE properties). * Leased planes are skipped during liftoff plane allocation (otherwise the leasing client and gamescope race for the same primary plane). This package builds the fork at tag %{upstream_tag} for aarch64 and ships the gamescope binary, the WSI layer JSON, the helper scripts under /usr/share/gamescope/, and the man pages. %prep # SHA-256 verify before unpacking — a wrong tarball at this URL means # someone re-published a different vendored bundle under the same tag. # Bake the digest in for the current upstream_tag; bump alongside the # tag when cutting a new upstream sync. Empty digest skips the check # (handy for development tarballs). %global expected_sha256 41aba68f00bad3f7877b24ececd29272619131c3f80e4843e20b7048ee7c088a if [ -n "%{expected_sha256}" ]; then actual=$(sha256sum "%{S:0}" | awk '{print $1}') if [ "${actual}" != "%{expected_sha256}" ]; then echo "ERROR: Source0 SHA-256 mismatch" >&2 echo " expected: %{expected_sha256}" >&2 echo " actual: ${actual}" >&2 exit 1 fi fi %setup -q -n gamescope-flipds-%{upstream_tag}-vendored # Uncomment once patches/ has at least one .patch (using %%autopatch -p1). %build # force_fallback_for stays at upstream's default trio so we get the # pinned Joshua-Ashton wlroots/vkroots and emersion libliftoff that # gamescope expects. enable_openvr_support=false strips the OpenVR # CMake subproject — irrelevant on a handheld and pulls in extra build # time. # # --werror=false disables meson's built-in werror promotion so Fedora # 44's newer libinput (1.31.1, ships LIBINPUT_SWITCH_KEYPAD_SLIDE) and # gcc 16 don't fail the wlroots subproject's `-Werror=switch` on enum # values the pinned wlroots 0.18 doesn't know about yet. Promotes 0 # additional warnings on host code — gamescope itself sets # `warning_level=2` but not `-Werror`. %meson \ -Dwerror=false \ --buildtype=release \ -Dpipewire=enabled \ -Drt_cap=enabled \ -Ddrm_backend=enabled \ -Dsdl2_backend=enabled \ -Davif_screenshots=enabled \ -Dinput_emulation=enabled \ -Dbenchmark=disabled \ -Denable_openvr_support=false \ -Dforce_fallback_for=wlroots,libliftoff,vkroots %meson_build %install %meson_install # Strip subproject install artefacts. wlroots / libliftoff / vkroots / # libdisplay-info were built static (default_library=static) but their # install: true on headers / pkg-config files / static archives / # helper binaries still fires under meson_install. We don't want to # ship those — they belong only to the gamescope binary at link time. # Stripping here keeps %files honest and avoids files that would # collide with future Fedora -devel packages of these libraries. rm -rf %{buildroot}%{_includedir}/wlroots-0.18 \ %{buildroot}%{_includedir}/libdisplay-info rm -f %{buildroot}%{_includedir}/libliftoff.h \ %{buildroot}%{_includedir}/vkroots.h \ %{buildroot}%{_libdir}/libwlroots-0.18.a \ %{buildroot}%{_libdir}/libliftoff.a \ %{buildroot}%{_libdir}/libdisplay-info.a \ %{buildroot}%{_libdir}/pkgconfig/wlroots-0.18.pc \ %{buildroot}%{_libdir}/pkgconfig/libliftoff.pc \ %{buildroot}%{_libdir}/pkgconfig/vkroots.pc \ %{buildroot}%{_libdir}/pkgconfig/libdisplay-info.pc \ %{buildroot}%{_bindir}/di-edid-decode %files # Upstream tags don't always ship a LICENSE file at the repo root; the # license tag in the preamble carries the SPDX expression. %doc README.md %{_bindir}/gamescope %{_bindir}/gamescopestream %{_bindir}/gamescopereaper %{_bindir}/gamescopectl %{_bindir}/gamescope-type # Optional helper data (shaders, looks/, scripts/) lands under # /usr/share/gamescope. %dir %{_datadir}/gamescope %{_datadir}/gamescope/* # WSI Vulkan implicit layer — arch-suffixed filename, not the # underscore-prefix the original %files glob assumed. %{_datadir}/vulkan/implicit_layer.d/VkLayer_FROG_gamescope_wsi.%{_arch}.json %{_libdir}/libVkLayer_FROG_gamescope_wsi_%{_arch}.so %changelog * Sun May 17 2026 Pocket DS Maintainers - %{version}-%{release} - Initial aarch64 package: mmogr/gamescope %{upstream_tag} (Flip DS fork) with vendored wlroots / libliftoff / vkroots / libdisplay-info / reshade / SPIRV-Headers subprojects. Conflicts with stock Fedora gamescope on /usr/bin/gamescope.