]> git.pld-linux.org Git - packages/cpufreqd.git/blame - cpufreqd.spec
- updated to 2.3.0
[packages/cpufreqd.git] / cpufreqd.spec
CommitLineData
97aa6d78 1#
07bdfe6b 2# TODO:
97aa6d78 3# - loading modules in init-script, if needed
4# - missing plugin: nvclock
5# - disabled plugin: sensors (needs update to build with lm_sensors 3.x)
6# - move plugins into separate packages? (some is needed, because of additional deps)
7#
e268c4aa 8Summary: Scales your cpu frequency
db349442 9Summary(pl.UTF-8): Skalowanie częstotliwości procesora
e268c4aa 10Name: cpufreqd
0f395689
AG
11Version: 2.3.0
12Release: 1
e268c4aa
PG
13License: GPL v2
14Group: Applications/System
c4944298 15Source0: http://dl.sourceforge.net/cpufreqd/%{name}-%{version}.tar.bz2
0f395689 16# Source0-md5: bbf3c3f83abe2e9a9e00ab435fbc87a7
8de6b194 17Source1: %{name}.init
674c3d44 18URL: http://cpufreqd.sourceforge.net/
ee5717c2
AM
19BuildRequires: autoconf
20BuildRequires: automake
c4944298 21BuildRequires: cpufrequtils-devel
ee5717c2 22BuildRequires: libtool
eedf46df 23BuildRequires: rpmbuild(macros) >= 1.268
fed5bef9 24BuildRequires: sysfsutils-devel
eedf46df 25Requires(post): sed >= 4.0
d99d7b0e 26Requires(post,preun): /sbin/chkconfig
eedf46df 27Requires: rc-scripts
e268c4aa
PG
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%description
31This daemon monitors /proc/apm for the battery status and scales your
32cpu frequency according to a set of rules. It is very useful for
33providing maximum battery life but good cpu speed at the same time.
34
94f55881 35%description -l pl.UTF-8
744087ed 36Ten demon monitoruje stan baterii przez /proc/apm i skaluje
94f55881
JR
37częstotliwość procesora zgodnie z zestawem reguł. Jest bardzo
38przydatny do zapewniania maksymalnego czasu życia baterii, a
39jednocześnie dobrej szybkości procesora.
744087ed 40
e268c4aa 41%prep
cf9958b0 42%setup -q
e268c4aa
PG
43
44%build
ee5717c2
AM
45%{__libtoolize}
46%{__aclocal}
47%{__autoconf}
48%{__automake}
49%configure \
97aa6d78 50 --libdir=%{_libdir}/%{name} \
51 --disable-sensors
ee5717c2 52%{__make}
e268c4aa
PG
53
54%install
55rm -rf $RPM_BUILD_ROOT
071847bd 56install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
ee5717c2
AM
57
58%{__make} install \
59 DESTDIR=$RPM_BUILD_ROOT
e268c4aa 60
071847bd 61install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
e268c4aa
PG
62
63%clean
64rm -rf $RPM_BUILD_ROOT
65
8de6b194 66%post
98ab0fe1
ER
67if [ "$1" = 1 ]; then
68 # Modify config file for 2.6
69 if [ -d /sys/devices/system/cpu/cpu0/cpufreq ] ; then
70 # translate percentages in integer values
71 CPUFREQD_MAX_SPEED=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq`
72 CPUFREQD_MIN_SPEED=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq`
73 CPUFREQD_MHIGH_SPEED=$(( $CPUFREQD_MAX_SPEED / 100 * 66 ))
74 CPUFREQD_MLOW_SPEED=$(( $CPUFREQD_MAX_SPEED / 100 * 33 ))
75 sed -i -e "s/100%/$CPUFREQD_MAX_SPEED/; \
76 s/66%/$CPUFREQD_MHIGH_SPEED/; \
77 s/33%/$CPUFREQD_MLOW_SPEED/; \
78 s/0%/$CPUFREQD_MIN_SPEED/;" \
79 %{_sysconfdir}/cpufreqd.conf
80 fi
8de6b194 81fi
98ab0fe1
ER
82
83/sbin/chkconfig --add cpufreqd
eedf46df 84%service cpufreqd restart "CPU FREQ daemon"
8de6b194
AM
85
86%preun
87if [ "$1" = "0" ]; then
eedf46df 88 %service cpufreqd stop
82e9226f 89 /sbin/chkconfig --del cpufreqd
8de6b194
AM
90fi
91
e268c4aa
PG
92%files
93%defattr(644,root,root,755)
94%doc README TODO
663b908d 95%attr(754,root,root) %{_sbindir}/*
9365e9cd 96%attr(755,root,root) %{_bindir}/*
071847bd 97%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
ee5717c2 98%{_mandir}/man?/*
071847bd 99%attr(754,root,root) /etc/rc.d/init.d/%{name}
ee5717c2
AM
100%dir %{_libdir}/%{name}
101%attr(755,root,root) %{_libdir}/%{name}/*
This page took 0.073048 seconds and 4 git commands to generate.