Blob Blame History Raw
Name:           athcool
Version:        0.3.12
Release:        3%{?dist}
Summary:        Enables/disables Powersaving mode for AMD processors

Group:          System Environment/Daemons
License:        GPLv2+
URL:		 http://members.jcom.home.ne.jp/jacobi/linux/softwares.html#athcool
Source0:        http://members.jcom.home.ne.jp/jacobi/linux/files/%{name}-%{version}.tar.gz
Source1:        athcool.init
Patch0:         athcool-0.3.11.quiet.patch
Patch1:		 athcool-0.3.12-buildfix.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  pciutils-devel
BuildRequires:  zlib-devel
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
# It's for AMD Athlon/Duron processors (#179674)
ExclusiveArch:  %{ix86}


%description
athcool is a small utility, enabling/disabling Powersaving mode
for AMD Athlon/Duron processors.

Since enabling Powersaving mode, you can save power consumption,
lower CPU temprature when CPU is idle.

Powersaving works if your kernel support ACPI (APM not work),
because athcool only set/unset "Disconnect enable when STPGNT detected"
bits in the Northbridge of Chipset.
To really save power, someone has to send the STPGNT signal when idle.
This is done by the ACPI subsystem when C2 state entered.

!!!WARNING!!!
Depending on your motherboard and/or hardware components,
enabling powersaving mode may cause that:

 * noisy or distorted sound playback
 * a slowdown in harddisk performance
 * system locks or instability
 * massive filesystem corruption (rare, but observed at least once)

If you met those problems, you should not use athcool.
Please use athcool AT YOUR OWN RISK.


%prep
%setup -q
%patch0 -p1
%patch1 -p1
sed -i -e 's/install -s/install/' Makefile


%build
make \
        CC="%{__cc}" \
        CFLAGS="%{optflags}" \
        %{?_smp_mflags}


%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
install -D -p -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}


%clean
rm -rf %{buildroot}


%post
/sbin/chkconfig --add athcool

%preun
if [ $1 = 0 ]; then
        /sbin/service athcool stop >/dev/null 2>&1
        /sbin/chkconfig --del athcool
fi

%postun
if [ "$1" -ge "1" ]; then
        /sbin/service athcool condrestart >/dev/null 2>&1
fi


%files
%defattr(-,root,root,-)
%doc COPYING ChangeLog README
%{_initrddir}/athcool
%{_mandir}/man8/athcool.8*
%{_sbindir}/athcool


%changelog
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.12-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Feb 11 2008 Adel Gadllah <adel.gadllah@gmail.com> 0.3.12-2
- Fix build

* Mon Feb 11 2008 Adel Gadllah <adel.gadllah@gmail.com> 0.3.12-1
- Update to 0.3.12

* Mon Feb 11 2008 Adel Gadllah <adel.gadllah@gmail.com> 0.3.11-6
- Rebuild for gcc-4.3
- Fix license tag

* Fri Sep 15 2006 Dawid Gajownik <gajownik[AT]gmail.com> - 0.3.11-5
- Rebuild for FE6
- Update e-mail address
- Fix mixed-use-of-spaces-and-tabs rpmlint warning

* Fri Feb 24 2006 Dawid Gajownik <gajownik[AT]gmail.com> - 0.3.11-4
- Deuglify init script

* Sat Dec  3 2005 Dawid Gajownik <gajownik[AT]gmail.com> - 0.3.11-3
- Fix broken debuginfo package (Ville Skyttä, #174881)

* Wed Aug 10 2005 Dawid Gajownik <gajownik[AT]gmail.com> - 0.3.11-2
- Correct Summary field.

* Wed Aug 10 2005 Dawid Gajownik <gajownik[AT]gmail.com> - 0.3.11-1
- Initial RPM release.