2 # - redefine: PACKAGE_BUGREPORT=cpufreq@vger.kernel.org
6 %bcond_without verbose # verbose build (V=1)
7 %bcond_without perf # perf tools
12 Summary: Assortment of tools for the Linux kernel
13 Summary(pl.UTF-8): Zestaw narzędzi dla jądra Linuksa
15 Version: %{basever}%{postver}
18 Group: Applications/System
19 Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
20 # Source0-md5: 1c738edfc54e7c65faeb90c436104e2f
21 %if "%{postver}" != ".0"
22 Patch0: http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.bz2
23 # Patch0-md5: ab255ca10073bbaab3218e024d9f8568
25 Source1: cpupower.service
26 Source2: cpupower.config
27 URL: http://www.kernel.org/
28 BuildRequires: rpmbuild(macros) >= 1.647
29 BuildRequires: tar >= 1:1.22
32 BuildRequires: asciidoc
33 BuildRequires: audit-libs-devel
34 BuildRequires: binutils-devel
36 BuildRequires: docbook-style-xsl
37 BuildRequires: elfutils-devel
39 BuildRequires: gtk+2-devel >= 2.0
40 BuildRequires: libunwind-devel >= 0.99
41 BuildRequires: newt-devel
42 BuildRequires: perl-devel >= 5.1
43 BuildRequires: pkgconfig
44 BuildRequires: python-devel
45 BuildRequires: rpm-pythonprov
46 BuildRequires: slang-devel
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 %define makeopts CC="%{__cc}" %{?with_verbose:V=1}
54 This package contains the software from tools/ subdirectory from Linux
55 kernel source and the supporting documentation.
57 %description -l pl.UTF-8
58 Ten pakiet zawiera oprogramowanie z podkatalogu tools/ ze źródeł jądra
59 Linuksa oraz związaną z nim dokumentację.
62 Summary: cpupower - Shows and sets processor power related values
63 Summary(pl.UTF-8): cpupower - wyświetlanie i ustawianie wartości związanych z zużyciem energii przez procesor
64 Group: Applications/System
65 Requires(post,preun,postun): systemd-units >= 38
66 Requires: %{name}-cpupower-libs = %{version}-%{release}
67 Requires: systemd-units >= 0.38
68 Provides: cpufreq-utils = 1:009-0.6.p1
69 Provides: cpufrequtils = 1:009-0.6.p1
70 Provides: cpupowerutils = 1:009-0.6.p1
71 Obsoletes: cpufreq-utils < 1:009-0.6.p1
72 Obsoletes: cpufrequtils < 1:009-0.6.p1
73 Obsoletes: cpupowerutils < 1:009-0.6.p1
74 Obsoletes: cpuspeed < 1:1.5-16
77 cpupower is a collection of tools to examine and tune power saving
78 related features of your processor.
80 %description cpupower -l pl.UTF-8
81 cpupower to zbiór narzędzi do sprawdzania i ustawiania opcji procesora
82 związanych z oszczędzaniem energii.
84 %package cpupower-libs
85 Summary: cpupower library
86 Summary(pl.UTF-8): Biblioteka cpupower
89 %description cpupower-libs
92 %description cpupower-libs -l pl.UTF-8
95 %package cpupower-libs-devel
96 Summary: Development files for the cpupower library
97 Summary(pl.UTF-8): Pliki programistyczne biblioteki cpupower
98 Group: Development/Libraries
99 Requires: %{name} = %{version}-%{release}
100 Requires: %{name}-cpupower-libs = %{version}-%{release}
101 Provides: cpufrequtils-devel = 1:009-0.6.p1
102 Provides: cpupowerutils-devel = 1:009-0.6.p1
103 Obsoletes: cpufrequtils-devel < 1:009-0.6.p1
104 Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
106 %description cpupower-libs-devel
107 Development files for the cpupower library.
109 %description cpupower-libs-devel -l pl.UTF-8
110 Pliki programistyczne biblioteki cpupower.
113 Summary: perf profiler tool (core package)
114 Summary(pl.UTF-8): Narzędzie profilujące perf (podstawowe narzędzia)
115 Group: Applications/System
117 %description perf-core
118 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
119 away CPU hardware differences in Linux performance measurements and
120 presents a simple commandline interface. Perf is based on the
121 perf_events interface exported by recent versions of the Linux kernel.
123 This package contains core files and scripts.
125 %description perf-core -l pl.UTF-8
126 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
127 odseparowujące od różnic sprzętowych między pomiarami wydajności w
128 zależności od procesora oraz udostępniające prosty interfejs linii
129 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
130 przez nowe wersje jądra Linuksa.
132 Ten pakiet zawiera podstawowe pliki i skrypty.
135 Summary: perf profiler tool (GTK+ GUI)
136 Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs graficzny GTK+)
137 Group: X11/Applications
138 Requires: %{name}-perf-core = %{version}-%{release}
139 Provides: %{name}-perf = %{version}-%{release}
141 %description perf-gtk
142 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
143 away CPU hardware differences in Linux performance measurements and
144 presents a simple commandline interface. Perf is based on the
145 perf_events interface exported by recent versions of the Linux kernel.
147 This package contains GTK+ based GUI.
149 %description perf-gtk -l pl.UTF-8
150 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
151 odseparowujące od różnic sprzętowych między pomiarami wydajności w
152 zależności od procesora oraz udostępniające prosty interfejs linii
153 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
154 przez nowe wersje jądra Linuksa.
156 Ten pakiet zawiera graficzny interfejs oparty na GTK+.
159 Summary: perf profiler tool (Slang TUI)
160 Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs tekstowy Slang)
161 Group: X11/Applications
162 Requires: %{name}-perf-core = %{version}-%{release}
163 Provides: %{name}-perf = %{version}-%{release}
165 %description perf-slang
166 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
167 away CPU hardware differences in Linux performance measurements and
168 presents a simple commandline interface. Perf is based on the
169 perf_events interface exported by recent versions of the Linux kernel.
171 This package contains Slang based TUI.
173 %description perf-slang -l pl.UTF-8
174 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
175 odseparowujące od różnic sprzętowych między pomiarami wydajności w
176 zależności od procesora oraz udostępniające prosty interfejs linii
177 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
178 przez nowe wersje jądra Linuksa.
180 Ten pakiet zawiera tekstowy interfejs oparty na bibliotece Slang.
182 %package -n bash-completion-perf
183 Summary: Bash completion for perf command
184 Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia perf
185 Group: Applications/Shells
186 Requires: %{name}-perf
187 Requires: bash-completion
189 %description -n bash-completion-perf
190 Bash completion for perf command.
192 %description -n bash-completion-perf -l pl.UTF-8
193 Bashowe uzupełnianie parametrów dla polecenia perf.
199 %if "%{postver}" != ".0"
207 %{__make} -C tools/power/cpupower \
209 CPUFREQ_BENCH=false \
210 OPTIMIZATION="%{rpmcflags}" \
214 %{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
216 CFLAGS="%{rpmcflags}"
220 %{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
222 CFLAGS="%{rpmcflags}"
225 %ifarch %{ix86} %{x8664}
226 %{__make} -C tools/power/x86/x86_energy_perf_policy \
228 CFLAGS="%{rpmcflags}"
229 %{__make} -C tools/power/x86/turbostat \
231 CFLAGS="%{rpmcflags} -Wall"
235 %{__make} -C tools/vm \
237 CFLAGS="%{rpmcflags} -Wall -Wextra"
242 install -d $PWD/perf-{slang,gtk}
243 %{__make} -C tools/perf all man \
247 CFLAGS_OPTIMIZE="%{rpmcflags}" \
249 perfexecdir=%{_datadir}/perf-core \
250 template_dir=%{_datadir}/perf-core/templates
253 %{__make} -C tools/perf all man \
256 CFLAGS_OPTIMIZE="%{rpmcflags}" \
258 perfexecdir=%{_datadir}/perf-core \
259 template_dir=%{_datadir}/perf-core/templates
263 %{__make} -C usr gen_init_cpio \
265 CFLAGS="%{rpmcflags}"
268 rm -rf $RPM_BUILD_ROOT
271 %{__make} -C tools/power/cpupower install \
272 DESTDIR=$RPM_BUILD_ROOT \
280 install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{systemdunitdir}}
281 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower.service
282 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cpupower
285 install -p tools/power/cpupower/debug/i386/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
288 install -p tools/power/cpupower/debug/x86_64/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
291 install tools/vm/slabinfo $RPM_BUILD_ROOT%{_bindir}
293 %ifarch %{ix86} %{x8664}
294 install -d $RPM_BUILD_ROOT%{_mandir}/man8
295 # broken makefile, install manually
298 -C tools/power/x86/x86_energy_perf_policy \
299 DESTDIR=$RPM_BUILD_ROOT
301 cd tools/power/x86/x86_energy_perf_policy
302 install -p x86_energy_perf_policy $RPM_BUILD_ROOT%{_bindir}
303 install -p x86_energy_perf_policy.8 $RPM_BUILD_ROOT%{_mandir}/man8
307 # broken makefile, install manually
310 -C tools/power/x86/turbostat \
311 DESTDIR=$RPM_BUILD_ROOT
313 cd tools/power/x86/turbostat
314 install -p turbostat.8 $RPM_BUILD_ROOT%{_mandir}/man8
316 install -p turbostat $RPM_BUILD_ROOT%{_bindir}/turbostat
324 %{__make} -j1 install install-man \
329 CFLAGS_OPTIMIZE="%{rpmcflags}" \
330 %{?with_verbose:V=1} \
332 perfexecdir=%{_datadir}/perf-core \
333 template_dir=%{_datadir}/perf-core/templates \
334 DESTDIR=$RPM_BUILD_ROOT
335 %{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_slang}
338 %{__make} -j1 install install-man \
342 CFLAGS_OPTIMIZE="%{rpmcflags}" \
343 %{?with_verbose:V=1} \
345 perfexecdir=%{_datadir}/perf-core \
346 template_dir=%{_datadir}/perf-core/templates \
347 DESTDIR=$RPM_BUILD_ROOT
348 %{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_gtk}
350 %py_comp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
351 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
355 install -p usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
357 rm -r $RPM_BUILD_ROOT%{_datadir}/perf-core/tests
360 rm -rf $RPM_BUILD_ROOT
362 %post cpupower-libs -p /sbin/ldconfig
363 %postun cpupower-libs -p /sbin/ldconfig
366 %systemd_post cpupower.service
369 %systemd_preun cpupower.service
375 %defattr(644,root,root,755)
376 %attr(755,root,root) %{_bindir}/gen_init_cpio
377 %attr(755,root,root) %{_bindir}/slabinfo
378 %ifarch %{ix86} %{x8664}
379 %attr(755,root,root) %{_bindir}/centrino-decode
380 %attr(755,root,root) %{_bindir}/powernow-k8-decode
382 %ifarch %{ix86} %{x8664}
383 %attr(755,root,root) %{_bindir}/turbostat
384 %attr(755,root,root) %{_bindir}/x86_energy_perf_policy
385 %{_mandir}/man8/turbostat.8*
386 %{_mandir}/man8/x86_energy_perf_policy.8*
389 %files cpupower -f cpupower.lang
390 %defattr(644,root,root,755)
391 %attr(755,root,root) %{_bindir}/cpupower
392 %{_mandir}/man1/cpupower*.1*
393 %{systemdunitdir}/cpupower.service
394 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cpupower
397 %defattr(644,root,root,755)
398 %attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
399 %attr(755,root,root) %ghost %{_libdir}/libcpupower.so.0
401 %files cpupower-libs-devel
402 %defattr(644,root,root,755)
403 %attr(755,root,root) %{_libdir}/libcpupower.so
404 %{_includedir}/cpufreq.h
408 %defattr(644,root,root,755)
409 %{_mandir}/man1/perf*.1*
410 %dir %{_datadir}/perf-core
411 %attr(755,root,root) %{_datadir}/perf-core/perf-archive
413 %dir %{_datadir}/perf-core/scripts
415 %dir %{_datadir}/perf-core/scripts/perl
416 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util
417 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib
418 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf
419 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace
420 %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/*.pm
421 %dir %{_datadir}/perf-core/scripts/perl/bin
422 %attr(755,root,root) %{_datadir}/perf-core/scripts/perl/bin/*
423 %{_datadir}/perf-core/scripts/perl/*.pl
425 %dir %{_datadir}/perf-core/scripts/python
426 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util
427 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib
428 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf
429 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace
430 %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py*
431 %dir %{_datadir}/perf-core/scripts/python/bin
432 %attr(755,root,root) %{_datadir}/perf-core/scripts/python/bin/*
433 %{_datadir}/perf-core/scripts/python/*.py*
436 %defattr(644,root,root,755)
437 %attr(755,root,root) %{_bindir}/perf_gtk
440 %defattr(644,root,root,755)
441 %attr(755,root,root) %{_bindir}/perf_slang
443 %files -n bash-completion-perf
444 %defattr(644,root,root,755)
445 /etc/bash_completion.d/perf