File gwe.spec of Package gwe

#
# spec file for package gwe
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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:           gwe
Version:        0.12.3
Release:        0
Summary:        Configuration utility for nVidia video cards
License:        GPL-3.0-or-later
Group:          System/X11/Utilities
URL:            https://gitlab.com/leinardi/gwe
Source0:        https://gitlab.com/leinardi/gwe/-/archive/%{version}/gwe-%{version}.tar.gz
# PATCH-FIX-OPENSUSE gwe-0.12.3-use_system_Xlib.patch
Patch0:         gwe-0.12.3-use_system_Xlib.patch
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  meson >= 0.50.0
BuildRequires:  python3-python-xlib
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  pkgconfig(gtk+-3.0)
Requires:       python3-Rx >= 1.6.1
Requires:       python3-gobject
Requires:       python3-gobject-Gdk
Requires:       python3-injector >= 0.14.1
Requires:       python3-matplotlib >= 3.0.2
Requires:       python3-peewee >= 3.8.0
Requires:       python3-python-xlib
Requires:       python3-py3nvml
Requires:       python3-pyxdg
Requires:       python3-requests
BuildArch:      noarch

%description
GWE is a GTK system utility designed to provide information, control
the fans and overclock your NVIDIA video card and graphics processor.

%prep
%setup -q
%patch0 -p1
# remove link
rm gwe/Xlib
# remove shebang
sed -i '/^#!/d' gwe/__main__.py
chmod -x gwe/__main__.py

%build
%meson
%meson_build

%install
%meson_install
%suse_update_desktop_file -r com.leinardi.gwe System Monitor
%fdupes -s %{buildroot}%{python3_sitelib}

%files
%license COPYING.txt
%doc CHANGELOG.md README.md
%{_bindir}/%{name}
%{_datadir}/applications/com.leinardi.gwe.desktop
%{_datadir}/dbus-1/services/com.leinardi.gwe.service
%{_datadir}/glib-2.0/schemas/com.leinardi.gwe.gschema.xml
%{_datadir}/%{name}
%{_datadir}/icons/hicolor/??x??/apps/com.leinardi.gwe.png
%{_datadir}/icons/hicolor/256x256/apps/com.leinardi.gwe.png
%{_datadir}/icons/hicolor/*2x
%{_datadir}/icons/hicolor/symbolic/apps/com.leinardi.gwe-symbolic.svg
%{_datadir}/metainfo/com.leinardi.gwe.appdata.xml
%{python3_sitelib}/%{name}

%changelog
openSUSE Build Service is sponsored by