]> git.pld-linux.org Git - packages/thinkfan.git/blob - thinkfan.spec
- install generic sysfs config by default, update desc
[packages/thinkfan.git] / thinkfan.spec
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
10 URL:            http://thinkfan.sourceforge.net/
11 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
12
13 %description
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.
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
28 %install
29 rm -rf $RPM_BUILD_ROOT
30 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man1,/etc/rc.d/init.d}
31
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
36
37 %clean
38 rm -rf $RPM_BUILD_ROOT
39
40 %post
41 /sbin/chkconfig --add thinkfan
42 %service thinkfan restart
43
44 %preun
45 if [ "$1" = "0" ]; then
46         /sbin/chkconfig --del thinkfan
47         %service thinkfan stop
48 fi
49
50 %files
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*
This page took 0.098862 seconds and 3 git commands to generate.