File radeon-profile.spec of Package radeon-profile

#
# spec file for package radeon-profile
#
# Copyright (c) 2021 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_qt5 /usr/bin/lrelease-qt5
Name:           radeon-profile
Version:        20200824+6
Release:        0
Summary:        Application to read current clocks of ATi Radeon cards
License:        GPL-2.0-only
URL:            https://github.com/marazmista/radeon-profile
Source:         %{name}-%{version}.tar.gz
Patch0:         radeon-profile.patch
BuildRequires:  gcc-c++
BuildRequires:  libqt5-linguist
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Charts)
BuildRequires:  pkgconfig(Qt5WebSockets)
BuildRequires:  pkgconfig(libdrm)
BuildRequires:  pkgconfig(xrandr)
Requires:       %{name}-daemon
Recommends:     Mesa-demo-x
Recommends:     radeon-profile-daemon
Recommends:     xdriinfo
Recommends:     xrandr

%description
Simple application to read current clocks of ATi Radeon cards (xf86-video-ati, xf86-video-amdgpu).

%prep
%autosetup -p1

%build
pushd %{name}
%{lrelease_qt5} %{name}.pro
%qmake5 %{name}.pro
%make_jobs

%install
pushd %{name}
%qmake5_install
popd
%suse_update_desktop_file -r radeon-profile System Monitor
pushd %{name}/translations
find . -maxdepth 1 -name '*.qm' -exec install -Dpm644 '{}' -t '%{buildroot}%{_datadir}/%{name}/' \;
popd

%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/*/*.png

%changelog

openSUSE Build Service is sponsored by