File qpowertop.spec of Package qpowertop
#
# spec file for package qpowertop
#
# Copyright (c) 2011-2012 Malcolm J Lewis <malcolmlewis@opensuse.org>
#
# 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 http://bugs.opensuse.org/
#
Name: qpowertop
Version: 0+git_r18
Release: 0
License: GPL-2.0
Summary: QT GUI for powertop
Url: http://qpowertop.googlecode.com/
Group: System/X11/Utilities
Source0: http://qpowertop.googlecode.com/files/qpowertop.tar.gz
#PATCH-FIX-OPENSUSE qpowertop-fix-for-newer-gcc.patch malcolmlewis@opensuse.org -- Add missing includes for newer version of gcc.
Patch0: qpowertop-fix-for-newer-gcc.patch
#PATCH-FIX-OPENSUSE qpowertop-slot-not-connecting.patch malcolmlewis@opensuse.org -- Fix no matching signal for on_timer_timeout().
Patch1: qpowertop-slot-not-connecting.patch
BuildRequires: cmake
BuildRequires: libkde4-devel
BuildRequires: update-desktop-files
Requires: powertop
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
QPowerTop is a graphical extension for PowerTOP project replacing ncurses
based UI with Qt interface.
%prep
%setup -q -n %{name}
%patch0 -p1
%patch1 -p1
%build
# Create qmake cache file to add rpm optflags
cat > .qmake.cache <<EOF
QMAKE_CFLAGS += %{optflags}
QMAKE_CXXFLAGS += %{optflags}
EOF
qmake %{name}.pro
make
%install
mkdir -p %{buildroot}%{_sbindir}
install -m 0755 %{name} %{buildroot}%{_sbindir}
%files
%defattr(-,root,root)
%{_sbindir}/%{name}
%changelog