Package cpuspeed: Specfile

Name: cpuspeed
Version: 1.2.1
Release: alt2

Summary: CPU Frequency adjusting daemon
License: GPLv2+
Group: System/Kernel and hardware

Url: http://carlthompson.net/Software/CPUSpeed
Source0: http://carlthompson.net/dl/cpuspeed/cpuspeed-%version.tar.gz
# TODO: initscript logic improvement
Source1: cpuspeed.init
Source2: cpuspeed.conf

Patch1: cpuspeed-1.2.1-fedora-warning.patch
Patch2: cpuspeed-1.2.1-fedora-idlenice.patch

# Automatically added by buildreq on Wed Apr 18 2007
BuildRequires: gcc-c++

%description
cpuspeed is a daemon that dynamically changes the speed of your processor
depending upon its current workload if it is capable (needs Intel Speedstep,
AMD PowerNow!, or similar support).

The program can also be configured to reduce the CPU clock speed if the CPU
temperature gets too high or if the computer's AC adapter is disconnected.

%prep
%setup
%patch1 -p1
%patch2 -p1
%__subst 's/strip /# strip /' Makefile

%build
%make COPTS="%optflags"

%install
install -pD -m755 cpuspeed %buildroot/sbin/cpuspeed
install -pD -m755 %_sourcedir/cpuspeed.init %buildroot%_initdir/cpuspeed
install -pD -m644 %_sourcedir/cpuspeed.conf %buildroot%_sysconfdir/sysconfig/cpuspeed

%post
%post_service cpuspeed

%preun
%preun_service cpuspeed

%files
%doc CHANGES FEATURES USAGE
%config(noreplace) %_sysconfdir/sysconfig/cpuspeed
/sbin/cpuspeed
%_initdir/cpuspeed

%changelog
* Tue Mar 11 2008 Victor Forsyuk <force@altlinux.org> 1.2.1-alt2
- Added condstop to initscript.

* Wed Apr 18 2007 Victor Forsyuk <force@altlinux.org> 1.2.1-alt1
- 1.2.1
- Fix summary.
- Apply optflags.
- Patch that allows to not count nice time as idle time.
- Add service management to installation scripts.

* Sat Apr 17 2004 Grigory Milev <week@altlinux.ru> 1.1-alt1
- Initial build.