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
15 Summary: Assortment of tools for the Linux kernel
16 Summary(pl.UTF-8): Zestaw narzędzi dla jądra Linuksa
18 Version: %{basever}%{postver}
21 Group: Applications/System
22 Source0: https://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
23 # Source0-md5: 4f25cd5bec5f8d5a7d935b3f2ccb8481
24 %if "%{postver}" != ".0"
25 Patch0: https://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.xz
26 # Patch0-md5: 2a453acf41c3f28122a7cabd3d4acbf5
28 Source1: cpupower.service
29 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
126 %description perf-core
127 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
128 away CPU hardware differences in Linux performance measurements and
129 presents a simple commandline interface. Perf is based on the
130 perf_events interface exported by recent versions of the Linux kernel.
132 This package contains core files and scripts.
134 %description perf-core -l pl.UTF-8
135 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
136 odseparowujące od różnic sprzętowych między pomiarami wydajności w
137 zależności od procesora oraz udostępniające prosty interfejs linii
138 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
139 przez nowe wersje jądra Linuksa.
141 Ten pakiet zawiera podstawowe pliki i skrypty.
144 Summary: perf profiler tool (GTK+ GUI)
145 Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs graficzny GTK+)
146 Group: X11/Applications
147 Requires: %{name}-perf-core = %{version}-%{release}
148 Provides: %{name}-perf = %{version}-%{release}
150 %description perf-gtk
151 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
152 away CPU hardware differences in Linux performance measurements and
153 presents a simple commandline interface. Perf is based on the
154 perf_events interface exported by recent versions of the Linux kernel.
156 This package contains GTK+ based GUI.
158 %description perf-gtk -l pl.UTF-8
159 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
160 odseparowujące od różnic sprzętowych między pomiarami wydajności w
161 zależności od procesora oraz udostępniające prosty interfejs linii
162 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
163 przez nowe wersje jądra Linuksa.
165 Ten pakiet zawiera graficzny interfejs oparty na GTK+.
168 Summary: perf profiler tool (Slang TUI)
169 Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs tekstowy Slang)
170 Group: X11/Applications
171 Requires: %{name}-perf-core = %{version}-%{release}
172 Provides: %{name}-perf = %{version}-%{release}
174 %description perf-slang
175 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
176 away CPU hardware differences in Linux performance measurements and
177 presents a simple commandline interface. Perf is based on the
178 perf_events interface exported by recent versions of the Linux kernel.
180 This package contains Slang based TUI.
182 %description perf-slang -l pl.UTF-8
183 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
184 odseparowujące od różnic sprzętowych między pomiarami wydajności w
185 zależności od procesora oraz udostępniające prosty interfejs linii
186 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
187 przez nowe wersje jądra Linuksa.
189 Ten pakiet zawiera tekstowy interfejs oparty na bibliotece Slang.
191 %package -n bash-completion-perf
192 Summary: Bash completion for perf command
193 Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia perf
194 Group: Applications/Shells
195 Requires: %{name}-perf
196 Requires: bash-completion
197 %if "%{_rpmversion}" >= "5"
201 %description -n bash-completion-perf
202 Bash completion for perf command.
204 %description -n bash-completion-perf -l pl.UTF-8
205 Bashowe uzupełnianie parametrów dla polecenia perf.
211 %if "%{postver}" != ".0"
218 # Simple Disk Sleep Monitor
219 %{__cc} %{rpmcppflags} %{rpmcflags} %{rpmldflags} Documentation/laptops/dslm.c -o dslm
222 %{__make} -C tools/power/cpupower \
224 CPUFREQ_BENCH=false \
225 OPTIMIZATION="%{rpmcflags}" \
229 %{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
231 CFLAGS="%{rpmcflags}"
235 %{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
237 CFLAGS="%{rpmcflags}"
240 %ifarch %{ix86} %{x8664}
241 %{__make} -C tools/power/x86/x86_energy_perf_policy \
243 CFLAGS="%{rpmcflags}"
244 CFLAGS="%{rpmcflags}" \
245 %{__make} -C tools/power/x86/turbostat \
249 # page-types, slabinfo
250 %{__make} -C tools/vm page-types slabinfo \
252 CFLAGS="%{rpmcflags} -Wall -Wextra -I../lib"
257 install -d $PWD/perf-{slang,gtk}
258 %{__make} -C tools/perf all man \
262 CFLAGS_OPTIMIZE="%{rpmcflags}" \
265 perfexecdir=%{_datadir}/perf-core \
266 template_dir=%{_datadir}/perf-core/templates
270 %{__make} -C tools/perf all man \
273 CFLAGS_OPTIMIZE="%{rpmcflags}" \
276 perfexecdir=%{_datadir}/perf-core \
277 template_dir=%{_datadir}/perf-core/templates
282 %{__make} -C usr gen_init_cpio \
284 CFLAGS="%{rpmcflags}"
287 rm -rf $RPM_BUILD_ROOT
290 install -d $RPM_BUILD_ROOT%{_sbindir}
292 %{__make} -C tools/power/cpupower install \
293 DESTDIR=$RPM_BUILD_ROOT \
301 install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{systemdunitdir}}
302 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower.service
303 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cpupower
306 install -p tools/power/cpupower/debug/i386/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
309 install -p tools/power/cpupower/debug/x86_64/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
312 install -p tools/vm/slabinfo $RPM_BUILD_ROOT%{_bindir}
313 install -p tools/vm/page-types $RPM_BUILD_ROOT%{_sbindir}
314 install -p dslm $RPM_BUILD_ROOT%{_sbindir}
316 %ifarch %{ix86} %{x8664}
317 install -d $RPM_BUILD_ROOT%{_mandir}/man8
318 # broken makefile, install manually
321 -C tools/power/x86/x86_energy_perf_policy \
322 DESTDIR=$RPM_BUILD_ROOT
324 cd tools/power/x86/x86_energy_perf_policy
325 install -p x86_energy_perf_policy $RPM_BUILD_ROOT%{_bindir}
326 cp -p x86_energy_perf_policy.8 $RPM_BUILD_ROOT%{_mandir}/man8
330 # broken makefile, install manually
333 -C tools/power/x86/turbostat \
334 DESTDIR=$RPM_BUILD_ROOT
336 cd tools/power/x86/turbostat
337 cp -p turbostat.8 $RPM_BUILD_ROOT%{_mandir}/man8
339 install -p turbostat $RPM_BUILD_ROOT%{_bindir}/turbostat
347 %{__make} -j1 install install-man \
352 CFLAGS_OPTIMIZE="%{rpmcflags}" \
354 %{?with_verbose:V=1} \
356 perfexecdir=%{_datadir}/perf-core \
357 template_dir=%{_datadir}/perf-core/templates \
358 DESTDIR=$RPM_BUILD_ROOT
359 %{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_slang}
363 %{__make} -j1 install install-man \
367 CFLAGS_OPTIMIZE="%{rpmcflags}" \
369 %{?with_verbose:V=1} \
371 perfexecdir=%{_datadir}/perf-core \
372 template_dir=%{_datadir}/perf-core/templates \
373 DESTDIR=$RPM_BUILD_ROOT
374 %{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_gtk}
377 %py_comp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
378 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
380 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/perf-core/tests
382 install -p %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/perf
386 install -p usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
389 rm -rf $RPM_BUILD_ROOT
391 %post cpupower-libs -p /sbin/ldconfig
392 %postun cpupower-libs -p /sbin/ldconfig
395 %systemd_post cpupower.service
398 %systemd_preun cpupower.service
404 %defattr(644,root,root,755)
405 %attr(755,root,root) %{_bindir}/gen_init_cpio
406 %attr(755,root,root) %{_bindir}/slabinfo
407 %attr(755,root,root) %{_sbindir}/dslm
408 %attr(755,root,root) %{_sbindir}/page-types
409 %ifarch %{ix86} %{x8664}
410 %attr(755,root,root) %{_bindir}/centrino-decode
411 %attr(755,root,root) %{_bindir}/powernow-k8-decode
413 %ifarch %{ix86} %{x8664}
414 %attr(755,root,root) %{_bindir}/turbostat
415 %attr(755,root,root) %{_bindir}/x86_energy_perf_policy
416 %{_mandir}/man8/turbostat.8*
417 %{_mandir}/man8/x86_energy_perf_policy.8*
420 %files cpupower -f cpupower.lang
421 %defattr(644,root,root,755)
422 %attr(755,root,root) %{_bindir}/cpupower
423 %{_mandir}/man1/cpupower*.1*
424 %{systemdunitdir}/cpupower.service
425 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cpupower
428 %defattr(644,root,root,755)
429 %attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
430 %attr(755,root,root) %ghost %{_libdir}/libcpupower.so.0
432 %files cpupower-libs-devel
433 %defattr(644,root,root,755)
434 %attr(755,root,root) %{_libdir}/libcpupower.so
435 %{_includedir}/cpufreq.h
439 %defattr(644,root,root,755)
440 %attr(755,root,root) %{_bindir}/perf
441 %{_mandir}/man1/perf*.1*
442 %dir %{_datadir}/perf-core
443 %attr(755,root,root) %{_datadir}/perf-core/perf-archive
445 %dir %{_datadir}/perf-core/scripts
447 %dir %{_datadir}/perf-core/scripts/perl
448 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util
449 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib
450 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf
451 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace
452 %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/*.pm
453 %dir %{_datadir}/perf-core/scripts/perl/bin
454 %attr(755,root,root) %{_datadir}/perf-core/scripts/perl/bin/*
455 %{_datadir}/perf-core/scripts/perl/*.pl
457 %dir %{_datadir}/perf-core/scripts/python
458 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util
459 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib
460 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf
461 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace
462 %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py*
463 %dir %{_datadir}/perf-core/scripts/python/bin
464 %attr(755,root,root) %{_datadir}/perf-core/scripts/python/bin/*
465 %{_datadir}/perf-core/scripts/python/*.py*
469 %defattr(644,root,root,755)
470 %attr(755,root,root) %{_bindir}/perf_gtk
474 %defattr(644,root,root,755)
475 %attr(755,root,root) %{_bindir}/perf_slang
477 %files -n bash-completion-perf
478 %defattr(644,root,root,755)
479 /etc/bash_completion.d/perf