File protonup-qt.spec of Package protonup-qt
%{?sle15_python_module_pythons}
%define skip_python310 1
%define skip_python311 1
%define skip_python312 1
%define rel_ver 2.14.0
Name: protonup-qt
Version: 2.14.x
Release: 1.0
Url: https://github.com/DavidoTek/ProtonUp-Qt/
Summary: Install and manage Proton-GE for Steam
Group: System/GUI/Qt
License: GPL-3.0
Source0: %{name}-%{version}.tar.xz
Source1: %{name}.png
BuildRequires: desktop-file-utils
BuildRequires: update-desktop-files
BuildRequires: hicolor-icon-theme
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module wheel}
BuildRequires: %{python_module py >= 1.4}
BuildRequires: python-rpm-macros
Requires: libgthread-2_0-0
Requires: %{python_module pyside6}
Requires: %{python_module pyxdg}
Requires: %{python_module zstandard}
Requires: %{python_module vdf}
Requires: %{python_module inputs}
Requires: %{python_module PyYAML}
Requires: %{python_module steam}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%python_subpackages
%description
Install and manage Proton-GE and Luxtorpeda for Steam and Wine-GE for Lutris with this graphical user interface.
Based on AUNaseef's ProtonUp, made with Python 3 and Qt 6.
%prep
%autosetup -n %{name}-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
mkdir -p %{buildroot}/%{_datadir}/pixmaps/
install -D -m 644 %{SOURCE1} %{buildroot}/%{_datadir}/pixmaps/%{name}.png
mkdir -p %{buildroot}/%{_datadir}/applications/
# Create .desktop file
cat > %{buildroot}/%{_datadir}/applications/%{name}.desktop << EOM
[Desktop Entry]
Type=Application
Name=ProtonUp-Qt
GenericName= Install and manage GE-Proton and Wine-GE
Comment=Install and manage GE-Proton and Luxtorpeda for Steam and Wine-GE for Lutris
Icon=/usr/share/pixmaps/%{name}.png
TryExec=%{name}
Exec=%{name}
Terminal=false
Categories=Game;Utility;
Keywords=Steam;Proton-GE;
StartupWMClass=%{name}
EOM
%files %{python_files}
%defattr(-,root,root)
%{python_sitelib}/pupgui2
%{python_sitelib}/protonup_qt-%{rel_ver}.dist-info
%{_bindir}/%{name}
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%changelog