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