File gamescope-session-steam-session-select-gnome.spec of Package gamescope-session-steam-session-select-gnome
#
# spec file for package gamescope-session-steam-session-select-gnome
#
# Copyright (c) 2026 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: gamescope-session-steam-session-select-gnome
Version: 0+git20260123.fd29a6f
Release: 0
Summary: Scripts and tools to switch sessions for GNOME and GDM
License: GPL-3.0-only
URL: https://github.com/YugaLinux/gamescope-session-steam-session-select-gnome
Requires: gamescope-session-steam-shared
Recommends: gamescope-session-steam
Supplements: gamescope-session-steam
BuildRequires: gamescope-session-steam-shared
BuildRequires: pkgconfig(systemd)
BuildRequires: polkit
Requires: polkit
BuildArch: noarch
Source0: %{name}-%{version}.tar.xz
Provides: gamescope-session-steam-session-select
Conflicts: gamescope-session-steam-session-select
%description
This package provides the scripts and tools to
switch sessions for GNOME and GDM.
%prep
%autosetup -p1
%build
%install
# Libexec script
install -d -m 0755 %{buildroot}%{_libexecdir}/gamescope-session-steam
install -m 0755 usr/libexec/gamescope-session-steam/system-session-select %{buildroot}%{_libexecdir}/gamescope-session-steam/system-session-select
install -m 0755 usr/libexec/gamescope-session-steam/system-startup-gamescope %{buildroot}%{_libexecdir}/gamescope-session-steam/system-startup-gamescope
# Polkit policy
install -d -m 0755 %{buildroot}%{_datadir}/polkit-1/actions
install -m 0644 usr/share/polkit-1/actions/org.gamescope-session-steam-session-select.policy %{buildroot}%{_datadir}/polkit-1/actions/org.gamescope-session-steam-session-select.policy
# Systemd service
install -d -m 0755 %{buildroot}%{_unitdir}
install -m 0644 usr/lib/systemd/system/system-session-select-startup.service %{buildroot}%{_unitdir}/system-session-select-startup.service
#Desktop file + icon
install -d -m 0755 %{buildroot}%{_datadir}/applications
install -d -m 0755 %{buildroot}%{_datadir}/icons/gamescope-session-steam/scalable/actions
install -m 0755 usr/share/applications/org.gamescope-session-steam-session-select.desktop %{buildroot}%{_datadir}/applications/org.gamescope-session-steam-session-select.desktop
install -m 0644 usr/share/icons/gamescope-session-steam/scalable/actions/return-to-game-mode.svg %{buildroot}%{_datadir}/icons/gamescope-session-steam/scalable/actions/return-to-game-mode.svg
install -m 0644 usr/share/icons/gamescope-session-steam/index.theme %{buildroot}%{_datadir}/icons/gamescope-session-steam/index.theme
# Skel Desktop file
install -d -m 0755 %{buildroot}%{_sysconfdir}/skel/Desktop
ln -sf %{_datadir}/applications/org.gamescope-session-steam-session-select.desktop %{buildroot}%{_sysconfdir}/skel/Desktop/org.gamescope-session-steam-session-select.desktop
%pre
%systemd_pre system-session-select-startup.service
%post
%systemd_post system-session-select-startup.service
%preun
%systemd_preun system-session-select-startup.service
%postun
%systemd_postun system-session-select-startup.service
%files
%license LICENSE
%doc README.md
%{_libexecdir}/gamescope-session-steam/system-session-select
%{_libexecdir}/gamescope-session-steam/system-startup-gamescope
%{_datadir}/polkit-1/actions/org.gamescope-session-steam-session-select.policy
%{_unitdir}/system-session-select-startup.service
%{_datadir}/applications/org.gamescope-session-steam-session-select.desktop
%{_datadir}/icons/gamescope-session-steam
%dir %{_sysconfdir}/skel/Desktop
%{_sysconfdir}/skel/Desktop/org.gamescope-session-steam-session-select.desktop
%changelog