]> git.pld-linux.org Git - packages/thinkfan.git/blob - thinkfan.spec
b56ff9607d6d0255b00a4659a5fb125199d03669
[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 hardware through the
15 sysfs hwmon interface and most Thinkpads through /proc/acpi/ibm.
16
17 %prep
18 %setup -q
19 sed -i -e 's#gcc#%{__cc}#g' Makefile
20
21 %build
22 %{__make} \
23         CC="%{__cc}" \
24         CFLAGS="%{rpmcppflags} %{rpmcflags}"
25
26 %{__make}
27
28 %install
29 rm -rf $RPM_BUILD_ROOT
30
31 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man1,/etc/rc.d/init.d}
32
33 install thinkfan $RPM_BUILD_ROOT%{_sbindir}
34 install thinkfan.1 $RPM_BUILD_ROOT%{_mandir}/man1
35 install thinkfan.conf.thinkpad $RPM_BUILD_ROOT%{_sysconfdir}/thinkfan.conf
36 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
37
38 %clean
39 rm -rf $RPM_BUILD_ROOT
40
41 %post
42 /sbin/chkconfig --add thinkfan
43 %service thinkfan reload "thinkfan daemon"
44
45 %preun
46 if [ "$1" = "0" ]; then
47         /sbin/chkconfig --del thinkfan
48 fi
49
50 %files
51 %defattr(644,root,root,755)
52 %doc NEWS README ChangeLog thinkfan.conf.sysfs
53 %attr(755,root,root) %{_sbindir}/thinkfan
54 %{_mandir}/man1/thinkfan.1*
55 %attr(754,root,root) /etc/rc.d/init.d/%{name}
56 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
This page took 0.060609 seconds and 2 git commands to generate.