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