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
31 URL: http://www.kernel.org/
32 BuildRequires: gettext-tools
33 BuildRequires: pciutils-devel
34 BuildRequires: rpmbuild(macros) >= 1.647
35 BuildRequires: tar >= 1:1.22
38 BuildRequires: asciidoc
39 BuildRequires: audit-libs-devel
40 BuildRequires: binutils-devel
42 BuildRequires: docbook-dtd45-xml
43 BuildRequires: docbook-style-xsl
44 BuildRequires: elfutils-devel
46 BuildRequires: libunwind-devel >= 0.99
47 BuildRequires: perl-devel >= 5.1
48 BuildRequires: python-devel
49 BuildRequires: rpm-pythonprov
50 BuildRequires: slang-devel
53 BuildRequires: gtk+2-devel >= 2.0
54 BuildRequires: pkgconfig
57 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59 %define makeopts CC="%{__cc}" %{?with_verbose:V=1}
62 This package contains the software from tools/ subdirectory from Linux
63 kernel source and the supporting documentation.
65 %description -l pl.UTF-8
66 Ten pakiet zawiera oprogramowanie z podkatalogu tools/ ze źródeł jądra
67 Linuksa oraz związaną z nim dokumentację.
70 Summary: cpupower - Shows and sets processor power related values
71 Summary(pl.UTF-8): cpupower - wyświetlanie i ustawianie wartości związanych z zużyciem energii przez procesor
72 Group: Applications/System
73 Requires(post,preun,postun): systemd-units >= 38
74 Requires: %{name}-cpupower-libs = %{version}-%{release}
75 Requires: systemd-units >= 0.38
76 Provides: cpufreq-utils = 1:009-0.6.p1
77 Provides: cpufrequtils = 1:009-0.6.p1
78 Provides: cpupowerutils = 1:009-0.6.p1
79 Obsoletes: cpufreq-utils < 1:009-0.6.p1
80 Obsoletes: cpufrequtils < 1:009-0.6.p1
81 Obsoletes: cpupowerutils < 1:009-0.6.p1
82 Obsoletes: cpuspeed < 1:1.5-16
85 cpupower is a collection of tools to examine and tune power saving
86 related features of your processor.
88 %description cpupower -l pl.UTF-8
89 cpupower to zbiór narzędzi do sprawdzania i ustawiania opcji procesora
90 związanych z oszczędzaniem energii.
92 %package cpupower-libs
93 Summary: cpupower library
94 Summary(pl.UTF-8): Biblioteka cpupower
97 %description cpupower-libs
100 %description cpupower-libs -l pl.UTF-8
103 %package cpupower-libs-devel
104 Summary: Development files for the cpupower library
105 Summary(pl.UTF-8): Pliki programistyczne biblioteki cpupower
106 Group: Development/Libraries
107 Requires: %{name} = %{version}-%{release}
108 Requires: %{name}-cpupower-libs = %{version}-%{release}
109 Provides: cpufrequtils-devel = 1:009-0.6.p1
110 Provides: cpupowerutils-devel = 1:009-0.6.p1
111 Obsoletes: cpufrequtils-devel < 1:009-0.6.p1
112 Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
114 %description cpupower-libs-devel
115 Development files for the cpupower library.
117 %description cpupower-libs-devel -l pl.UTF-8
118 Pliki programistyczne biblioteki cpupower.
121 Summary: perf profiler tool (core package)
122 Summary(pl.UTF-8): Narzędzie profilujące perf (podstawowe narzędzia)
123 Group: Applications/System
125 %description perf-core
126 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
127 away CPU hardware differences in Linux performance measurements and
128 presents a simple commandline interface. Perf is based on the
129 perf_events interface exported by recent versions of the Linux kernel.
131 This package contains core files and scripts.
133 %description perf-core -l pl.UTF-8
134 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
135 odseparowujące od różnic sprzętowych między pomiarami wydajności w
136 zależności od procesora oraz udostępniające prosty interfejs linii
137 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
138 przez nowe wersje jądra Linuksa.
140 Ten pakiet zawiera podstawowe pliki i skrypty.
143 Summary: perf profiler tool (GTK+ GUI)
144 Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs graficzny GTK+)
145 Group: X11/Applications
146 Requires: %{name}-perf-core = %{version}-%{release}
147 Provides: %{name}-perf = %{version}-%{release}
149 %description perf-gtk
150 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
151 away CPU hardware differences in Linux performance measurements and
152 presents a simple commandline interface. Perf is based on the
153 perf_events interface exported by recent versions of the Linux kernel.
155 This package contains GTK+ based GUI.
157 %description perf-gtk -l pl.UTF-8
158 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
159 odseparowujące od różnic sprzętowych między pomiarami wydajności w
160 zależności od procesora oraz udostępniające prosty interfejs linii
161 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
162 przez nowe wersje jądra Linuksa.
164 Ten pakiet zawiera graficzny interfejs oparty na GTK+.
167 Summary: perf profiler tool (Slang TUI)
168 Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs tekstowy Slang)
169 Group: X11/Applications
170 Requires: %{name}-perf-core = %{version}-%{release}
171 Provides: %{name}-perf = %{version}-%{release}
173 %description perf-slang
174 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
175 away CPU hardware differences in Linux performance measurements and
176 presents a simple commandline interface. Perf is based on the
177 perf_events interface exported by recent versions of the Linux kernel.
179 This package contains Slang based TUI.
181 %description perf-slang -l pl.UTF-8
182 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
183 odseparowujące od różnic sprzętowych między pomiarami wydajności w
184 zależności od procesora oraz udostępniające prosty interfejs linii
185 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
186 przez nowe wersje jądra Linuksa.
188 Ten pakiet zawiera tekstowy interfejs oparty na bibliotece Slang.
190 %package -n bash-completion-perf
191 Summary: Bash completion for perf command
192 Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia perf
193 Group: Applications/Shells
194 Requires: %{name}-perf
195 Requires: bash-completion
197 %description -n bash-completion-perf
198 Bash completion for perf command.
200 %description -n bash-completion-perf -l pl.UTF-8
201 Bashowe uzupełnianie parametrów dla polecenia perf.
207 %if "%{postver}" != ".0"
214 # Simple Disk Sleep Monitor
215 %{__cc} %{rpmcppflags} %{rpmcflags} %{rpmldflags} Documentation/laptops/dslm.c -o dslm
218 %{__make} -C tools/power/cpupower \
220 CPUFREQ_BENCH=false \
221 OPTIMIZATION="%{rpmcflags}" \
225 %{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
227 CFLAGS="%{rpmcflags}"
231 %{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
233 CFLAGS="%{rpmcflags}"
236 %ifarch %{ix86} %{x8664}
237 %{__make} -C tools/power/x86/x86_energy_perf_policy \
239 CFLAGS="%{rpmcflags}"
240 %{__make} -C tools/power/x86/turbostat \
242 CFLAGS="%{rpmcflags} -Wall -I../../../../arch/x86/include/uapi/"
245 # page-types, slabinfo
246 %{__make} -C tools/vm page-types slabinfo \
248 CFLAGS="%{rpmcflags} -Wall -Wextra -I../lib"
253 install -d $PWD/perf-{slang,gtk}
254 %{__make} -C tools/perf all man \
258 CFLAGS_OPTIMIZE="%{rpmcflags}" \
261 perfexecdir=%{_datadir}/perf-core \
262 template_dir=%{_datadir}/perf-core/templates
266 %{__make} -C tools/perf all man \
269 CFLAGS_OPTIMIZE="%{rpmcflags}" \
272 perfexecdir=%{_datadir}/perf-core \
273 template_dir=%{_datadir}/perf-core/templates
278 %{__make} -C usr gen_init_cpio \
280 CFLAGS="%{rpmcflags}"
283 rm -rf $RPM_BUILD_ROOT
286 install -d $RPM_BUILD_ROOT%{_sbindir}
288 %{__make} -C tools/power/cpupower install \
289 DESTDIR=$RPM_BUILD_ROOT \
297 install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{systemdunitdir}}
298 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower.service
299 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cpupower
302 install -p tools/power/cpupower/debug/i386/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
305 install -p tools/power/cpupower/debug/x86_64/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
308 install -p tools/vm/slabinfo $RPM_BUILD_ROOT%{_bindir}
309 install -p tools/vm/page-types $RPM_BUILD_ROOT%{_sbindir}
310 install -p dslm $RPM_BUILD_ROOT%{_sbindir}
312 %ifarch %{ix86} %{x8664}
313 install -d $RPM_BUILD_ROOT%{_mandir}/man8
314 # broken makefile, install manually
317 -C tools/power/x86/x86_energy_perf_policy \
318 DESTDIR=$RPM_BUILD_ROOT
320 cd tools/power/x86/x86_energy_perf_policy
321 install -p x86_energy_perf_policy $RPM_BUILD_ROOT%{_bindir}
322 cp -p x86_energy_perf_policy.8 $RPM_BUILD_ROOT%{_mandir}/man8
326 # broken makefile, install manually
329 -C tools/power/x86/turbostat \
330 DESTDIR=$RPM_BUILD_ROOT
332 cd tools/power/x86/turbostat
333 cp -p turbostat.8 $RPM_BUILD_ROOT%{_mandir}/man8
335 install -p turbostat $RPM_BUILD_ROOT%{_bindir}/turbostat
343 %{__make} -j1 install install-man \
348 CFLAGS_OPTIMIZE="%{rpmcflags}" \
350 %{?with_verbose:V=1} \
352 perfexecdir=%{_datadir}/perf-core \
353 template_dir=%{_datadir}/perf-core/templates \
354 DESTDIR=$RPM_BUILD_ROOT
355 %{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_slang}
359 %{__make} -j1 install install-man \
363 CFLAGS_OPTIMIZE="%{rpmcflags}" \
365 %{?with_verbose:V=1} \
367 perfexecdir=%{_datadir}/perf-core \
368 template_dir=%{_datadir}/perf-core/templates \
369 DESTDIR=$RPM_BUILD_ROOT
370 %{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_gtk}
373 %py_comp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
374 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
376 rm -r $RPM_BUILD_ROOT%{_datadir}/perf-core/tests
380 install -p usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
383 rm -rf $RPM_BUILD_ROOT
385 %post cpupower-libs -p /sbin/ldconfig
386 %postun cpupower-libs -p /sbin/ldconfig
389 %systemd_post cpupower.service
392 %systemd_preun cpupower.service
398 %defattr(644,root,root,755)
399 %attr(755,root,root) %{_bindir}/gen_init_cpio
400 %attr(755,root,root) %{_bindir}/slabinfo
401 %attr(755,root,root) %{_sbindir}/dslm
402 %attr(755,root,root) %{_sbindir}/page-types
403 %ifarch %{ix86} %{x8664}
404 %attr(755,root,root) %{_bindir}/centrino-decode
405 %attr(755,root,root) %{_bindir}/powernow-k8-decode
407 %ifarch %{ix86} %{x8664}
408 %attr(755,root,root) %{_bindir}/turbostat
409 %attr(755,root,root) %{_bindir}/x86_energy_perf_policy
410 %{_mandir}/man8/turbostat.8*
411 %{_mandir}/man8/x86_energy_perf_policy.8*
414 %files cpupower -f cpupower.lang
415 %defattr(644,root,root,755)
416 %attr(755,root,root) %{_bindir}/cpupower
417 %{_mandir}/man1/cpupower*.1*
418 %{systemdunitdir}/cpupower.service
419 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cpupower
422 %defattr(644,root,root,755)
423 %attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
424 %attr(755,root,root) %ghost %{_libdir}/libcpupower.so.0
426 %files cpupower-libs-devel
427 %defattr(644,root,root,755)
428 %attr(755,root,root) %{_libdir}/libcpupower.so
429 %{_includedir}/cpufreq.h
433 %defattr(644,root,root,755)
434 %{_mandir}/man1/perf*.1*
435 %dir %{_datadir}/perf-core
436 %attr(755,root,root) %{_datadir}/perf-core/perf-archive
438 %dir %{_datadir}/perf-core/scripts
440 %dir %{_datadir}/perf-core/scripts/perl
441 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util
442 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib
443 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf
444 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace
445 %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/*.pm
446 %dir %{_datadir}/perf-core/scripts/perl/bin
447 %attr(755,root,root) %{_datadir}/perf-core/scripts/perl/bin/*
448 %{_datadir}/perf-core/scripts/perl/*.pl
450 %dir %{_datadir}/perf-core/scripts/python
451 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util
452 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib
453 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf
454 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace
455 %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py*
456 %dir %{_datadir}/perf-core/scripts/python/bin
457 %attr(755,root,root) %{_datadir}/perf-core/scripts/python/bin/*
458 %{_datadir}/perf-core/scripts/python/*.py*
462 %defattr(644,root,root,755)
463 %attr(755,root,root) %{_bindir}/perf_gtk
467 %defattr(644,root,root,755)
468 %attr(755,root,root) %{_bindir}/perf_slang
470 %files -n bash-completion-perf
471 %defattr(644,root,root,755)
472 /etc/bash_completion.d/perf