3 %bcond_without verbose # verbose build (V=1)
4 %bcond_without perf # perf tools
9 Summary: Assortment of tools for the Linux kernel
10 Summary(pl.UTF-8): Zestaw narzędzi dla jądra Linuksa
12 Version: %{basever}%{postver}
15 Group: Applications/System
16 Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
17 # Source0-md5: 21223369d682bcf44bcdfe1521095983
18 %if "%{postver}" != ".0"
19 Patch0: http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.bz2
20 # Patch0-md5: c391dc1a1b4dae81aaef6f08a0594813
22 Source1: cpupower.service
23 Source2: cpupower.config
24 URL: http://www.kernel.org/
25 BuildRequires: rpmbuild(macros) >= 1.647
26 BuildRequires: tar >= 1:1.22
29 BuildRequires: asciidoc
30 BuildRequires: audit-libs-devel
31 BuildRequires: binutils-devel
33 BuildRequires: docbook-style-xsl
34 BuildRequires: elfutils-devel
36 BuildRequires: gtk+2-devel >= 2.0
37 BuildRequires: libunwind-devel >= 0.99
38 BuildRequires: newt-devel
39 BuildRequires: perl-devel >= 5.1
40 BuildRequires: pkgconfig
41 BuildRequires: python-devel
42 BuildRequires: rpm-pythonprov
43 BuildRequires: slang-devel
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 %define makeopts CC="%{__cc}" %{?with_verbose:V=1}
51 This package contains the software from tools/ subdirectory from Linux
52 kernel source and the supporting documentation.
54 %description -l pl.UTF-8
55 Ten pakiet zawiera oprogramowanie z podkatalogu tools/ ze źródeł jądra
56 Linuksa oraz związaną z nim dokumentację.
59 Summary: cpupower - Shows and sets processor power related values
60 Summary(pl.UTF-8): cpupower - wyświetlanie i ustawianie wartości związanych z zużyciem energii przez procesor
61 Group: Applications/System
62 Requires(post,preun,postun): systemd-units >= 38
63 Requires: systemd-units >= 0.38
64 Provides: cpufreq-utils = 1:009-0.6.p1
65 Provides: cpufrequtils = 1:009-0.6.p1
66 Provides: cpupowerutils = 1:009-0.6.p1
67 Obsoletes: cpufreq-utils < 1:009-0.6.p1
68 Obsoletes: cpufrequtils < 1:009-0.6.p1
69 Obsoletes: cpupowerutils < 1:009-0.6.p1
70 Obsoletes: cpuspeed < 1:1.5-16
71 Requires: %{name}-cpupower-libs = %{version}-%{release}
74 cpupower is a collection of tools to examine and tune power saving
75 related features of your processor.
77 %description cpupower -l pl.UTF-8
78 cpupower to zbiór narzędzi do sprawdzania i ustawiania opcji procesora
79 związanych z oszczędzaniem energii.
81 %package cpupower-libs
82 Summary: cpupower library
83 Summary(pl.UTF-8): Biblioteka cpupower
86 %description cpupower-libs
89 %description cpupower-libs -l pl.UTF-8
92 %package cpupower-libs-devel
93 Summary: Development files for the cpupower library
94 Summary(pl.UTF-8): Pliki programistyczne biblioteki cpupower
95 Group: Development/Libraries
96 Requires: %{name} = %{version}-%{release}
97 Requires: %{name}-cpupower-libs = %{version}-%{release}
98 Provides: cpupowerutils-devel = 1:009-0.6.p1
99 Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
101 %description cpupower-libs-devel
102 Development files for the cpupower library.
104 %description cpupower-libs-devel -l pl.UTF-8
105 Pliki programistyczne biblioteki cpupower.
108 Summary: perf profiler tool (core package)
109 Summary(pl.UTF-8): Narzędzie profilujące perf (podstawowe narzędzia)
110 Group: Applications/System
112 %description perf-core
113 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
114 away CPU hardware differences in Linux performance measurements and
115 presents a simple commandline interface. Perf is based on the
116 perf_events interface exported by recent versions of the Linux kernel.
118 This package contains core files and scripts.
120 %description perf-core -l pl.UTF-8
121 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
122 odseparowujące od różnic sprzętowych między pomiarami wydajności w
123 zależności od procesora oraz udostępniające prosty interfejs linii
124 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
125 przez nowe wersje jądra Linuksa.
127 Ten pakiet zawiera podstawowe pliki i skrypty.
130 Summary: perf profiler tool (GTK+ GUI)
131 Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs graficzny GTK+)
132 Group: X11/Applications
133 Requires: %{name}-perf-core = %{version}-%{release}
134 Provides: %{name}-perf = %{version}-%{release}
136 %description perf-gtk
137 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
138 away CPU hardware differences in Linux performance measurements and
139 presents a simple commandline interface. Perf is based on the
140 perf_events interface exported by recent versions of the Linux kernel.
142 This package contains GTK+ based GUI.
144 %description perf-gtk -l pl.UTF-8
145 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
146 odseparowujące od różnic sprzętowych między pomiarami wydajności w
147 zależności od procesora oraz udostępniające prosty interfejs linii
148 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
149 przez nowe wersje jądra Linuksa.
151 Ten pakiet zawiera graficzny interfejs oparty na GTK+.
154 Summary: perf profiler tool (Slang TUI)
155 Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs tekstowy Slang)
156 Group: X11/Applications
157 Requires: %{name}-perf-core = %{version}-%{release}
158 Provides: %{name}-perf = %{version}-%{release}
160 %description perf-slang
161 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
162 away CPU hardware differences in Linux performance measurements and
163 presents a simple commandline interface. Perf is based on the
164 perf_events interface exported by recent versions of the Linux kernel.
166 This package contains Slang based TUI.
168 %description perf-slang -l pl.UTF-8
169 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
170 odseparowujące od różnic sprzętowych między pomiarami wydajności w
171 zależności od procesora oraz udostępniające prosty interfejs linii
172 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
173 przez nowe wersje jądra Linuksa.
175 Ten pakiet zawiera tekstowy interfejs oparty na bibliotece Slang.
177 %package -n bash-completion-perf
178 Summary: Bash completion for perf command
179 Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia perf
180 Group: Applications/Shells
181 Requires: %{name}-perf = %{version}-%{release}
182 Requires: bash-completion
184 %description -n bash-completion-perf
185 Bash completion for perf command.
187 %description -n bash-completion-perf -l pl.UTF-8
188 Bashowe uzupełnianie parametrów dla polecenia perf.
194 %if "%{postver}" != ".0"
202 %{__make} -C tools/power/cpupower \
204 CPUFREQ_BENCH=false \
205 OPTIMIZATION="%{rpmcflags}" \
209 %{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
211 CFLAGS="%{rpmcflags}"
215 %{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
217 CFLAGS="%{rpmcflags}"
220 %ifarch %{ix86} %{x8664}
221 %{__make} -C tools/power/x86/x86_energy_perf_policy \
223 CFLAGS="%{rpmcflags}"
224 %{__make} -C tools/power/x86/turbostat \
226 CFLAGS="%{rpmcflags} -Wall"
230 %{__make} -C tools/vm \
232 CFLAGS="%{rpmcflags} -Wall -Wextra"
237 install -d $PWD/perf-{slang,gtk}
238 %{__make} -C tools/perf all man \
242 CFLAGS_OPTIMIZE="%{rpmcflags}" \
244 perfexecdir=%{_datadir}/perf-core \
245 template_dir=%{_datadir}/perf-core/templates
248 %{__make} -C tools/perf all man \
251 CFLAGS_OPTIMIZE="%{rpmcflags}" \
253 perfexecdir=%{_datadir}/perf-core \
254 template_dir=%{_datadir}/perf-core/templates
258 %{__make} -C usr gen_init_cpio \
260 CFLAGS="%{rpmcflags}"
263 rm -rf $RPM_BUILD_ROOT
266 %{__make} -C tools/power/cpupower install \
267 DESTDIR=$RPM_BUILD_ROOT \
275 install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{systemdunitdir}}
276 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower.service
277 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cpupower
280 install -p tools/power/cpupower/debug/i386/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
283 install -p tools/power/cpupower/debug/x86_64/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
286 install tools/vm/slabinfo $RPM_BUILD_ROOT%{_bindir}
288 %ifarch %{ix86} %{x8664}
289 install -d $RPM_BUILD_ROOT%{_mandir}/man8
290 # broken makefile, install manually
293 -C tools/power/x86/x86_energy_perf_policy \
294 DESTDIR=$RPM_BUILD_ROOT
296 cd tools/power/x86/x86_energy_perf_policy
297 install -p x86_energy_perf_policy $RPM_BUILD_ROOT%{_bindir}
298 install -p x86_energy_perf_policy.8 $RPM_BUILD_ROOT%{_mandir}/man8
302 # broken makefile, install manually
305 -C tools/power/x86/turbostat \
306 DESTDIR=$RPM_BUILD_ROOT
308 cd tools/power/x86/turbostat
309 install -p turbostat $RPM_BUILD_ROOT%{_bindir}/turbostat
310 install -p turbostat.8 $RPM_BUILD_ROOT%{_mandir}/man8
319 %{__make} -j1 install install-man \
324 CFLAGS_OPTIMIZE="%{rpmcflags}" \
325 %{?with_verbose:V=1} \
327 perfexecdir=%{_datadir}/perf-core \
328 template_dir=%{_datadir}/perf-core/templates \
329 DESTDIR=$RPM_BUILD_ROOT
330 %{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,-slang}
333 %{__make} -j1 install install-man \
337 CFLAGS_OPTIMIZE="%{rpmcflags}" \
338 %{?with_verbose:V=1} \
340 perfexecdir=%{_datadir}/perf-core \
341 template_dir=%{_datadir}/perf-core/templates \
342 DESTDIR=$RPM_BUILD_ROOT
343 %{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,-gtk}
345 %py_comp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
346 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
350 install -p usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
353 rm -rf $RPM_BUILD_ROOT
355 %post cpupower-libs -p /sbin/ldconfig
356 %postun cpupower-libs -p /sbin/ldconfig
359 %systemd_post cpupower.service
362 %systemd_preun cpupower.service
368 %defattr(644,root,root,755)
369 %attr(755,root,root) %{_bindir}/gen_init_cpio
370 %attr(755,root,root) %{_bindir}/slabinfo
371 %ifarch %{ix86} %{x8664}
372 %attr(755,root,root) %{_bindir}/centrino-decode
373 %attr(755,root,root) %{_bindir}/powernow-k8-decode
375 %ifarch %{ix86} %{x8664}
376 %attr(755,root,root) %{_bindir}/turbostat
377 %attr(755,root,root) %{_bindir}/x86_energy_perf_policy
378 %{_mandir}/man8/turbostat.8*
379 %{_mandir}/man8/x86_energy_perf_policy.8*
382 %files cpupower -f cpupower.lang
383 %defattr(644,root,root,755)
384 %attr(755,root,root) %{_bindir}/cpupower
385 %{_mandir}/man1/cpupower*.1*
386 %{systemdunitdir}/cpupower.service
387 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cpupower
390 %defattr(644,root,root,755)
391 %attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
392 %attr(755,root,root) %ghost %{_libdir}/libcpupower.so.0
394 %files cpupower-libs-devel
395 %defattr(644,root,root,755)
396 %attr(755,root,root) %{_libdir}/libcpupower.so
397 %{_includedir}/cpufreq.h
401 %defattr(644,root,root,755)
402 %{_mandir}/man1/perf*.1*
403 %dir %{_datadir}/perf-core
404 %attr(755,root,root) %{_datadir}/perf-core/perf-archive
406 %dir %{_datadir}/perf-core/scripts
408 %dir %{_datadir}/perf-core/scripts/perl
409 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util
410 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib
411 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf
412 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace
413 %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/*.pm
414 %dir %{_datadir}/perf-core/scripts/perl/bin
415 %attr(755,root,root) %{_datadir}/perf-core/scripts/perl/bin/*
416 %{_datadir}/perf-core/scripts/perl/*.pl
418 %dir %{_datadir}/perf-core/scripts/python
419 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util
420 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib
421 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf
422 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace
423 %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py*
424 %dir %{_datadir}/perf-core/scripts/python/bin
425 %attr(755,root,root) %{_datadir}/perf-core/scripts/python/bin/*
426 %{_datadir}/perf-core/scripts/python/*.py*
429 %defattr(644,root,root,755)
430 %attr(755,root,root) %{_bindir}/perf-gtk
433 %defattr(644,root,root,755)
434 %attr(755,root,root) %{_bindir}/perf-slang
436 %files -n bash-completion-perf
437 %defattr(644,root,root,755)
438 /etc/bash_completion.d/perf