File gkrellm-cpufreq.spec of Package gkrellm-cpufreq

#
# spec file for package gkrellm-cpufreq
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           gkrellm-cpufreq
%define src_name    gkrellm2-cpufreq
Version:        0.6.4
Release:        0
License:        GPL-2.0+
Summary:        Gkrellm plugin - CPU Frequency
Url:            http://chw.populus.org/rub/7
Group:          System/GUI/Other
Source0:        http://christoph.winkelmann.googlepages.com/%{src_name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE gkrellm-cpufreq-cpupower.patch pgajdos@suse.cz -- use cpupower instead of cpufreq
Patch0:         gkrellm-cpufreq-cpupower.patch
# PATCH-FIX-UPSTREAM gkrellm-cpufreq-cpulabel.patch pgajdos@suse.cz -- indicate cpu number in frequency list
Patch1:         gkrellm-cpufreq-cpulabel.patch
# PATCH-FIX-UPSTREAM gkrellm-cpufreq-couple-controls.patch pgajdos@suse.cz -- beave little bit better for coupled controls
Patch2:         gkrellm-cpufreq-couple-controls.patch
Requires:       cpupower
BuildRequires:  cpupower-devel
BuildRequires:  gkrellm-devel
BuildRequires:  pkg-config
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gtk+-2.0)
Requires:       gkrellm
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
A gkrellm2 plugin for displaying and manipulating CPU frequency

%prep
%setup -q -n %{src_name}-%{version}
%patch0
%patch1
%patch2

%build
sed -i "s:-lcpufreq:-lcpupower:" Makefile
make CFLAGS="%{optflags}" %{?_smp_mflags}

%install
sed -i "s:-g root -o root ::" Makefile
sed -i "s:/lib/:/%{_lib}/:" Makefile
%make_install

%clean

%files
%defattr(-,root,root)
# INSTALL is packaged on purpose. There are post-install instructions
%doc ChangeLog LICENSE README
%dir %{_libdir}/gkrellm2/
%dir %{_libdir}/gkrellm2/plugins
%{_libdir}/gkrellm2/plugins/cpufreq.so
%{_sbindir}/cpufreqnextgovernor

%changelog
openSUSE Build Service is sponsored by