2 # - unpackaged: /etc/bash_completion.d/perf
3 # - verify BR deps for -perf
4 # - different packages for perf-slang and perf-gtk
9 %bcond_without verbose # verbose build (V=1)
10 %bcond_with perf # perf tools (unfinished)
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: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
23 # Source0-md5: 21223369d682bcf44bcdfe1521095983
24 %if "%{postver}" != ".0"
25 Patch0: http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.bz2
26 # Patch0-md5: c391dc1a1b4dae81aaef6f08a0594813
28 Source1: cpupower.service
29 Source2: cpupower.config
30 URL: http://www.kernel.org/
31 BuildRequires: rpmbuild(macros) >= 1.647
32 BuildRequires: tar >= 1:1.22
35 BuildRequires: asciidoc
36 BuildRequires: audit-libs-devel
38 BuildRequires: docbook-style-xsl
39 BuildRequires: elfutils-devel
41 BuildRequires: gtk+2-devel >= 2.0
42 BuildRequires: libunwind-devel >= 0.99
43 BuildRequires: newt-devel
44 BuildRequires: perl-devel >= 5.1
45 BuildRequires: pkgconfig
46 BuildRequires: python-devel
47 BuildRequires: rpm-pythonprov
48 BuildRequires: slang-devel
51 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 %define makeopts CC="%{__cc}" %{?with_verbose:V=1}
56 This package contains the software from tools/ subdirectory from Linux
57 kernel source and the supporting documentation.
59 %description -l pl.UTF-8
60 Ten pakiet zawiera oprogramowanie z podkatalogu tools/ ze źródeł jądra
61 Linuksa oraz związaną z nim dokumentację.
64 Summary: cpupower - Shows and sets processor power related values
65 Summary(pl.UTF-8): cpupower - wyświetlanie i ustawianie wartości związanych z zużyciem energii przez procesor
66 Group: Applications/System
67 Requires(post,preun,postun): systemd-units >= 38
68 Requires: systemd-units >= 0.38
69 Provides: cpufreq-utils = 1:009-0.6.p1
70 Provides: cpufrequtils = 1:009-0.6.p1
71 Provides: cpupowerutils = 1:009-0.6.p1
72 Obsoletes: cpufreq-utils < 1:009-0.6.p1
73 Obsoletes: cpufrequtils < 1:009-0.6.p1
74 Obsoletes: cpupowerutils < 1:009-0.6.p1
75 Obsoletes: cpuspeed < 1:1.5-16
76 Requires: %{name}-cpupower-libs = %{version}-%{release}
79 cpupower is a collection of tools to examine and tune power saving
80 related features of your processor.
82 %description cpupower -l pl.UTF-8
83 cpupower to zbiór narzędzi do sprawdzania i ustawiania opcji procesora
84 związanych z oszczędzaniem energii.
86 %package cpupower-libs
87 Summary: cpupower library
88 Summary(pl.UTF-8): Biblioteka cpupower
91 %description cpupower-libs
94 %description cpupower-libs -l pl.UTF-8
97 %package cpupower-libs-devel
98 Summary: Development files for the cpupower library
99 Summary(pl.UTF-8): Pliki programistyczne biblioteki cpupower
100 Group: Development/Libraries
101 Requires: %{name} = %{version}-%{release}
102 Requires: %{name}-cpupower-libs = %{version}-%{release}
103 Provides: cpupowerutils-devel = 1:009-0.6.p1
104 Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
106 %description cpupower-libs-devel
107 Development files for the cpupower library.
109 %description cpupower-libs-devel -l pl.UTF-8
110 Pliki programistyczne biblioteki cpupower.
113 Summary: perf profiler tool
114 Summary(pl.UTF-8): Narzędzie profilujące perf
115 Group: Applications/System
118 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
119 away CPU hardware differences in Linux performance measurements and
120 presents a simple commandline interface. Perf is based on the
121 perf_events interface exported by recent versions of the Linux kernel.
123 %description perf -l pl.UTF-8
124 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
125 odseparowujące od różnic sprzętowych między pomiarami wydajności w
126 zależności od procesora oraz udostępniające prosty interfejs linii
127 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
128 przez nowe wersje jądra Linuksa.
134 %if "%{postver}" != ".0"
142 %{__make} -C tools/power/cpupower \
147 %{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
152 %{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
156 %ifarch %{ix86} %{x8664}
157 %{__make} -C tools/power/x86/x86_energy_perf_policy \
159 %{__make} -C tools/power/x86/turbostat \
166 install -d $PWD/perf-{slang,gtk}
167 %{__make} -C tools/perf all man \
172 perfexecdir=%{_datadir}/perf-core \
173 template_dir=%{_datadir}/perf-core/templates
176 %{__make} -C tools/perf all man \
180 perfexecdir=%{_datadir}/perf-core \
181 template_dir=%{_datadir}/perf-core/templates
185 %{__make} -C usr gen_init_cpio \
189 rm -rf $RPM_BUILD_ROOT
192 %{__make} -C tools/power/cpupower install \
193 DESTDIR=$RPM_BUILD_ROOT \
201 install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{systemdunitdir}}
202 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower.service
203 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cpupower
206 cd tools/power/cpupower/debug/i386
207 install -p centrino-decode $RPM_BUILD_ROOT%{_bindir}/centrino-decode
208 install -p powernow-k8-decode $RPM_BUILD_ROOT%{_bindir}/powernow-k8-decode
212 cd tools/power/cpupower/debug/x86_64
213 install -p centrino-decode $RPM_BUILD_ROOT%{_bindir}/centrino-decode
214 install -p powernow-k8-decode $RPM_BUILD_ROOT%{_bindir}/powernow-k8-decode
218 %ifarch %{ix86} %{x8664}
219 install -d $RPM_BUILD_ROOT%{_mandir}/man8
220 # broken makefile, install manually
223 -C tools/power/x86/x86_energy_perf_policy \
224 DESTDIR=$RPM_BUILD_ROOT
226 cd tools/power/x86/x86_energy_perf_policy
227 install -p x86_energy_perf_policy $RPM_BUILD_ROOT%{_bindir}
228 install -p x86_energy_perf_policy.8 $RPM_BUILD_ROOT%{_mandir}/man8
232 # broken makefile, install manually
235 -C tools/power/x86/turbostat \
236 DESTDIR=$RPM_BUILD_ROOT
238 cd tools/power/x86/turbostat
239 install -p turbostat $RPM_BUILD_ROOT%{_bindir}/turbostat
240 install -p turbostat.8 $RPM_BUILD_ROOT%{_mandir}/man8
249 %{__make} -j1 install install-man \
254 %{?with_verbose:V=1} \
256 perfexecdir=%{_datadir}/perf-core \
257 template_dir=%{_datadir}/perf-core/templates \
258 DESTDIR=$RPM_BUILD_ROOT
261 %{__make} -j1 install install-man \
265 %{?with_verbose:V=1} \
267 perfexecdir=%{_datadir}/perf-core \
268 template_dir=%{_datadir}/perf-core/templates \
269 DESTDIR=$RPM_BUILD_ROOT
273 install -p usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
276 rm -rf $RPM_BUILD_ROOT
278 %post cpupower-libs -p /sbin/ldconfig
279 %postun cpupower-libs -p /sbin/ldconfig
282 %systemd_post cpupower.service
285 %systemd_preun cpupower.service
291 %defattr(644,root,root,755)
292 %ifarch %{ix86} %{x8664}
293 %attr(755,root,root) %{_bindir}/centrino-decode
294 %attr(755,root,root) %{_bindir}/powernow-k8-decode
296 %ifarch %{ix86} %{x8664}
297 %attr(755,root,root) %{_bindir}/turbostat
298 %attr(755,root,root) %{_bindir}/x86_energy_perf_policy
299 %{_mandir}/man8/turbostat.8*
300 %{_mandir}/man8/x86_energy_perf_policy.8*
302 %attr(755,root,root) %{_bindir}/gen_init_cpio
304 %files cpupower -f cpupower.lang
305 %defattr(644,root,root,755)
306 %attr(755,root,root) %{_bindir}/cpupower
307 %{_mandir}/man1/cpupower*.1*
308 %{systemdunitdir}/cpupower.service
309 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cpupower
312 %defattr(644,root,root,755)
313 %attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
314 %attr(755,root,root) %ghost %{_libdir}/libcpupower.so.0
316 %files cpupower-libs-devel
317 %defattr(644,root,root,755)
318 %attr(755,root,root) %{_libdir}/libcpupower.so
319 %{_includedir}/cpufreq.h
323 %defattr(644,root,root,755)
324 %attr(755,root,root) %{_bindir}/perf
325 %{_mandir}/man1/perf*.1*
326 %dir %{_datadir}/perf-core
327 %attr(755,root,root) %{_datadir}/perf-core/perf-archive
329 %dir %{_datadir}/perf-core/scripts
331 %dir %{_datadir}/perf-core/scripts/perl
332 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util
333 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib
334 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf
335 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace
336 %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/*.pm
337 %dir %{_datadir}/perf-core/scripts/perl/bin
338 %attr(755,root,root) %{_datadir}/perf-core/scripts/perl/bin/*
339 %{_datadir}/perf-core/scripts/perl/*.pl
341 %dir %{_datadir}/perf-core/scripts/python
342 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util
343 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib
344 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf
345 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace
346 %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py
347 %dir %{_datadir}/perf-core/scripts/python/bin
348 %attr(755,root,root) %{_datadir}/perf-core/scripts/python/bin/*
349 %{_datadir}/perf-core/scripts/python/*.py