Name: gamescope-session Version: 0.2.git.201.5538cd66 Release: 28%{?dist} Summary: Steam Big Picture Mode/Gamemode session based on gamescope License: MIT URL: https://github.com/KyleGospo/gamescope-session VCS: git+https://github.com/KyleGospo/gamescope-session.git#5538cd66e4d8ee19b5c40a53e6f781b61cc68a6f: Source0: gamescope-session-5538cd66.tar.gz # This rescales the desktop to 1.5 for handheld screen viewing Source3: deckscale.desktop Source4: deckscale Patch0: fedora.patch Patch1: 0001-nobara-changes.patch BuildArch: noarch Requires: gamescope Requires: edid-decode Requires: python3 Requires: pulseaudio-utils Requires: powerbuttond Requires: steam BuildRequires: systemd-rpm-macros %description Steam Big Picture Mode/Gamemode session based on gamescope %prep %setup -T -b 0 -q -n gamescope-session %patch 0 -p1 %patch 1 -p1 %build %install mkdir -p %{buildroot}%{_bindir}/ mkdir -p %{buildroot}%{_datadir}/ mkdir -p %{buildroot}%{_userunitdir}/ mkdir -p %{buildroot}%{_sysconfdir}/xdg/autostart/ mkdir -p %{buildroot}%{_sysconfdir}/skel/Desktop/ mkdir -p %{buildroot}%{_sysconfdir}/skel/.local/share/ mkdir -p %{buildroot}%{_datadir}/gamescope-session/sessions.d/ mkdir -p %{buildroot}%{_sysconfdir}/gamescope-session/sessions.d/ mkdir -p %{buildroot}%{_libexecdir}/ cp -rv usr/bin/* %{buildroot}%{_bindir} cp -rv usr/share/* %{buildroot}%{_datadir} cp -rv etc/skel/* %{buildroot}%{_sysconfdir}/skel/ chmod +x %{buildroot}%{_sysconfdir}/skel/Desktop/Return.desktop cp -v usr/lib/systemd/user/* %{buildroot}%{_userunitdir} rm -rf %{buildroot}%{_bindir}/steamos-polkit-helpers rm %{buildroot}%{_bindir}/jupiter-biosupdate cp -rv usr/libexec/os-session-select %{buildroot}%{_libexecdir}/os-session-select cp -rv %{SOURCE3} %{buildroot}%{_sysconfdir}/xdg/autostart/ cp -rf %{SOURCE4} %{buildroot}%{_bindir}/ chmod +x %{buildroot}%{_bindir}/deckscale # Do post-installation %post # steam bootstrap needed for gamescope-session first-run tar -xf /usr/lib/steam/bootstraplinux_ubuntu12_32.tar.xz -C %{_sysconfdir}/skel/.local/share/ # make steam start automatically in silent, minimized mode cp -rv /usr/share/applications/steam.desktop %{buildroot}%{_sysconfdir}/xdg/autostart/ sed -i 's|/usr/bin/steam |/usr/bin/steam -silent -steamdeck %U|g' %{_sysconfdir}/xdg/autostart/steam.desktop # KDE/SDDM if [[ ! -z $(systemctl status sddm | grep running) ]]; then if [[ -f /etc/sddm.conf ]]; then sed -i "s|Relogin=.*|Relogin=true|g" /etc/sddm.conf if [[ -z $(cat /etc/sddm.conf | grep Relogin) ]]; then sed -i '/\[Autologin\]/a\Relogin=true' /etc/sddm.conf fi elif [[ -f /etc/sddm.conf.d/kde_settings.conf ]]; then sed -i "s|Relogin=.*|Relogin=true|g" /etc/sddm.conf.d/kde_settings.conf if [[ -z $(cat /etc/sddm.conf.d/kde_settings.conf | grep Relogin) ]]; then sed -i '/\[Autologin\]/a\Relogin=true' /etc/sddm.conf.d/kde_settings.conf fi fi fi # Do before uninstallation %preun # Do after uninstallation %postun # This lists all the files that are included in the rpm package and that # are going to be installed into target system where the rpm is installed. %files %license LICENSE %doc README.md %{_bindir}/gamescope-session %{_bindir}/steam-http-loader %{_bindir}/steamos-session-select %{_bindir}/steamos-desktop-return %{_bindir}/steamos-update %{_bindir}/deckscale %{_bindir}/export-gpu %{_bindir}/steamos-select-branch %{_libexecdir}/os-session-select %{_datadir}/applications/gamescope-mimeapps.list %{_datadir}/applications/steam_http_loader.desktop %{_datadir}/gamescope-session/device-quirks %{_sysconfdir}/skel/ %{_datadir}/gamescope-session/gamescope-session-script %{_datadir}/icons/hicolor/scalable/actions/steamdeck-gaming-return.svg %{_datadir}/icons/hicolor/scalable/apps/install-firefox.svg %{_datadir}/icons/hicolor/scalable/places/distributor-logo.svg %{_datadir}/icons/hicolor/scalable/places/distributor-logo-steamdeck.svg %{_datadir}/polkit-1/actions/org.nobaraproject.update.policy %{_datadir}/polkit-1/actions/org.nobaraproject.session.select.policy %{_datadir}/wayland-sessions/gamescope-session.desktop %{_sysconfdir}/xdg/autostart/deckscale.desktop %{_userunitdir}/gamescope-session.service # Finally, changes from the latest release of your application are generated from # your project's Git history. It will be empty until you make first annotated Git tag. %changelog