File radeon-profile.spec of Package radeon-profile

Name: radeon-profile
License: GPL-2.0
Group: System/Monitoring
AutoReqProv: on
Version: 1
Release: 1%{?dist}
Summary: Display info about radeon cards
Source0: %{name}-%{version}.tar.gz


%if 0%{?rhel}
# RHEL, CentOS, ScientificLinux
BuildRequires: libjpeg-turbo-devel qt-devel libXrandr-devel
Requires: lm_sensors xdriinfo glxinfo
# Fedora, OpenSuse, SLE, Mageia
Recommends: lm_sensors xdriinfo glxinfo

%if 0%{?suse_version}
# OpenSuse, SLE
BuildRequires: libqt5-qtbase-devel libqt5-linguist libXrandr-devel
BuildRequires: libQt5Charts5-devel

%if 0%{?suse_version} >= 1140
BuildRequires:  update-desktop-files


%if 0%{?fedora}
# Fedora
BuildRequires: qt5-qtbase-devel qt5-linguist libXrandr-devel
BuildRequires: qt5-qtcharts-devel

# Mageia
BuildRequires: libqt5core-devel libqt5widgets-devel libqt5network-devel libqt5printsupport-devel qttools5 libxrandr-devel
BuildRequires: libqt5charts-devel



# All
BuildRequires: make gcc-c++

Radeon profile is an user friendly application that allows to read clocks, voltages and temperatures, manage power profiles and fan speed (on HD7000 series cards and above) and overclock your GPU (on Amdgpu driver).
Radeon profile works with the open source radeon driver (xf86-video-ati), the Amdgpu driver (xf86-video-amdgpu or Amdgpu-Pro) and the Catalyst driver (fglrx).

%setup -q

cd radeon-profile
QARGS=( QMAKE_CFLAGS+="%optflags" QMAKE_CXXFLAGS+="%optflags" QMAKE_STRIP="/bin/true")
qmake-qt5 "${QARGS[@]}" || qmake "${QARGS[@]}" || qmake-qt4 "${QARGS[@]}"
lrelease-qt5 || lrelease || lrelease-qt4

cd radeon-profile
install -Dm755 "radeon-profile" "%{buildroot}%{_bindir}/radeon-profile"
install -Dm644 "extra/radeon-profile.png" "%{buildroot}%{_datadir}/pixmaps/radeon-profile.png"
install -Dm644 "extra/radeon-profile.desktop" "%{buildroot}%{_datadir}/applications/radeon-profile.desktop"
cd translations
for t in $(ls *.qm); do install -Dm644 "$t" "%{buildroot}%{_datadir}/radeon-profile/$t"; done

%if 0%{?suse_version} >= 1140

%if 0%{?suse_version} >= 1140


* Fri Jan 29 2016
- Port of OBS package to other Arch / Debian / Ubuntu

* Sun Oct 27 2013
- initial Open Build Service package

* Sat Mar 2 2013
-Initial commit
openSUSE Build Service is sponsored by