2 # - redefine: PACKAGE_BUGREPORT=cpufreq@vger.kernel.org
3 # - add -n python-perf?
4 # - without perf bcond does not work (it still builds it)
5 # - add bcond to disable building docs (perf docs)
6 # - install of perf compiles things over again
9 %bcond_without verbose # verbose build (V=1)
10 %bcond_without perf # perf tools
11 %bcond_without gtk # gtk perf version
16 Summary: Assortment of tools for the Linux kernel
17 Summary(pl.UTF-8): Zestaw narzędzi dla jądra Linuksa
19 Version: %{basever}%{postver}
22 Group: Applications/System
23 Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
24 # Source0-md5: 4f25cd5bec5f8d5a7d935b3f2ccb8481
25 %if "%{postver}" != ".0"
26 Patch0: http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.xz
27 # Patch0-md5: 58009825fb7ca7ca7913ab68fbf8a8a7
29 Source1: cpupower.service
30 Source2: cpupower.config
32 URL: http://www.kernel.org/
33 BuildRequires: gettext-tools
34 BuildRequires: pciutils-devel
35 BuildRequires: rpmbuild(macros) >= 1.647
36 BuildRequires: tar >= 1:1.22
39 BuildRequires: asciidoc
40 BuildRequires: audit-libs-devel
41 BuildRequires: binutils-devel
43 BuildRequires: docbook-dtd45-xml
44 BuildRequires: docbook-style-xsl
45 BuildRequires: elfutils-devel
47 BuildRequires: libunwind-devel >= 0.99
48 BuildRequires: perl-devel >= 5.1
49 BuildRequires: python-devel
50 BuildRequires: rpm-pythonprov
51 BuildRequires: slang-devel
54 BuildRequires: gtk+2-devel >= 2.0
55 BuildRequires: pkgconfig
58 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60 %define makeopts CC="%{__cc}" %{?with_verbose:V=1}
63 This package contains the software from tools/ subdirectory from Linux
64 kernel source and the supporting documentation.
66 %description -l pl.UTF-8
67 Ten pakiet zawiera oprogramowanie z podkatalogu tools/ ze źródeł jądra
68 Linuksa oraz związaną z nim dokumentację.
71 Summary: cpupower - Shows and sets processor power related values
72 Summary(pl.UTF-8): cpupower - wyświetlanie i ustawianie wartości związanych z zużyciem energii przez procesor
73 Group: Applications/System
74 Requires(post,preun,postun): systemd-units >= 38
75 Requires: %{name}-cpupower-libs = %{version}-%{release}
76 Requires: systemd-units >= 0.38
77 Provides: cpufreq-utils = 1:009-0.6.p1
78 Provides: cpufrequtils = 1:009-0.6.p1
79 Provides: cpupowerutils = 1:009-0.6.p1
80 Obsoletes: cpufreq-utils < 1:009-0.6.p1
81 Obsoletes: cpufrequtils < 1:009-0.6.p1
82 Obsoletes: cpupowerutils < 1:009-0.6.p1
83 Obsoletes: cpuspeed < 1:1.5-16
86 cpupower is a collection of tools to examine and tune power saving
87 related features of your processor.
89 %description cpupower -l pl.UTF-8
90 cpupower to zbiór narzędzi do sprawdzania i ustawiania opcji procesora
91 związanych z oszczędzaniem energii.
93 %package cpupower-libs
94 Summary: cpupower library
95 Summary(pl.UTF-8): Biblioteka cpupower
98 %description cpupower-libs
101 %description cpupower-libs -l pl.UTF-8
104 %package cpupower-libs-devel
105 Summary: Development files for the cpupower library
106 Summary(pl.UTF-8): Pliki programistyczne biblioteki cpupower
107 Group: Development/Libraries
108 Requires: %{name} = %{version}-%{release}
109 Requires: %{name}-cpupower-libs = %{version}-%{release}
110 Provides: cpufrequtils-devel = 1:009-0.6.p1
111 Provides: cpupowerutils-devel = 1:009-0.6.p1
112 Obsoletes: cpufrequtils-devel < 1:009-0.6.p1
113 Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
115 %description cpupower-libs-devel
116 Development files for the cpupower library.
118 %description cpupower-libs-devel -l pl.UTF-8
119 Pliki programistyczne biblioteki cpupower.
122 Summary: perf profiler tool (core package)
123 Summary(pl.UTF-8): Narzędzie profilujące perf (podstawowe narzędzia)
124 Group: Applications/System
127 %description perf-core
128 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
129 away CPU hardware differences in Linux performance measurements and
130 presents a simple commandline interface. Perf is based on the
131 perf_events interface exported by recent versions of the Linux kernel.
133 This package contains core files and scripts.
135 %description perf-core -l pl.UTF-8
136 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
137 odseparowujące od różnic sprzętowych między pomiarami wydajności w
138 zależności od procesora oraz udostępniające prosty interfejs linii
139 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
140 przez nowe wersje jądra Linuksa.
142 Ten pakiet zawiera podstawowe pliki i skrypty.
145 Summary: perf profiler tool (GTK+ GUI)
146 Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs graficzny GTK+)
147 Group: X11/Applications
148 Requires: %{name}-perf-core = %{version}-%{release}
149 Provides: %{name}-perf = %{version}-%{release}
151 %description perf-gtk
152 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
153 away CPU hardware differences in Linux performance measurements and
154 presents a simple commandline interface. Perf is based on the
155 perf_events interface exported by recent versions of the Linux kernel.
157 This package contains GTK+ based GUI.
159 %description perf-gtk -l pl.UTF-8
160 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
161 odseparowujące od różnic sprzętowych między pomiarami wydajności w
162 zależności od procesora oraz udostępniające prosty interfejs linii
163 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
164 przez nowe wersje jądra Linuksa.
166 Ten pakiet zawiera graficzny interfejs oparty na GTK+.
169 Summary: perf profiler tool (Slang TUI)
170 Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs tekstowy Slang)
171 Group: X11/Applications
172 Requires: %{name}-perf-core = %{version}-%{release}
173 Provides: %{name}-perf = %{version}-%{release}
175 %description perf-slang
176 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
177 away CPU hardware differences in Linux performance measurements and
178 presents a simple commandline interface. Perf is based on the
179 perf_events interface exported by recent versions of the Linux kernel.
181 This package contains Slang based TUI.
183 %description perf-slang -l pl.UTF-8
184 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
185 odseparowujące od różnic sprzętowych między pomiarami wydajności w
186 zależności od procesora oraz udostępniające prosty interfejs linii
187 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
188 przez nowe wersje jądra Linuksa.
190 Ten pakiet zawiera tekstowy interfejs oparty na bibliotece Slang.
192 %package -n bash-completion-perf
193 Summary: Bash completion for perf command
194 Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia perf
195 Group: Applications/Shells
196 Requires: %{name}-perf
197 Requires: bash-completion
199 %description -n bash-completion-perf
200 Bash completion for perf command.
202 %description -n bash-completion-perf -l pl.UTF-8
203 Bashowe uzupełnianie parametrów dla polecenia perf.
209 %if "%{postver}" != ".0"
216 # Simple Disk Sleep Monitor
217 %{__cc} %{rpmcppflags} %{rpmcflags} %{rpmldflags} Documentation/laptops/dslm.c -o dslm
220 %{__make} -C tools/power/cpupower \
222 CPUFREQ_BENCH=false \
223 OPTIMIZATION="%{rpmcflags}" \
227 %{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
229 CFLAGS="%{rpmcflags}"
233 %{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
235 CFLAGS="%{rpmcflags}"
238 %ifarch %{ix86} %{x8664}
239 %{__make} -C tools/power/x86/x86_energy_perf_policy \
241 CFLAGS="%{rpmcflags}"
242 %{__make} -C tools/power/x86/turbostat \
244 CFLAGS="%{rpmcflags} -Wall -I../../../../arch/x86/include/uapi/"
247 # page-types, slabinfo
248 %{__make} -C tools/vm page-types slabinfo \
250 CFLAGS="%{rpmcflags} -Wall -Wextra -I../lib"
255 install -d $PWD/perf-{slang,gtk}
256 %{__make} -C tools/perf all man \
260 CFLAGS_OPTIMIZE="%{rpmcflags}" \
263 perfexecdir=%{_datadir}/perf-core \
264 template_dir=%{_datadir}/perf-core/templates
268 %{__make} -C tools/perf all man \
271 CFLAGS_OPTIMIZE="%{rpmcflags}" \
274 perfexecdir=%{_datadir}/perf-core \
275 template_dir=%{_datadir}/perf-core/templates
280 %{__make} -C usr gen_init_cpio \
282 CFLAGS="%{rpmcflags}"
285 rm -rf $RPM_BUILD_ROOT
288 install -d $RPM_BUILD_ROOT%{_sbindir}
290 %{__make} -C tools/power/cpupower install \
291 DESTDIR=$RPM_BUILD_ROOT \
299 install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{systemdunitdir}}
300 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower.service
301 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cpupower
304 install -p tools/power/cpupower/debug/i386/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
307 install -p tools/power/cpupower/debug/x86_64/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
310 install -p tools/vm/slabinfo $RPM_BUILD_ROOT%{_bindir}
311 install -p tools/vm/page-types $RPM_BUILD_ROOT%{_sbindir}
312 install -p dslm $RPM_BUILD_ROOT%{_sbindir}
314 %ifarch %{ix86} %{x8664}
315 install -d $RPM_BUILD_ROOT%{_mandir}/man8
316 # broken makefile, install manually
319 -C tools/power/x86/x86_energy_perf_policy \
320 DESTDIR=$RPM_BUILD_ROOT
322 cd tools/power/x86/x86_energy_perf_policy
323 install -p x86_energy_perf_policy $RPM_BUILD_ROOT%{_bindir}
324 cp -p x86_energy_perf_policy.8 $RPM_BUILD_ROOT%{_mandir}/man8
328 # broken makefile, install manually
331 -C tools/power/x86/turbostat \
332 DESTDIR=$RPM_BUILD_ROOT
334 cd tools/power/x86/turbostat
335 cp -p turbostat.8 $RPM_BUILD_ROOT%{_mandir}/man8
337 install -p turbostat $RPM_BUILD_ROOT%{_bindir}/turbostat
345 %{__make} -j1 install install-man \
350 CFLAGS_OPTIMIZE="%{rpmcflags}" \
352 %{?with_verbose:V=1} \
354 perfexecdir=%{_datadir}/perf-core \
355 template_dir=%{_datadir}/perf-core/templates \
356 DESTDIR=$RPM_BUILD_ROOT
357 %{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_slang}
361 %{__make} -j1 install install-man \
365 CFLAGS_OPTIMIZE="%{rpmcflags}" \
367 %{?with_verbose:V=1} \
369 perfexecdir=%{_datadir}/perf-core \
370 template_dir=%{_datadir}/perf-core/templates \
371 DESTDIR=$RPM_BUILD_ROOT
372 %{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_gtk}
375 %py_comp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
376 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
378 rm -r $RPM_BUILD_ROOT%{_datadir}/perf-core/tests
380 install -p %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/perf
384 install -p usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
387 rm -rf $RPM_BUILD_ROOT
389 %post cpupower-libs -p /sbin/ldconfig
390 %postun cpupower-libs -p /sbin/ldconfig
393 %systemd_post cpupower.service
396 %systemd_preun cpupower.service
402 %defattr(644,root,root,755)
403 %attr(755,root,root) %{_bindir}/gen_init_cpio
404 %attr(755,root,root) %{_bindir}/slabinfo
405 %attr(755,root,root) %{_sbindir}/dslm
406 %attr(755,root,root) %{_sbindir}/page-types
407 %ifarch %{ix86} %{x8664}
408 %attr(755,root,root) %{_bindir}/centrino-decode
409 %attr(755,root,root) %{_bindir}/powernow-k8-decode
411 %ifarch %{ix86} %{x8664}
412 %attr(755,root,root) %{_bindir}/turbostat
413 %attr(755,root,root) %{_bindir}/x86_energy_perf_policy
414 %{_mandir}/man8/turbostat.8*
415 %{_mandir}/man8/x86_energy_perf_policy.8*
418 %files cpupower -f cpupower.lang
419 %defattr(644,root,root,755)
420 %attr(755,root,root) %{_bindir}/cpupower
421 %{_mandir}/man1/cpupower*.1*
422 %{systemdunitdir}/cpupower.service
423 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cpupower
426 %defattr(644,root,root,755)
427 %attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
428 %attr(755,root,root) %ghost %{_libdir}/libcpupower.so.0
430 %files cpupower-libs-devel
431 %defattr(644,root,root,755)
432 %attr(755,root,root) %{_libdir}/libcpupower.so
433 %{_includedir}/cpufreq.h
437 %defattr(644,root,root,755)
438 %attr(755,root,root) %{_bindir}/perf
439 %{_mandir}/man1/perf*.1*
440 %dir %{_datadir}/perf-core
441 %attr(755,root,root) %{_datadir}/perf-core/perf-archive
443 %dir %{_datadir}/perf-core/scripts
445 %dir %{_datadir}/perf-core/scripts/perl
446 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util
447 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib
448 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf
449 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace
450 %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/*.pm
451 %dir %{_datadir}/perf-core/scripts/perl/bin
452 %attr(755,root,root) %{_datadir}/perf-core/scripts/perl/bin/*
453 %{_datadir}/perf-core/scripts/perl/*.pl
455 %dir %{_datadir}/perf-core/scripts/python
456 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util
457 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib
458 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf
459 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace
460 %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py*
461 %dir %{_datadir}/perf-core/scripts/python/bin
462 %attr(755,root,root) %{_datadir}/perf-core/scripts/python/bin/*
463 %{_datadir}/perf-core/scripts/python/*.py*
467 %defattr(644,root,root,755)
468 %attr(755,root,root) %{_bindir}/perf_gtk
472 %defattr(644,root,root,755)
473 %attr(755,root,root) %{_bindir}/perf_slang
475 %files -n bash-completion-perf
476 %defattr(644,root,root,755)
477 /etc/bash_completion.d/perf