]> git.pld-linux.org Git - packages/cpufreqd.git/blame - cpufreqd.spec
- rel 2
[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)
0e7b5111 7# - update Polish translations
97aa6d78 8#
0e7b5111 9Summary: Fully configurable daemon for dynamic frequency and voltage scaling
db349442 10Summary(pl.UTF-8): Skalowanie częstotliwości procesora
e268c4aa 11Name: cpufreqd
05472dac 12Version: 2.4.2
abf9c1b4 13Release: 2
e268c4aa
PG
14License: GPL v2
15Group: Applications/System
c4944298 16Source0: http://dl.sourceforge.net/cpufreqd/%{name}-%{version}.tar.bz2
05472dac 17# Source0-md5: 2ca80a77849c9a69b81e27c1843c97f5
8de6b194 18Source1: %{name}.init
abf9c1b4 19Patch0: %{name}-battery.patch
0e7b5111 20URL: http://www.linux.it/~malattia/wiki/index.php/Cpufreqd
ee5717c2
AM
21BuildRequires: autoconf
22BuildRequires: automake
c4944298 23BuildRequires: cpufrequtils-devel
ee5717c2 24BuildRequires: libtool
eedf46df 25BuildRequires: rpmbuild(macros) >= 1.268
fed5bef9 26BuildRequires: sysfsutils-devel
eedf46df 27Requires(post): sed >= 4.0
d99d7b0e 28Requires(post,preun): /sbin/chkconfig
eedf46df 29Requires: rc-scripts
e268c4aa
PG
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
0e7b5111 33A small daemon to adjust cpu speed and voltage (and not only) for
34kernels using any of the cpufreq drivers available. Cpufreqd is not a
35userspace governor.
36Cpufreqd allows you to apply governor profiles from rules based on
37battery level, ac status, temperature (ACPI or sensors), running
38programs, cpu usage and (maybe) more. You can also change your nforce
39FSB clock and video card frequency (NVidia only) or execute arbitrary
40commands when a specific rule is applied.
41You need a CPU with frequency and voltage scaling capabilities and a
42Linux kernel with cpufreq support.
e268c4aa 43
94f55881 44%description -l pl.UTF-8
744087ed 45Ten demon monitoruje stan baterii przez /proc/apm i skaluje
94f55881
JR
46częstotliwość procesora zgodnie z zestawem reguł. Jest bardzo
47przydatny do zapewniania maksymalnego czasu życia baterii, a
48jednocześnie dobrej szybkości procesora.
744087ed 49
e268c4aa 50%prep
cf9958b0 51%setup -q
abf9c1b4 52%patch0 -p1
e268c4aa
PG
53
54%build
ee5717c2
AM
55%{__libtoolize}
56%{__aclocal}
57%{__autoconf}
58%{__automake}
59%configure \
97aa6d78 60 --libdir=%{_libdir}/%{name} \
61 --disable-sensors
ee5717c2 62%{__make}
e268c4aa
PG
63
64%install
65rm -rf $RPM_BUILD_ROOT
071847bd 66install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
ee5717c2
AM
67
68%{__make} install \
69 DESTDIR=$RPM_BUILD_ROOT
e268c4aa 70
071847bd 71install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
e268c4aa
PG
72
73%clean
74rm -rf $RPM_BUILD_ROOT
75
8de6b194 76%post
98ab0fe1
ER
77if [ "$1" = 1 ]; then
78 # Modify config file for 2.6
79 if [ -d /sys/devices/system/cpu/cpu0/cpufreq ] ; then
80 # translate percentages in integer values
81 CPUFREQD_MAX_SPEED=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq`
82 CPUFREQD_MIN_SPEED=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq`
83 CPUFREQD_MHIGH_SPEED=$(( $CPUFREQD_MAX_SPEED / 100 * 66 ))
84 CPUFREQD_MLOW_SPEED=$(( $CPUFREQD_MAX_SPEED / 100 * 33 ))
85 sed -i -e "s/100%/$CPUFREQD_MAX_SPEED/; \
86 s/66%/$CPUFREQD_MHIGH_SPEED/; \
87 s/33%/$CPUFREQD_MLOW_SPEED/; \
88 s/0%/$CPUFREQD_MIN_SPEED/;" \
89 %{_sysconfdir}/cpufreqd.conf
90 fi
8de6b194 91fi
98ab0fe1
ER
92
93/sbin/chkconfig --add cpufreqd
eedf46df 94%service cpufreqd restart "CPU FREQ daemon"
8de6b194
AM
95
96%preun
97if [ "$1" = "0" ]; then
eedf46df 98 %service cpufreqd stop
82e9226f 99 /sbin/chkconfig --del cpufreqd
8de6b194
AM
100fi
101
e268c4aa
PG
102%files
103%defattr(644,root,root,755)
104%doc README TODO
663b908d 105%attr(754,root,root) %{_sbindir}/*
9365e9cd 106%attr(755,root,root) %{_bindir}/*
071847bd 107%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
ee5717c2 108%{_mandir}/man?/*
071847bd 109%attr(754,root,root) /etc/rc.d/init.d/%{name}
ee5717c2
AM
110%dir %{_libdir}/%{name}
111%attr(755,root,root) %{_libdir}/%{name}/*
This page took 0.060276 seconds and 4 git commands to generate.