File steam-extest.spec of Package steam-extest
#
# spec file for package steam-extest
#
# Copyright (c) 2026 SUSE LLC
#
# 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: steam-extest
Version: 0.1
Release: 0
Summary: Patched Steam desktop file to use extest
# "Limited Installation License" of steam
License: SUSE-Freeware
URL: https://github.com/YugaLinux/Project
Requires: extest-32bit
BuildRequires: steam
Requires: steam
BuildArch: noarch
%description
This package provides a patched Steam desktop file to use extest.
This is required on the Steam Deck to properly support
mouse/keyboard support with gamepad controls in wayland.
%prep
%build
%install
mkdir -p %{buildroot}%{_prefix}/lib/steam-extest
cp %{_datadir}/applications/steam.desktop %{buildroot}%{_prefix}/lib/steam-extest/steam.desktop
sed -i "s,Exec=/usr/bin/steam,Exec=env LD_PRELOAD=/usr/lib/libextest.so /usr/bin/steam," %{buildroot}%{_prefix}/lib/steam-extest/steam.desktop
mkdir -p %{buildroot}%{_sysconfdir}/skel/.local/share/applications
ln -s %{_prefix}/lib/steam-extest/steam.desktop %{buildroot}%{_sysconfdir}/skel/.local/share/applications/steam.desktop
mkdir -p %{buildroot}/etc/skel/.config/autostart
ln -s %{_prefix}/lib/steam-extest/steam.desktop %{buildroot}%{_sysconfdir}/skel/.config/autostart/steam.desktop
mkdir -p %{buildroot}/etc/skel/Desktop
ln -s %{_prefix}/lib/steam-extest/steam.desktop %{buildroot}%{_sysconfdir}/skel/Desktop/steam.desktop
%files
%dir %{_prefix}/lib/steam-extest
%{_prefix}/lib/steam-extest/steam.desktop
%dir %{_sysconfdir}/skel/Desktop
%{_sysconfdir}/skel/Desktop/steam.desktop
%dir %{_sysconfdir}/skel/.config
%dir %{_sysconfdir}/skel/.config/autostart
%{_sysconfdir}/skel/.config/autostart/steam.desktop
%dir %{_sysconfdir}/skel/.local
%dir %{_sysconfdir}/skel/.local/share
%dir %{_sysconfdir}/skel/.local/share/applications
%{_sysconfdir}/skel/.local/share/applications/steam.desktop
%changelog