File kpowersave.spec of Package kpowersave
#
# spec file for package kpowersave (Version 0.7.3_svn3167.1)
#
# Copyright (c) 2008 SUSE LINUX Products 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 http://bugs.opensuse.org/
#
# norootforbuild
Name: kde3-kpowersave
Url: http://sourceforge.net/projects/powersave/
BuildRequires: dbus-1-qt3-devel dummy-release hal-devel kdelibs3-devel
License: GPL v2 only
Group: System/GUI/KDE
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: KDE Frontend for Battery Monitoring, Suspend, CPU Freq and General Power Management Support
Version: 0.7.3_svn3167.1
Release: 1
ExclusiveArch: %ix86 x86_64 ia64 ppc ppc64
Requires: /sbin/pidof xorg-x11
#Source: %{name}-%{version}.tar.bz2
Source: kpowersave-0.7.3_svn3167.tar.bz2
Patch0: kpowersave-icon-size.patch
Requires: kde3-kpowersave-lang = %{version}
Provides: kpowersave = %{version}
Obsoletes: kpowersave = %{version}
%description
KPowersave provides battery monitoring, CPU frequency control and
suspend/standby triggers, and more power management features for KDE.
It uses HAL (formerly the powersave daemon) and supports APM and ACPI
for several architectures. Together with the powersave package and the
YaST power management module, it is the preferred package that should
be used for battery monitoring and control of power management related
tasks.
%lang_package
%prep
#%setup -n %{name}-%{version} -q
%setup -n kpowersave-0.7.3_svn3167 -q
%patch0 -p1
echo "BUILD_DIST: $BUILD_DIST"
. /etc/opt/kde3/common_options
update_admin
sed -i 's|QRegExp::QRegExp|QRegExp|g' src/inactivity.cpp
sed -i 1i\ '#include <unistd.h>' src/hardware_cpu.cpp
%build
. /etc/opt/kde3/common_options
%if 0%{?sles_version} > 0
./configure --enable-yast-entry --enable-suse-sles
%else
./configure
%endif
make %{?jobs:-j %jobs}
%install
. /etc/opt/kde3/common_options
make DESTDIR=$RPM_BUILD_ROOT $INSTALL_TARGET
rm -rf %{buildroot}/opt/kde3/share/apps/kpowersave/icons/crystalsvg/16x16/actions/laptop*.png
%suse_update_desktop_file kpowersave Utility TrayIcon
%find_lang kpowersave
%post
%{run_ldconfig}
%postun
%{run_ldconfig}
%files lang -f kpowersave.lang
%defattr(-,root,root)
%dir /opt/kde3/share/locale/km
%dir /opt/kde3/share/locale/km/LC_MESSAGES
%files
%defattr(-,root,root)
%doc README AUTHORS ChangeLog COPYING INSTALL NEWS
/opt/kde3/bin/*
/opt/kde3/share/config/kpowersaverc
/opt/kde3/share/autostart/kpowersave-autostart.desktop
/opt/kde3/share/apps/kpowersave
/opt/kde3/share/icons/??color
/opt/kde3/share/applications/kde/kpowersave.desktop
/opt/kde3/lib*/kde3/kpowersave.*
/opt/kde3/lib*/libkdeinit_kpowersave.*
%changelog