3 # - asciidoc used at install stage of perf (should build doc in build section)
4 # - different packages for perf-slang and perf-gtk
8 %bcond_without verbose # verbose build (V=1)
9 %bcond_with perf # perf tools (unfinished)
14 Summary: Assortment of tools for the Linux kernel
15 Summary(pl.UTF-8): Zestaw narzędzi dla jądra Linuksa
17 Version: %{basever}%{postver}
20 Group: Applications/System
21 Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
22 # Source0-md5: 1a1760420eac802c541a20ab51a093d1
23 %if "%{postver}" != ".0"
24 Patch0: http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.bz2
25 # Patch0-md5: e222aa73f705b8874e1ba880f99593ce
27 Source1: cpupower.service
28 Source2: cpupower.config
29 BuildRequires: rpmbuild(macros) >= 1.647
30 BuildRequires: tar >= 1:1.22
33 BuildRequires: asciidoc
34 BuildRequires: newt-devel
35 BuildRequires: rpm-pythonprov
36 BuildRequires: slang-devel
38 # provides perf.h which util/parse-events.l loads via ../perf.h, and -I/usr/include/slang makes it being loaded first
39 BuildConflicts: Firebird-devel
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 %define makeopts CC="%{__cc}" %{?with_verbose:V=1}
46 This package contains the software from tools/ subdirectory from Linux
47 kernel source and the supporting documentation.
49 %description -l pl.UTF-8
50 Ten pakiet zawiera oprogramowanie z podkatalogu tools/ ze źródeł jądra
51 Linuksa oraz związaną z nim dokumentację.
54 Summary: cpupower - Shows and sets processor power related values
55 Summary(pl.UTF-8): cpupower - wyświetlanie i ustawianie wartości związanych z zużyciem energii przez procesor
56 Group: Applications/System
57 Requires(post,preun,postun): systemd-units >= 38
58 Requires: systemd-units >= 0.38
59 Provides: cpufreq-utils = 1:009-0.6.p1
60 Provides: cpufrequtils = 1:009-0.6.p1
61 Provides: cpupowerutils = 1:009-0.6.p1
62 Obsoletes: cpufreq-utils < 1:009-0.6.p1
63 Obsoletes: cpufrequtils < 1:009-0.6.p1
64 Obsoletes: cpupowerutils < 1:009-0.6.p1
65 Obsoletes: cpuspeed < 1:1.5-16
66 Requires: %{name}-cpupower-libs = %{version}-%{release}
69 cpupower is a collection of tools to examine and tune power saving
70 related features of your processor.
72 %description cpupower -l pl.UTF-8
73 cpupower to zbiór narzędzi do sprawdzania i ustawiania opcji procesora
74 związanych z oszczędzaniem energii.
76 %package cpupower-libs
77 Summary: cpupower library
78 Summary(pl.UTF-8): Biblioteka cpupower
81 %description cpupower-libs
84 %description cpupower-libs -l pl.UTF-8
87 %package cpupower-libs-devel
88 Summary: Development files for the cpupower library
89 Summary(pl.UTF-8): Pliki programistyczne biblioteki cpupower
90 Group: Development/Libraries
91 Requires: %{name} = %{version}-%{release}
92 Requires: %{name}-cpupower-libs = %{version}-%{release}
93 Provides: cpupowerutils-devel = 1:009-0.6.p1
94 Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
96 %description cpupower-libs-devel
97 Development files for the cpupower library.
99 %description cpupower-libs-devel -l pl.UTF-8
100 Pliki programistyczne biblioteki cpupower.
103 Summary: perf profiler tool
104 Summary(pl.UTF-8): Narzędzie profilujące perf
105 Group: Applications/System
108 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
109 away CPU hardware differences in Linux performance measurements and
110 presents a simple commandline interface. Perf is based on the
111 perf_events interface exported by recent versions of the Linux kernel.
113 %description perf -l pl.UTF-8
114 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
115 odseparowujące od różnic sprzętowych między pomiarami wydajności w
116 zależności od procesora oraz udostępniające prosty interfejs linii
117 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
118 przez nowe wersje jądra Linuksa.
124 %if "%{postver}" != ".0"
132 %{__make} -C tools/power/cpupower \
137 %{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
142 %{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
146 %ifarch %{ix86} %{x8664}
147 %{__make} -C tools/power/x86/x86_energy_perf_policy \
149 %{__make} -C tools/power/x86/turbostat \
156 install -d $PWD/perf-{slang,gtk}
157 %{__make} -C tools/perf \
162 perfexecdir=%{_datadir}/perf-core \
163 template_dir=%{_datadir}/perf-core/templates
166 %{__make} -C tools/perf \
170 perfexecdir=%{_datadir}/perf-core \
171 template_dir=%{_datadir}/perf-core/templates
175 %{__make} -C usr gen_init_cpio \
179 rm -rf $RPM_BUILD_ROOT
182 %{__make} -C tools/power/cpupower install \
183 DESTDIR=$RPM_BUILD_ROOT \
191 install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{systemdunitdir}}
192 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower.service
193 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cpupower
196 cd tools/power/cpupower/debug/i386
197 install -p centrino-decode $RPM_BUILD_ROOT%{_bindir}/centrino-decode
198 install -p powernow-k8-decode $RPM_BUILD_ROOT%{_bindir}/powernow-k8-decode
202 cd tools/power/cpupower/debug/x86_64
203 install -p centrino-decode $RPM_BUILD_ROOT%{_bindir}/centrino-decode
204 install -p powernow-k8-decode $RPM_BUILD_ROOT%{_bindir}/powernow-k8-decode
208 %ifarch %{ix86} %{x8664}
209 install -d $RPM_BUILD_ROOT%{_mandir}/man8
210 # broken makefile, install manually
213 -C tools/power/x86/x86_energy_perf_policy \
214 DESTDIR=$RPM_BUILD_ROOT
216 cd tools/power/x86/x86_energy_perf_policy
217 install -p x86_energy_perf_policy $RPM_BUILD_ROOT%{_bindir}
218 install -p x86_energy_perf_policy.8 $RPM_BUILD_ROOT%{_mandir}/man8
222 # broken makefile, install manually
225 -C tools/power/x86/turbostat \
226 DESTDIR=$RPM_BUILD_ROOT
228 cd tools/power/x86/turbostat
229 install -p turbostat $RPM_BUILD_ROOT%{_bindir}/turbostat
230 install -p turbostat.8 $RPM_BUILD_ROOT%{_mandir}/man8
239 %{__make} -j1 install install-man \
244 %{?with_verbose:V=1} \
246 perfexecdir=%{_datadir}/perf-core \
247 template_dir=%{_datadir}/perf-core/templates \
248 DESTDIR=$RPM_BUILD_ROOT
251 %{__make} -j1 install install-man \
255 %{?with_verbose:V=1} \
257 perfexecdir=%{_datadir}/perf-core \
258 template_dir=%{_datadir}/perf-core/templates \
259 DESTDIR=$RPM_BUILD_ROOT
263 install -p usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
266 rm -rf $RPM_BUILD_ROOT
268 %post cpupower-libs -p /sbin/ldconfig
269 %postun cpupower-libs -p /sbin/ldconfig
272 %systemd_post cpupower.service
275 %systemd_preun cpupower.service
281 %defattr(644,root,root,755)
282 %ifarch %{ix86} %{x8664}
283 %attr(755,root,root) %{_bindir}/centrino-decode
284 %attr(755,root,root) %{_bindir}/powernow-k8-decode
286 %ifarch %{ix86} %{x8664}
287 %attr(755,root,root) %{_bindir}/turbostat
288 %attr(755,root,root) %{_bindir}/x86_energy_perf_policy
289 %{_mandir}/man8/turbostat.8*
290 %{_mandir}/man8/x86_energy_perf_policy.8*
292 %attr(755,root,root) %{_bindir}/gen_init_cpio
294 %files cpupower -f cpupower.lang
295 %defattr(644,root,root,755)
296 %attr(755,root,root) %{_bindir}/cpupower
297 %{_mandir}/man1/cpupower*.1*
298 %{systemdunitdir}/cpupower.service
299 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cpupower
302 %defattr(644,root,root,755)
303 %attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
304 %attr(755,root,root) %ghost %{_libdir}/libcpupower.so.0
306 %files cpupower-libs-devel
307 %defattr(644,root,root,755)
308 %attr(755,root,root) %{_libdir}/libcpupower.so
309 %{_includedir}/cpufreq.h
313 %defattr(644,root,root,755)
314 %attr(755,root,root) %{_bindir}/perf
315 %{_mandir}/man1/perf*.1*
316 %dir %{_datadir}/perf-core
317 %attr(755,root,root) %{_datadir}/perf-core/perf-archive
319 %dir %{_datadir}/perf-core/scripts
321 %dir %{_datadir}/perf-core/scripts/perl
322 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util
323 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib
324 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf
325 %dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace
326 %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/*.pm
327 %dir %{_datadir}/perf-core/scripts/perl/bin
328 %attr(755,root,root) %{_datadir}/perf-core/scripts/perl/bin/*
329 %{_datadir}/perf-core/scripts/perl/*.pl
331 %dir %{_datadir}/perf-core/scripts/python
332 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util
333 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib
334 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf
335 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace
336 %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py
337 %dir %{_datadir}/perf-core/scripts/python/bin
338 %attr(755,root,root) %{_datadir}/perf-core/scripts/python/bin/*
339 %{_datadir}/perf-core/scripts/python/*.py