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: tar >= 1:1.22
36 BuildRequires: asciidoc
37 BuildRequires: audit-libs-devel
38 BuildRequires: binutils-devel
40 BuildRequires: docbook-style-xsl
41 BuildRequires: elfutils-devel
43 %{?with_gtk:BuildRequires: gtk+2-devel >= 2.0}
44 BuildRequires: libunwind-devel >= 0.99
45 BuildRequires: newt-devel
46 BuildRequires: perl-devel >= 5.1
47 BuildRequires: pkgconfig
48 BuildRequires: python-devel
49 BuildRequires: rpm-pythonprov
50 BuildRequires: slang-devel
53 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55 %define makeopts CC="%{__cc}" %{?with_verbose:V=1}
58 This package contains the software from tools/ subdirectory from Linux
59 kernel source and the supporting documentation.
61 %description -l pl.UTF-8
62 Ten pakiet zawiera oprogramowanie z podkatalogu tools/ ze źródeł jądra
63 Linuksa oraz związaną z nim dokumentację.
66 Summary: cpupower - Shows and sets processor power related values
67 Summary(pl.UTF-8): cpupower - wyświetlanie i ustawianie wartości związanych z zużyciem energii przez procesor
68 Group: Applications/System
69 Requires(post,preun,postun): systemd-units >= 38
70 Requires: %{name}-cpupower-libs = %{version}-%{release}
71 Requires: systemd-units >= 0.38
72 Provides: cpufreq-utils = 1:009-0.6.p1
73 Provides: cpufrequtils = 1:009-0.6.p1
74 Provides: cpupowerutils = 1:009-0.6.p1
75 Obsoletes: cpufreq-utils < 1:009-0.6.p1
76 Obsoletes: cpufrequtils < 1:009-0.6.p1
77 Obsoletes: cpupowerutils < 1:009-0.6.p1
78 Obsoletes: cpuspeed < 1:1.5-16
81 cpupower is a collection of tools to examine and tune power saving
82 related features of your processor.
84 %description cpupower -l pl.UTF-8
85 cpupower to zbiór narzędzi do sprawdzania i ustawiania opcji procesora
86 związanych z oszczędzaniem energii.
88 %package cpupower-libs
89 Summary: cpupower library
90 Summary(pl.UTF-8): Biblioteka cpupower
93 %description cpupower-libs
96 %description cpupower-libs -l pl.UTF-8
99 %package cpupower-libs-devel
100 Summary: Development files for the cpupower library
101 Summary(pl.UTF-8): Pliki programistyczne biblioteki cpupower
102 Group: Development/Libraries
103 Requires: %{name} = %{version}-%{release}
104 Requires: %{name}-cpupower-libs = %{version}-%{release}
105 Provides: cpufrequtils-devel = 1:009-0.6.p1
106 Provides: cpupowerutils-devel = 1:009-0.6.p1
107 Obsoletes: cpufrequtils-devel < 1:009-0.6.p1
108 Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
110 %description cpupower-libs-devel
111 Development files for the cpupower library.
113 %description cpupower-libs-devel -l pl.UTF-8
114 Pliki programistyczne biblioteki cpupower.
117 Summary: perf profiler tool (core package)
118 Summary(pl.UTF-8): Narzędzie profilujące perf (podstawowe narzędzia)
119 Group: Applications/System
121 %description perf-core
122 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
123 away CPU hardware differences in Linux performance measurements and
124 presents a simple commandline interface. Perf is based on the
125 perf_events interface exported by recent versions of the Linux kernel.
127 This package contains core files and scripts.
129 %description perf-core -l pl.UTF-8
130 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
131 odseparowujące od różnic sprzętowych między pomiarami wydajności w
132 zależności od procesora oraz udostępniające prosty interfejs linii
133 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
134 przez nowe wersje jądra Linuksa.
136 Ten pakiet zawiera podstawowe pliki i skrypty.
139 Summary: perf profiler tool (GTK+ GUI)
140 Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs graficzny GTK+)
141 Group: X11/Applications
142 Requires: %{name}-perf-core = %{version}-%{release}
143 Provides: %{name}-perf = %{version}-%{release}
145 %description perf-gtk
146 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
147 away CPU hardware differences in Linux performance measurements and
148 presents a simple commandline interface. Perf is based on the
149 perf_events interface exported by recent versions of the Linux kernel.
151 This package contains GTK+ based GUI.
153 %description perf-gtk -l pl.UTF-8
154 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
155 odseparowujące od różnic sprzętowych między pomiarami wydajności w
156 zależności od procesora oraz udostępniające prosty interfejs linii
157 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
158 przez nowe wersje jądra Linuksa.
160 Ten pakiet zawiera graficzny interfejs oparty na GTK+.
163 Summary: perf profiler tool (Slang TUI)
164 Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs tekstowy Slang)
165 Group: X11/Applications
166 Requires: %{name}-perf-core = %{version}-%{release}
167 Provides: %{name}-perf = %{version}-%{release}
169 %description perf-slang
170 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
171 away CPU hardware differences in Linux performance measurements and
172 presents a simple commandline interface. Perf is based on the
173 perf_events interface exported by recent versions of the Linux kernel.
175 This package contains Slang based TUI.
177 %description perf-slang -l pl.UTF-8
178 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
179 odseparowujące od różnic sprzętowych między pomiarami wydajności w
180 zależności od procesora oraz udostępniające prosty interfejs linii
181 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
182 przez nowe wersje jądra Linuksa.
184 Ten pakiet zawiera tekstowy interfejs oparty na bibliotece Slang.
186 %package -n bash-completion-perf
187 Summary: Bash completion for perf command
188 Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia perf
189 Group: Applications/Shells
190 Requires: %{name}-perf
191 Requires: bash-completion
193 %description -n bash-completion-perf
194 Bash completion for perf command.
196 %description -n bash-completion-perf -l pl.UTF-8
197 Bashowe uzupełnianie parametrów dla polecenia perf.
203 %if "%{postver}" != ".0"
210 # Simple Disk Sleep Monitor
211 %{__cc} %{rpmcppflags} %{rpmcflags} %{rpmldflags} Documentation/laptops/dslm.c -o dslm
214 %{__make} -C tools/power/cpupower \
216 CPUFREQ_BENCH=false \
217 OPTIMIZATION="%{rpmcflags}" \
221 %{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
223 CFLAGS="%{rpmcflags}"
227 %{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
229 CFLAGS="%{rpmcflags}"
232 %ifarch %{ix86} %{x8664}
233 %{__make} -C tools/power/x86/x86_energy_perf_policy \
235 CFLAGS="%{rpmcflags}"
236 %{__make} -C tools/power/x86/turbostat \
238 CFLAGS="%{rpmcflags} -Wall -I../../../../arch/x86/include/uapi/"
241 # page-types, slabinfo
242 %{__make} -C tools/vm page-types slabinfo \
244 CFLAGS="%{rpmcflags} -Wall -Wextra -I../lib"
249 install -d $PWD/perf-{slang,gtk}
250 %{__make} -C tools/perf all man \
254 CFLAGS_OPTIMIZE="%{rpmcflags}" \
257 perfexecdir=%{_datadir}/perf-core \
258 template_dir=%{_datadir}/perf-core/templates
262 %{__make} -C tools/perf all man \
265 CFLAGS_OPTIMIZE="%{rpmcflags}" \
268 perfexecdir=%{_datadir}/perf-core \
269 template_dir=%{_datadir}/perf-core/templates
274 %{__make} -C usr gen_init_cpio \
276 CFLAGS="%{rpmcflags}"
279 rm -rf $RPM_BUILD_ROOT
282 install -d $RPM_BUILD_ROOT%{_sbindir}
284 %{__make} -C tools/power/cpupower install \
285 DESTDIR=$RPM_BUILD_ROOT \
293 install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{systemdunitdir}}
294 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower.service
295 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cpupower
298 install -p tools/power/cpupower/debug/i386/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
301 install -p tools/power/cpupower/debug/x86_64/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
304 install -p tools/vm/slabinfo $RPM_BUILD_ROOT%{_bindir}
305 install -p tools/vm/page-types $RPM_BUILD_ROOT%{_sbindir}
306 install -p dslm $RPM_BUILD_ROOT%{_sbindir}
308 %ifarch %{ix86} %{x8664}
309 install -d $RPM_BUILD_ROOT%{_mandir}/man8
310 # broken makefile, install manually
313 -C tools/power/x86/x86_energy_perf_policy \
314 DESTDIR=$RPM_BUILD_ROOT
316 cd tools/power/x86/x86_energy_perf_policy
317 install -p x86_energy_perf_policy $RPM_BUILD_ROOT%{_bindir}
318 cp -p x86_energy_perf_policy.8 $RPM_BUILD_ROOT%{_mandir}/man8
322 # broken makefile, install manually
325 -C tools/power/x86/turbostat \
326 DESTDIR=$RPM_BUILD_ROOT
328 cd tools/power/x86/turbostat
329 cp -p turbostat.8 $RPM_BUILD_ROOT%{_mandir}/man8
331 install -p turbostat $RPM_BUILD_ROOT%{_bindir}/turbostat
339 %{__make} -j1 install install-man \
344 CFLAGS_OPTIMIZE="%{rpmcflags}" \
346 %{?with_verbose:V=1} \
348 perfexecdir=%{_datadir}/perf-core \
349 template_dir=%{_datadir}/perf-core/templates \
350 DESTDIR=$RPM_BUILD_ROOT
351 %{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_slang}
355 %{__make} -j1 install install-man \
359 CFLAGS_OPTIMIZE="%{rpmcflags}" \
361 %{?with_verbose:V=1} \
363 perfexecdir=%{_datadir}/perf-core \
364 template_dir=%{_datadir}/perf-core/templates \
365 DESTDIR=$RPM_BUILD_ROOT
366 %{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_gtk}
369 %py_comp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
370 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
374 install -p usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
376 rm -r $RPM_BUILD_ROOT%{_datadir}/perf-core/tests
379 rm -rf $RPM_BUILD_ROOT
381 %post cpupower-libs -p /sbin/ldconfig
382 %postun cpupower-libs -p /sbin/ldconfig
385 %systemd_post cpupower.service
388 %systemd_preun cpupower.service
394 %defattr(644,root,root,755)
395 %attr(755,root,root) %{_bindir}/gen_init_cpio
396 %attr(755,root,root) %{_bindir}/slabinfo
397 %attr(755,root,root) %{_sbindir}/dslm
398 %attr(755,root,root) %{_sbindir}/page-types
399 %ifarch %{ix86} %{x8664}
400 %attr(755,root,root) %{_bindir}/centrino-decode
401 %attr(755,root,root) %{_bindir}/powernow-k8-decode
403 %ifarch %{ix86} %{x8664}
404 %attr(755,root,root) %{_bindir}/turbostat
405 %attr(755,root,root) %{_bindir}/x86_energy_perf_policy
406 %{_mandir}/man8/turbostat.8*
407 %{_mandir}/man8/x86_energy_perf_policy.8*
410 %files cpupower -f cpupower.lang
411 %defattr(644,root,root,755)
412 %attr(755,root,root) %{_bindir}/cpupower
413 %{_mandir}/man1/cpupower*.1*
414 %{systemdunitdir}/cpupower.service
415 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cpupower
418 %defattr(644,root,root,755)
419 %attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
420 %attr(755,root,root) %ghost %{_libdir}/libcpupower.so.0
422 %files cpupower-libs-devel
423 %defattr(644,root,root,755)
424 %attr(755,root,root) %{_libdir}/libcpupower.so
425 %{_includedir}/cpufreq.h
429 %defattr(644,root,root,755)
430 %{_mandir}/man1/perf*.1*
431 %dir %{_datadir}/perf-core
432 %attr(755,root,root) %{_datadir}/perf-core/perf-archive
434 %dir %{_datadir}/perf-core/scripts
436 %dir %{_datadir}/perf-core/scripts/perl
437 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util
438 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib
439 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf
440 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace
441 %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/*.pm
442 %dir %{_datadir}/perf-core/scripts/perl/bin
443 %attr(755,root,root) %{_datadir}/perf-core/scripts/perl/bin/*
444 %{_datadir}/perf-core/scripts/perl/*.pl
446 %dir %{_datadir}/perf-core/scripts/python
447 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util
448 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib
449 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf
450 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace
451 %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py*
452 %dir %{_datadir}/perf-core/scripts/python/bin
453 %attr(755,root,root) %{_datadir}/perf-core/scripts/python/bin/*
454 %{_datadir}/perf-core/scripts/python/*.py*
458 %defattr(644,root,root,755)
459 %attr(755,root,root) %{_bindir}/perf_gtk
463 %defattr(644,root,root,755)
464 %attr(755,root,root) %{_bindir}/perf_slang
466 %files -n bash-completion-perf
467 %defattr(644,root,root,755)
468 /etc/bash_completion.d/perf