]>
Commit | Line | Data |
---|---|---|
4c854604 AM |
1 | Summary: ThinkPad fan control program |
2 | Name: thinkfan | |
3 | Version: 0.7.1 | |
4 | Release: 1 | |
5 | License: GPL | |
6 | Group: Base | |
7 | Source0: http://downloads.sourceforge.net/thinkfan/%{name}-%{version}.tar.gz | |
8 | # Source0-md5: 0e98ec7854edbb8186544f3aec6d95e4 | |
9 | Source1: %{name}.init | |
5f5f68ff | 10 | URL: http://thinkfan.sourceforge.net/ |
4c854604 AM |
11 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
12 | ||
13 | %description | |
5f5f68ff ER |
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. | |
4c854604 AM |
18 | |
19 | %prep | |
20 | %setup -q | |
21 | sed -i -e 's#gcc#%{__cc}#g' Makefile | |
22 | ||
23 | %build | |
24 | %{__make} \ | |
25 | CC="%{__cc}" \ | |
26 | CFLAGS="%{rpmcppflags} %{rpmcflags}" | |
27 | ||
4c854604 AM |
28 | %install |
29 | rm -rf $RPM_BUILD_ROOT | |
4c854604 AM |
30 | install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man1,/etc/rc.d/init.d} |
31 | ||
5f5f68ff ER |
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 | |
4c854604 AM |
36 | |
37 | %clean | |
38 | rm -rf $RPM_BUILD_ROOT | |
39 | ||
40 | %post | |
41 | /sbin/chkconfig --add thinkfan | |
5f5f68ff | 42 | %service thinkfan restart |
4c854604 AM |
43 | |
44 | %preun | |
45 | if [ "$1" = "0" ]; then | |
5f5f68ff ER |
46 | /sbin/chkconfig --del thinkfan |
47 | %service thinkfan stop | |
4c854604 AM |
48 | fi |
49 | ||
50 | %files | |
51 | %defattr(644,root,root,755) | |
5f5f68ff ER |
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} | |
4c854604 AM |
55 | %attr(755,root,root) %{_sbindir}/thinkfan |
56 | %{_mandir}/man1/thinkfan.1* |