]> git.pld-linux.org Git - packages/athcool.git/blobdiff - athcool.spec
- release 2
[packages/athcool.git] / athcool.spec
index 427fbfdd40188f9687bc822ad0bcfd044130872a..4a546fab1e2251a4bdbeb5ddac740356d018b88b 100644 (file)
@@ -1,63 +1,84 @@
-# TODO:
-# - convert Japanese to EUCJP
-# - make init-script (?)
-#
 Summary:       Athlon Powersaving bits enabler
-Summary(ja):   AMD Athlon/Duron \e$B$N>JEENO5!G=$rM-8z$K$9$k\e(B
-Summary(pl):   Narzêdzie do w³±czania trybu oszczêdno¶ci energii procesorów Athlon
+Summary(ja.UTF-8):     AMD Athlon/Duron の省電力機能を有効にする
+Summary(pl.UTF-8):     Narzędzie do włączania trybu oszczędności energii procesorów Athlon
 Name:          athcool
-Version:       0.3.0
-Release:       0.1
-License:       GPL
+Version:       0.3.11
+Release:       2
+License:       GPL v2+
 Group:         Applications/System
-#Source0:      http://members.jcom.home.ne.jp/jacobi/linux/files/%{name}-%{version}.tar.gz
-Source0:       http://piorun.ds.pg.gda.pl/~blues/SOURCES/%{name}-%{version}.tar.gz
-# Source0-md5: a97a48071d0af234fbc788b7ee82878e
-URL:           http://members.jcom.home.ne.jp/jacobi/linux/softwares-ja.html
-BuildPrereq:   pciutils-devel
+Source0:       http://members.jcom.home.ne.jp/jacobi/linux/files/%{name}-%{version}.tar.gz
+# Source0-md5: 4f550f9aaaa68a01d1e8ae31491e5406
+Source1:       %{name}.init
+Source2:       %{name}.sysconfig
+URL:           http://members.jcom.home.ne.jp/jacobi/linux/softwares.html
+BuildRequires: pciutils-devel
+BuildRequires: pkgconfig
+BuildRequires: rpmbuild(macros) >= 1.268
+Requires(post,preun):  /sbin/chkconfig
+Requires:      rc-scripts
 ExclusiveArch: %{ix86}
-Buildroot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-athcool is a small utility, enabling/disabling Powersaving mode for
+athcool is a small utility for enabling/disabling powersaving mode on
 AMD Athlon/Duron processors.
 
-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.
+Powersaving works if your kernel supports ACPI (APM doesn't work),
+because athcool only sets/unsets "Disconnect enable when STPGNT
+detected" bits in the northern bridge of the chipset.
 
-%description -l ja
-\e$B!!\e(Bathcool \e$B$O\e(B AMD Athlon/Duron
-\e$B$N>JEENO5!G=$rM-8z$K$7!"L5BL$JH/G.$rM^$($^$9!#\e(B CPU
-\e$BMxMQN($,Dc$$;~$K$O7`E*$KH/G.$,8:$j$^$9!#\e(B
-\e$B!!%A%C%W%;%C%H$K$h$C$F$O@5>o$K:nF0$7$J$$>l9g$b$"$j$^$9$N$G!">e5-\e(B
-URL \e$B$r;2>H\e(B \e$B$N>e$G;HMQ$7$F$/$@$5$$!#\e(B
-\e$B!!$J$*!">JEENO5!G=$K$O\e(B ACPI \e$BBP1~$N%+!<%M%k$,I,MW$G$9!#\e(B
+%description -l ja.UTF-8
+ athcool は AMD Athlon/Duron
+の省電力機能を有効にし、無駄な発熱を抑えます。 CPU
+利用率が低い時には劇的に発熱が減ります。
+ チップセットによっては正常に作動しない場合もありますので、上記 URL
+を参照 の上で使用してください。  なお、省電力機能には ACPI
+対応のカーネルが必要です。
 
-%description -l pl
-athcool jest ma³ym programem narzêdziwym s³u¿acym do w³±czania i wy³±czania
-trybu oszczêdno¶ci energii procesorów AMD Athlon/Duron.
+%description -l pl.UTF-8
+athcool jest małym programem narzędziowym służącym do włączania i
+wyłączania trybu oszczędności energii procesorów AMD Athlon/Duron.
 
-Tryb oszczêdno¶ci energii dzia³a gdy j±dro zawiera wsparcie dla ACPI (z APM
-nie dzia³a), gdy¿ athcool jedynie ustawia/zeruje flagi bitowe "Disconnect
-enable when STPGNT detected" w mostku pó³nocnym chipsetu.
+Tryb oszczędności energii działa, gdy jądro zawiera wsparcie dla ACPI
+(z APM nie działa), gdyż athcool jedynie ustawia/zeruje flagi bitowe
+"Disconnect enable when STPGNT detected" w mostku północnym chipsetu.
 
 %prep
 %setup -q
 
 %build
-%{__make}
+%{__make} \
+       CC="%{__cc}" \
+       CFLAGS="%{rpmcflags}" \
+       LIBS="`pkg-config --libs libpci`"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-#install -d $RPM_BUILD_ROOT%{_sbindir}
-#install -m755 -s athcool $RPM_BUILD_ROOT%{_sbindir}
-%makeinstall
+install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
+
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+/sbin/chkconfig --add athcool
+%service athcool restart
+
+%preun
+if [ "$1" = "0" ]; then
+       %service athcool stop
+       /sbin/chkconfig --del athcool
+fi
+
 %files
 %defattr(644,root,root,755)
-%doc README COPYING ChangeLog
+%doc README ChangeLog
 %attr(755,root,root) %{_sbindir}/athcool
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
+%{_mandir}/man8/*
This page took 0.054891 seconds and 4 git commands to generate.