File ProtonUp-Qt.spec of Package ProtonUp-Qt
#
# spec file for package ProtonUp-Qt
#
# Copyright (c) 2024 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/
#
%define lrelease_qt6 %{_bindir}/lrelease6
%define pythons python3
Name: ProtonUp-Qt
Version: 2.13.0
Release: 0
Summary: Install and manage GE-Proton
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
License: GPL-3.0-or-later
URL: https://github.com/DavidoTek/ProtonUp-Qt
Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pyside6}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: cmake(Qt6LinguistTools)
Requires: python3-pyside6
Requires: python3-pyxdg
Requires: python3-psutil
Requires: python3-pyaml
Requires: python3-requests
Requires: python3-steam
Requires: python3-inputs
Requires: python3-zstandard
Requires: python3-vdf >= 3.3
Requires: xxd
Requires: xwininfo
Requires: xrandr
Requires: xprop
Requires: xdotool
BuildArch: noarch
%description
Install and manage GE-Proton 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.
%lang_package
%prep
%autosetup -p1
sed -i 's/Exec=net.davidotek.pupgui2/Exec=protonup-qt/g' share/applications/net.davidotek.pupgui2.desktop
%build
%pyproject_wheel
%install
%pyproject_install
cp -R share %{buildroot}%{_prefix}/
# Fix locale
%{lrelease_qt6} i18n/*.ts
%find_lang pupgui2 --all-name --with-qt
%fdupes %{buildroot}%{python_sitelib}/
%files -f pupgui2.lang
%license LICENSE
%doc README.md
%{_bindir}/protonup-qt
%{python_sitelib}/pupgui2/
%{python_sitelib}/protonup_qt-%{version}.dist-info/
%{_datadir}/applications/net.davidotek.pupgui2.desktop
%{_datadir}/icons/hicolor/
%{_datadir}/metainfo/net.davidotek.pupgui2.appdata.xml
%changelog