rpms/athcool/devel athcool.init, NONE, 1.1 athcool.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Dawid Gajownik (gajownik) fedora-extras-commits at redhat.com
Thu Aug 11 08:23:29 UTC 2005


Author: gajownik

Update of /cvs/extras/rpms/athcool/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26361/devel

Modified Files:
	.cvsignore sources 
Added Files:
	athcool.init athcool.spec 
Log Message:
auto-import athcool-0.3.11-2 on branch devel from athcool-0.3.11-2.src.rpm


--- NEW FILE athcool.init ---
#!/bin/sh
#
# athcool      Athlon Powersaving bits enabler
#
# chkconfig:   - 10 90
# description: This scripts runs athcool, enabling/disabling \
#              powersaving mode for Athlon/Duron processors.
# processname: athcool

# Source function library.
. /etc/rc.d/init.d/functions

exec="/usr/sbin/athcool"
prog=$(basename $exec)

[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog

lockfile=/var/lock/subsys/$prog

start() {
    echo -n $"Enabling Athlon powersaving mode..."
    if $prog on > /dev/null; then
        retval=$?
        echo " done."
    else
        retval=$?
        echo " failed."
    fi
    [ $retval -eq 0 ] && touch $lockfile
    return $retval
}

stop() {
    echo -n "Disabling Athlon powersaving mode..."
    if $prog off > /dev/null; then
        retval=$?
        echo " done."
    else
        retval=$?
        echo " failed."
    fi
    [ $retval -eq 0 ] && rm -f $lockfile
    return $retval
}

restart() {
    stop
    start
}

reload() {
    restart
}

force_reload() {
    restart
}

fdr_status() {
    echo "Query Athlon powersaving mode..."
        $prog stat
}

case "$1" in
    start|stop|restart|reload)
        $1
        ;;
    force-reload)
        force_reload
        ;;
    status)
        fdr_status
        ;;
    condrestart|try-restart)
  	[ ! -f $lockfile ] || restart
	;;
    *)
        echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
        exit 2
esac


--- NEW FILE athcool.spec ---
Name:           athcool
Version:        0.3.11
Release:        2
Summary:        Enables/disables Powersaving mode for AMD processors

Group:          System Environment/Daemons
License:        GPL
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:        %{name}.init
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  pciutils-devel
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
# It's for AMD Athlon/Duron processors
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

%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}/%{name}
%{_mandir}/man8/%{name}.8*
%{_sbindir}/%{name}

%changelog
* Wed Aug 10 2005 Dawid Gajownik <gajownik[AT]fedora.pl> - 0.3.11-2
- Correct Summary field.

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


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/athcool/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	11 Aug 2005 08:21:15 -0000	1.1
+++ .cvsignore	11 Aug 2005 08:23:27 -0000	1.2
@@ -0,0 +1 @@
+athcool-0.3.11.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/athcool/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	11 Aug 2005 08:21:15 -0000	1.1
+++ sources	11 Aug 2005 08:23:27 -0000	1.2
@@ -0,0 +1 @@
+0fdcc3e32f8e795ff95747e640710ce4  athcool-0.3.11.tar.gz




More information about the fedora-extras-commits mailing list