1 Summary: ThinkPad fan control program
7 Source0: http://downloads.sourceforge.net/thinkfan/%{name}-%{version}.tar.gz
8 # Source0-md5: 0e98ec7854edbb8186544f3aec6d95e4
10 URL: http://thinkfan.sourceforge.net/
11 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
14 A minimalist fan control program. Supports any kind of system via the
15 sysfs hwmon interface (/sys/class/hwmon). It is designed to eat as
16 little CPU power as possible. The development was inspired by the
17 excellent work people have done on thinkwiki.org.
21 sed -i -e 's#gcc#%{__cc}#g' Makefile
26 CFLAGS="%{rpmcppflags} %{rpmcflags}"
29 rm -rf $RPM_BUILD_ROOT
30 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man1,/etc/rc.d/init.d}
32 install -p thinkfan $RPM_BUILD_ROOT%{_sbindir}
33 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
34 cp -p thinkfan.conf.sysfs $RPM_BUILD_ROOT%{_sysconfdir}/thinkfan.conf
35 cp -p thinkfan.1 $RPM_BUILD_ROOT%{_mandir}/man1
38 rm -rf $RPM_BUILD_ROOT
41 /sbin/chkconfig --add thinkfan
42 %service thinkfan restart
45 if [ "$1" = "0" ]; then
46 /sbin/chkconfig --del thinkfan
47 %service thinkfan stop
51 %defattr(644,root,root,755)
52 %doc NEWS README ChangeLog thinkfan.conf.thinkpad
53 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
54 %attr(754,root,root) /etc/rc.d/init.d/%{name}
55 %attr(755,root,root) %{_sbindir}/thinkfan
56 %{_mandir}/man1/thinkfan.1*