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