]>
Commit | Line | Data |
---|---|---|
4c854604 | 1 | Summary: ThinkPad fan control program |
e3fa13dc | 2 | Summary(pl.UTF-8): Program do sterowania wiatraczkiem w ThinkPadach |
4c854604 | 3 | Name: thinkfan |
c03e86e2 | 4 | Version: 0.8.1 |
4c854604 | 5 | Release: 1 |
e3fa13dc JB |
6 | License: GPL v3+ |
7 | Group: Applications/System | |
4c854604 | 8 | Source0: http://downloads.sourceforge.net/thinkfan/%{name}-%{version}.tar.gz |
c03e86e2 | 9 | # Source0-md5: aaa6c88bab3b43756ac5a1638622828c |
4c854604 | 10 | Source1: %{name}.init |
5f5f68ff | 11 | URL: http://thinkfan.sourceforge.net/ |
e3fa13dc | 12 | BuildRequires: sed >= 4.0 |
4c854604 AM |
13 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
14 | ||
15 | %description | |
5f5f68ff ER |
16 | A minimalist fan control program. Supports any kind of system via the |
17 | sysfs hwmon interface (/sys/class/hwmon). It is designed to eat as | |
18 | little CPU power as possible. The development was inspired by the | |
19 | excellent work people have done on thinkwiki.org. | |
4c854604 | 20 | |
e3fa13dc JB |
21 | %description -l pl.UTF-8 |
22 | Minimalistyczny program do sterowania wiatraczkiem. Obsługuje dowolny | |
23 | system poprzez interfejs sysfs hwmon (/sys/class/hwmon). Został tak | |
24 | zaprojektowany, aby obciążać procesor w najmniejszym możliwym stopniu. | |
25 | Stworzenie tego narzędzia zostało zainspirowane wspaniałą pracą | |
26 | wykonaną przez ludzi na thinkwiki.org. | |
27 | ||
4c854604 AM |
28 | %prep |
29 | %setup -q | |
e3fa13dc JB |
30 | |
31 | %{__sed} -i -e 's#gcc#%{__cc}#g' Makefile | |
4c854604 AM |
32 | |
33 | %build | |
34 | %{__make} \ | |
35 | CC="%{__cc}" \ | |
36 | CFLAGS="%{rpmcppflags} %{rpmcflags}" | |
37 | ||
4c854604 AM |
38 | %install |
39 | rm -rf $RPM_BUILD_ROOT | |
4c854604 AM |
40 | install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man1,/etc/rc.d/init.d} |
41 | ||
5f5f68ff ER |
42 | install -p thinkfan $RPM_BUILD_ROOT%{_sbindir} |
43 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
c7c1ca2d | 44 | cp -p examples/thinkfan.conf.sysfs $RPM_BUILD_ROOT%{_sysconfdir}/thinkfan.conf |
5f5f68ff | 45 | cp -p thinkfan.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
4c854604 AM |
46 | |
47 | %clean | |
48 | rm -rf $RPM_BUILD_ROOT | |
49 | ||
50 | %post | |
51 | /sbin/chkconfig --add thinkfan | |
5f5f68ff | 52 | %service thinkfan restart |
4c854604 AM |
53 | |
54 | %preun | |
55 | if [ "$1" = "0" ]; then | |
5f5f68ff ER |
56 | /sbin/chkconfig --del thinkfan |
57 | %service thinkfan stop | |
4c854604 AM |
58 | fi |
59 | ||
60 | %files | |
61 | %defattr(644,root,root,755) | |
c7c1ca2d | 62 | %doc ChangeLog NEWS README examples/thinkfan.conf.* |
5f5f68ff ER |
63 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf |
64 | %attr(754,root,root) /etc/rc.d/init.d/%{name} | |
4c854604 AM |
65 | %attr(755,root,root) %{_sbindir}/thinkfan |
66 | %{_mandir}/man1/thinkfan.1* |