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: e39b75595bf61d758087e1ddecd01a12
29 Source1: cpupower.service
30 Source2: cpupower.config
31 URL: http://www.kernel.org/
32 BuildRequires: rpmbuild(macros) >= 1.647
33 BuildRequires: pciutils-devel
34 BuildRequires: tar >= 1:1.22
37 BuildRequires: asciidoc
38 BuildRequires: audit-libs-devel
39 BuildRequires: binutils-devel
41 BuildRequires: docbook-style-xsl
42 BuildRequires: elfutils-devel
44 %{?with_gtk:BuildRequires: gtk+2-devel >= 2.0}
45 BuildRequires: libunwind-devel >= 0.99
46 BuildRequires: newt-devel
47 BuildRequires: perl-devel >= 5.1
48 BuildRequires: pkgconfig
49 BuildRequires: python-devel
50 BuildRequires: rpm-pythonprov
51 BuildRequires: slang-devel
54 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56 %define makeopts CC="%{__cc}" %{?with_verbose:V=1}
59 This package contains the software from tools/ subdirectory from Linux
60 kernel source and the supporting documentation.
62 %description -l pl.UTF-8
63 Ten pakiet zawiera oprogramowanie z podkatalogu tools/ ze źródeł jądra
64 Linuksa oraz związaną z nim dokumentację.
67 Summary: cpupower - Shows and sets processor power related values
68 Summary(pl.UTF-8): cpupower - wyświetlanie i ustawianie wartości związanych z zużyciem energii przez procesor
69 Group: Applications/System
70 Requires(post,preun,postun): systemd-units >= 38
71 Requires: %{name}-cpupower-libs = %{version}-%{release}
72 Requires: systemd-units >= 0.38
73 Provides: cpufreq-utils = 1:009-0.6.p1
74 Provides: cpufrequtils = 1:009-0.6.p1
75 Provides: cpupowerutils = 1:009-0.6.p1
76 Obsoletes: cpufreq-utils < 1:009-0.6.p1
77 Obsoletes: cpufrequtils < 1:009-0.6.p1
78 Obsoletes: cpupowerutils < 1:009-0.6.p1
79 Obsoletes: cpuspeed < 1:1.5-16
82 cpupower is a collection of tools to examine and tune power saving
83 related features of your processor.
85 %description cpupower -l pl.UTF-8
86 cpupower to zbiór narzędzi do sprawdzania i ustawiania opcji procesora
87 związanych z oszczędzaniem energii.
89 %package cpupower-libs
90 Summary: cpupower library
91 Summary(pl.UTF-8): Biblioteka cpupower
94 %description cpupower-libs
97 %description cpupower-libs -l pl.UTF-8
100 %package cpupower-libs-devel
101 Summary: Development files for the cpupower library
102 Summary(pl.UTF-8): Pliki programistyczne biblioteki cpupower
103 Group: Development/Libraries
104 Requires: %{name} = %{version}-%{release}
105 Requires: %{name}-cpupower-libs = %{version}-%{release}
106 Provides: cpufrequtils-devel = 1:009-0.6.p1
107 Provides: cpupowerutils-devel = 1:009-0.6.p1
108 Obsoletes: cpufrequtils-devel < 1:009-0.6.p1
109 Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
111 %description cpupower-libs-devel
112 Development files for the cpupower library.
114 %description cpupower-libs-devel -l pl.UTF-8
115 Pliki programistyczne biblioteki cpupower.
118 Summary: perf profiler tool (core package)
119 Summary(pl.UTF-8): Narzędzie profilujące perf (podstawowe narzędzia)
120 Group: Applications/System
122 %description perf-core
123 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
124 away CPU hardware differences in Linux performance measurements and
125 presents a simple commandline interface. Perf is based on the
126 perf_events interface exported by recent versions of the Linux kernel.
128 This package contains core files and scripts.
130 %description perf-core -l pl.UTF-8
131 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
132 odseparowujące od różnic sprzętowych między pomiarami wydajności w
133 zależności od procesora oraz udostępniające prosty interfejs linii
134 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
135 przez nowe wersje jądra Linuksa.
137 Ten pakiet zawiera podstawowe pliki i skrypty.
140 Summary: perf profiler tool (GTK+ GUI)
141 Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs graficzny GTK+)
142 Group: X11/Applications
143 Requires: %{name}-perf-core = %{version}-%{release}
144 Provides: %{name}-perf = %{version}-%{release}
146 %description perf-gtk
147 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
148 away CPU hardware differences in Linux performance measurements and
149 presents a simple commandline interface. Perf is based on the
150 perf_events interface exported by recent versions of the Linux kernel.
152 This package contains GTK+ based GUI.
154 %description perf-gtk -l pl.UTF-8
155 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
156 odseparowujące od różnic sprzętowych między pomiarami wydajności w
157 zależności od procesora oraz udostępniające prosty interfejs linii
158 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
159 przez nowe wersje jądra Linuksa.
161 Ten pakiet zawiera graficzny interfejs oparty na GTK+.
164 Summary: perf profiler tool (Slang TUI)
165 Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs tekstowy Slang)
166 Group: X11/Applications
167 Requires: %{name}-perf-core = %{version}-%{release}
168 Provides: %{name}-perf = %{version}-%{release}
170 %description perf-slang
171 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
172 away CPU hardware differences in Linux performance measurements and
173 presents a simple commandline interface. Perf is based on the
174 perf_events interface exported by recent versions of the Linux kernel.
176 This package contains Slang based TUI.
178 %description perf-slang -l pl.UTF-8
179 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
180 odseparowujące od różnic sprzętowych między pomiarami wydajności w
181 zależności od procesora oraz udostępniające prosty interfejs linii
182 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
183 przez nowe wersje jądra Linuksa.
185 Ten pakiet zawiera tekstowy interfejs oparty na bibliotece Slang.
187 %package -n bash-completion-perf
188 Summary: Bash completion for perf command
189 Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia perf
190 Group: Applications/Shells
191 Requires: %{name}-perf
192 Requires: bash-completion
194 %description -n bash-completion-perf
195 Bash completion for perf command.
197 %description -n bash-completion-perf -l pl.UTF-8
198 Bashowe uzupełnianie parametrów dla polecenia perf.
204 %if "%{postver}" != ".0"
211 # Simple Disk Sleep Monitor
212 %{__cc} %{rpmcppflags} %{rpmcflags} %{rpmldflags} Documentation/laptops/dslm.c -o dslm
215 %{__make} -C tools/power/cpupower \
217 CPUFREQ_BENCH=false \
218 OPTIMIZATION="%{rpmcflags}" \
222 %{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
224 CFLAGS="%{rpmcflags}"
228 %{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
230 CFLAGS="%{rpmcflags}"
233 %ifarch %{ix86} %{x8664}
234 %{__make} -C tools/power/x86/x86_energy_perf_policy \
236 CFLAGS="%{rpmcflags}"
237 %{__make} -C tools/power/x86/turbostat \
239 CFLAGS="%{rpmcflags} -Wall -I../../../../arch/x86/include/uapi/"
242 # page-types, slabinfo
243 %{__make} -C tools/vm page-types slabinfo \
245 CFLAGS="%{rpmcflags} -Wall -Wextra -I../lib"
250 install -d $PWD/perf-{slang,gtk}
251 %{__make} -C tools/perf all man \
255 CFLAGS_OPTIMIZE="%{rpmcflags}" \
258 perfexecdir=%{_datadir}/perf-core \
259 template_dir=%{_datadir}/perf-core/templates
263 %{__make} -C tools/perf all man \
266 CFLAGS_OPTIMIZE="%{rpmcflags}" \
269 perfexecdir=%{_datadir}/perf-core \
270 template_dir=%{_datadir}/perf-core/templates
275 %{__make} -C usr gen_init_cpio \
277 CFLAGS="%{rpmcflags}"
280 rm -rf $RPM_BUILD_ROOT
283 install -d $RPM_BUILD_ROOT%{_sbindir}
285 %{__make} -C tools/power/cpupower install \
286 DESTDIR=$RPM_BUILD_ROOT \
294 install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{systemdunitdir}}
295 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower.service
296 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cpupower
299 install -p tools/power/cpupower/debug/i386/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
302 install -p tools/power/cpupower/debug/x86_64/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
305 install -p tools/vm/slabinfo $RPM_BUILD_ROOT%{_bindir}
306 install -p tools/vm/page-types $RPM_BUILD_ROOT%{_sbindir}
307 install -p dslm $RPM_BUILD_ROOT%{_sbindir}
309 %ifarch %{ix86} %{x8664}
310 install -d $RPM_BUILD_ROOT%{_mandir}/man8
311 # broken makefile, install manually
314 -C tools/power/x86/x86_energy_perf_policy \
315 DESTDIR=$RPM_BUILD_ROOT
317 cd tools/power/x86/x86_energy_perf_policy
318 install -p x86_energy_perf_policy $RPM_BUILD_ROOT%{_bindir}
319 cp -p x86_energy_perf_policy.8 $RPM_BUILD_ROOT%{_mandir}/man8
323 # broken makefile, install manually
326 -C tools/power/x86/turbostat \
327 DESTDIR=$RPM_BUILD_ROOT
329 cd tools/power/x86/turbostat
330 cp -p turbostat.8 $RPM_BUILD_ROOT%{_mandir}/man8
332 install -p turbostat $RPM_BUILD_ROOT%{_bindir}/turbostat
340 %{__make} -j1 install install-man \
345 CFLAGS_OPTIMIZE="%{rpmcflags}" \
347 %{?with_verbose:V=1} \
349 perfexecdir=%{_datadir}/perf-core \
350 template_dir=%{_datadir}/perf-core/templates \
351 DESTDIR=$RPM_BUILD_ROOT
352 %{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_slang}
356 %{__make} -j1 install install-man \
360 CFLAGS_OPTIMIZE="%{rpmcflags}" \
362 %{?with_verbose:V=1} \
364 perfexecdir=%{_datadir}/perf-core \
365 template_dir=%{_datadir}/perf-core/templates \
366 DESTDIR=$RPM_BUILD_ROOT
367 %{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_gtk}
370 %py_comp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
371 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
375 install -p usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
377 rm -r $RPM_BUILD_ROOT%{_datadir}/perf-core/tests
380 rm -rf $RPM_BUILD_ROOT
382 %post cpupower-libs -p /sbin/ldconfig
383 %postun cpupower-libs -p /sbin/ldconfig
386 %systemd_post cpupower.service
389 %systemd_preun cpupower.service
395 %defattr(644,root,root,755)
396 %attr(755,root,root) %{_bindir}/gen_init_cpio
397 %attr(755,root,root) %{_bindir}/slabinfo
398 %attr(755,root,root) %{_sbindir}/dslm
399 %attr(755,root,root) %{_sbindir}/page-types
400 %ifarch %{ix86} %{x8664}
401 %attr(755,root,root) %{_bindir}/centrino-decode
402 %attr(755,root,root) %{_bindir}/powernow-k8-decode
404 %ifarch %{ix86} %{x8664}
405 %attr(755,root,root) %{_bindir}/turbostat
406 %attr(755,root,root) %{_bindir}/x86_energy_perf_policy
407 %{_mandir}/man8/turbostat.8*
408 %{_mandir}/man8/x86_energy_perf_policy.8*
411 %files cpupower -f cpupower.lang
412 %defattr(644,root,root,755)
413 %attr(755,root,root) %{_bindir}/cpupower
414 %{_mandir}/man1/cpupower*.1*
415 %{systemdunitdir}/cpupower.service
416 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cpupower
419 %defattr(644,root,root,755)
420 %attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
421 %attr(755,root,root) %ghost %{_libdir}/libcpupower.so.0
423 %files cpupower-libs-devel
424 %defattr(644,root,root,755)
425 %attr(755,root,root) %{_libdir}/libcpupower.so
426 %{_includedir}/cpufreq.h
430 %defattr(644,root,root,755)
431 %{_mandir}/man1/perf*.1*
432 %dir %{_datadir}/perf-core
433 %attr(755,root,root) %{_datadir}/perf-core/perf-archive
435 %dir %{_datadir}/perf-core/scripts
437 %dir %{_datadir}/perf-core/scripts/perl
438 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util
439 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib
440 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf
441 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace
442 %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/*.pm
443 %dir %{_datadir}/perf-core/scripts/perl/bin
444 %attr(755,root,root) %{_datadir}/perf-core/scripts/perl/bin/*
445 %{_datadir}/perf-core/scripts/perl/*.pl
447 %dir %{_datadir}/perf-core/scripts/python
448 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util
449 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib
450 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf
451 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace
452 %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py*
453 %dir %{_datadir}/perf-core/scripts/python/bin
454 %attr(755,root,root) %{_datadir}/perf-core/scripts/python/bin/*
455 %{_datadir}/perf-core/scripts/python/*.py*
459 %defattr(644,root,root,755)
460 %attr(755,root,root) %{_bindir}/perf_gtk
464 %defattr(644,root,root,755)
465 %attr(755,root,root) %{_bindir}/perf_slang
467 %files -n bash-completion-perf
468 %defattr(644,root,root,755)
469 /etc/bash_completion.d/perf