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