]> git.pld-linux.org Git - packages/cpufreqd.git/blob - cpufreqd.spec
- added init script
[packages/cpufreqd.git] / cpufreqd.spec
1 Summary:        Scales your cpu frequency
2 Summary(pl):    Skalowanie czêstotliwo¶ci procesora
3 Name:           cpufreqd
4 Version:        1.0
5 %define _pre    pre1
6 Release:        0.%{_pre}.1
7 License:        GPL v2
8 Group:          Applications/System
9 Source0:        http://www.staikos.net/~staikos/cpufreqd/%{name}-%{version}-%{_pre}.tar.gz
10 # Source0-md5:  3596674f1c36b85f7c05c8a4adf14a3d
11 Source1:        %{name}.init
12 URL:            http://www.brodo.de/cpufreq/
13 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
14
15 %description
16 This daemon monitors /proc/apm for the battery status and scales your
17 cpu frequency according to a set of rules. It is very useful for
18 providing maximum battery life but good cpu speed at the same time.
19
20 %description -l pl
21 Ten demon monitoruje stan baterii przez /proc/apm i skaluje
22 czêstotliwo¶æ procesora zgodnie z zestawem regu³. Jest bardzo
23 przydatny do zapewniania maksymalnego czasu ¿ycia baterii, a
24 jednocze¶nie dobrej szybko¶ci procesora.
25
26 %prep
27 %setup  -q -n %{name}-%{version}-%{_pre}
28
29 %build
30 %{__make} CFLAGS="%{rpmcflags}"
31
32 %install
33 rm -rf $RPM_BUILD_ROOT
34 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/rc.d/init.d,%{_sbindir},%{_mandir}/{man1,man5}}
35
36 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name}
37 install %{name} $RPM_BUILD_ROOT%{_sbindir}
38 install cpufreqd.conf $RPM_BUILD_ROOT%{_sysconfdir}
39 install *.1  $RPM_BUILD_ROOT%{_mandir}/man1
40 install *.5  $RPM_BUILD_ROOT%{_mandir}/man5
41
42 %clean
43 rm -rf $RPM_BUILD_ROOT
44
45 %post
46 /sbin/chkconfig --add cpufreqd
47 if [ -f /var/lock/subsys/cpufreqd ]; then
48         /etc/rc.d/init.d/cpufreqd restart >&2
49 else
50         echo "Run \"/etc/rc.d/init.d/cpufreqd start\" to start CPU FREQ daemon."
51 fi
52
53 %preun
54 if [ "$1" = "0" ]; then
55         if [ -f /var/lock/subsys/cpufreqd ]; then
56                 /etc/rc.d/init.d/cpufreqd stop>&2
57         fi
58         /sbin/chkconfig --del cpufreqd
59 fi
60
61 %files
62 %defattr(644,root,root,755)
63 %doc README TODO
64 %attr(754,root,root) %{_sbindir}/*
65 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*
66 %{_mandir}/man1/*.1*
67 %{_mandir}/man5/*.5*
68 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/%{name}
This page took 0.189859 seconds and 4 git commands to generate.