]> git.pld-linux.org Git - packages/kernel-tools.git/blame - kernel-tools.spec
- more -perf BRs, build man pages in proper section
[packages/kernel-tools.git] / kernel-tools.spec
CommitLineData
fea1e605 1# TODO
6737dd0a 2# - unpackaged: /etc/bash_completion.d/perf
52583efa 3# - verify BR deps for -perf
fea1e605 4# - different packages for perf-slang and perf-gtk
52583efa 5# - optflags
f57fcd71 6
49fba13a
ER
7#
8# Conditional build:
9%bcond_without verbose # verbose build (V=1)
fea1e605 10%bcond_with perf # perf tools (unfinished)
49fba13a 11
178c4b31 12%define rel 0.5
6737dd0a
JB
13%define basever 3.7
14%define postver .1
49fba13a 15Summary: Assortment of tools for the Linux kernel
bd620db3 16Summary(pl.UTF-8): Zestaw narzędzi dla jądra Linuksa
49fba13a
ER
17Name: kernel-tools
18Version: %{basever}%{postver}
19Release: %{rel}
20License: GPL v2
fea1e605 21Group: Applications/System
49fba13a 22Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
6737dd0a 23# Source0-md5: 21223369d682bcf44bcdfe1521095983
49fba13a
ER
24%if "%{postver}" != ".0"
25Patch0: http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.bz2
6737dd0a 26# Patch0-md5: c391dc1a1b4dae81aaef6f08a0594813
49fba13a 27%endif
f57fcd71
ER
28Source1: cpupower.service
29Source2: cpupower.config
52583efa 30URL: http://www.kernel.org/
f57fcd71 31BuildRequires: rpmbuild(macros) >= 1.647
49fba13a
ER
32BuildRequires: tar >= 1:1.22
33BuildRequires: xz
fea1e605
ER
34%if %{with perf}
35BuildRequires: asciidoc
52583efa
JB
36BuildRequires: audit-libs-devel
37BuildRequires: bison
38BuildRequires: docbook-style-xsl
39BuildRequires: elfutils-devel
40BuildRequires: flex
41BuildRequires: gtk+2-devel >= 2.0
42BuildRequires: libunwind-devel >= 0.99
a1c57a8e 43BuildRequires: newt-devel
52583efa
JB
44BuildRequires: perl-devel >= 5.1
45BuildRequires: pkgconfig
46BuildRequires: python-devel
fea1e605 47BuildRequires: rpm-pythonprov
a1c57a8e 48BuildRequires: slang-devel
fea1e605 49BuildRequires: xmlto
fea1e605 50%endif
49fba13a
ER
51BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
60972f76
ER
53%define makeopts CC="%{__cc}" %{?with_verbose:V=1}
54
49fba13a 55%description
bd620db3
JB
56This package contains the software from tools/ subdirectory from Linux
57kernel source and the supporting documentation.
58
59%description -l pl.UTF-8
60Ten pakiet zawiera oprogramowanie z podkatalogu tools/ ze źródeł jądra
61Linuksa oraz związaną z nim dokumentację.
49fba13a 62
4bc5704a
JK
63%package cpupower
64Summary: cpupower - Shows and sets processor power related values
bd620db3 65Summary(pl.UTF-8): cpupower - wyświetlanie i ustawianie wartości związanych z zużyciem energii przez procesor
4bc5704a 66Group: Applications/System
f57fcd71
ER
67Requires(post,preun,postun): systemd-units >= 38
68Requires: systemd-units >= 0.38
2bd21e06
ER
69Provides: cpufreq-utils = 1:009-0.6.p1
70Provides: cpufrequtils = 1:009-0.6.p1
71Provides: cpupowerutils = 1:009-0.6.p1
72Obsoletes: cpufreq-utils < 1:009-0.6.p1
73Obsoletes: cpufrequtils < 1:009-0.6.p1
74Obsoletes: cpupowerutils < 1:009-0.6.p1
75Obsoletes: cpuspeed < 1:1.5-16
d579af5a 76Requires: %{name}-cpupower-libs = %{version}-%{release}
4bc5704a
JK
77
78%description cpupower
60972f76
ER
79cpupower is a collection of tools to examine and tune power saving
80related features of your processor.
4bc5704a 81
bd620db3
JB
82%description cpupower -l pl.UTF-8
83cpupower to zbiór narzędzi do sprawdzania i ustawiania opcji procesora
84związanych z oszczędzaniem energii.
85
4bc5704a 86%package cpupower-libs
bd620db3
JB
87Summary: cpupower library
88Summary(pl.UTF-8): Biblioteka cpupower
49fba13a
ER
89Group: Libraries
90
4bc5704a 91%description cpupower-libs
bd620db3
JB
92cpupower library.
93
94%description cpupower-libs -l pl.UTF-8
95Biblioteka cpupower.
49fba13a 96
4bc5704a 97%package cpupower-libs-devel
bd620db3
JB
98Summary: Development files for the cpupower library
99Summary(pl.UTF-8): Pliki programistyczne biblioteki cpupower
49fba13a 100Group: Development/Libraries
178c4b31
ER
101Requires: %{name} = %{version}-%{release}
102Requires: %{name}-cpupower-libs = %{version}-%{release}
49fba13a 103Provides: cpupowerutils-devel = 1:009-0.6.p1
49fba13a
ER
104Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
105
4bc5704a 106%description cpupower-libs-devel
bd620db3
JB
107Development files for the cpupower library.
108
109%description cpupower-libs-devel -l pl.UTF-8
110Pliki programistyczne biblioteki cpupower.
49fba13a 111
fea1e605 112%package perf
bd620db3
JB
113Summary: perf profiler tool
114Summary(pl.UTF-8): Narzędzie profilujące perf
fea1e605
ER
115Group: Applications/System
116
117%description perf
118Perf is a profiler tool for Linux 2.6+ based systems that abstracts
119away CPU hardware differences in Linux performance measurements and
120presents a simple commandline interface. Perf is based on the
121perf_events interface exported by recent versions of the Linux kernel.
122
bd620db3
JB
123%description perf -l pl.UTF-8
124Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
125odseparowujące od różnic sprzętowych między pomiarami wydajności w
126zależności od procesora oraz udostępniające prosty interfejs linii
127poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
128przez nowe wersje jądra Linuksa.
129
49fba13a
ER
130%prep
131%setup -qc
132cd linux-%{basever}
133
134%if "%{postver}" != ".0"
135%patch0 -p1
136%endif
137
138%build
139cd linux-%{basever}
140
141# cpupower
142%{__make} -C tools/power/cpupower \
60972f76 143 %{makeopts} \
49fba13a
ER
144 CPUFREQ_BENCH=false
145
146%ifarch %{ix86}
147%{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
60972f76 148 %{makeopts} \
49fba13a
ER
149%endif
150
151%ifarch %{x8664}
152%{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
60972f76 153 %{makeopts}
49fba13a
ER
154%endif
155
156%ifarch %{ix86} %{x8664}
157%{__make} -C tools/power/x86/x86_energy_perf_policy \
60972f76 158 %{makeopts}
49fba13a 159%{__make} -C tools/power/x86/turbostat \
60972f76 160 %{makeopts}
49fba13a
ER
161%endif
162
fea1e605
ER
163%if %{with perf}
164# perf slang version
165PWD=${PWD:-$(pwd)}
166install -d $PWD/perf-{slang,gtk}
52583efa 167%{__make} -C tools/perf all man \
fea1e605
ER
168 O=$PWD/perf-slang \
169 NO_GTK2=1 \
60972f76 170 %{makeopts} \
fea1e605
ER
171 prefix=%{_prefix} \
172 perfexecdir=%{_datadir}/perf-core \
173 template_dir=%{_datadir}/perf-core/templates
174
175# perf gtk version
52583efa 176%{__make} -C tools/perf all man \
fea1e605 177 O=$PWD/perf-gtk \
60972f76 178 %{makeopts} \
fea1e605
ER
179 prefix=%{_prefix} \
180 perfexecdir=%{_datadir}/perf-core \
181 template_dir=%{_datadir}/perf-core/templates
182%endif
183
dd28be58
JK
184# gen_init_cpio
185%{__make} -C usr gen_init_cpio \
60972f76 186 %{makeopts} \
dd28be58 187
49fba13a
ER
188%install
189rm -rf $RPM_BUILD_ROOT
190cd linux-%{basever}
191
bd620db3 192%{__make} -C tools/power/cpupower install \
49fba13a
ER
193 DESTDIR=$RPM_BUILD_ROOT \
194 libdir=%{_libdir} \
195 mandir=%{_mandir} \
196 CPUFREQ_BENCH=false
197
198%find_lang cpupower
199mv cpupower.lang ..
200
f57fcd71
ER
201install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{systemdunitdir}}
202cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower.service
203cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cpupower
204
49fba13a
ER
205%ifarch %{ix86}
206cd tools/power/cpupower/debug/i386
207install -p centrino-decode $RPM_BUILD_ROOT%{_bindir}/centrino-decode
208install -p powernow-k8-decode $RPM_BUILD_ROOT%{_bindir}/powernow-k8-decode
209cd -
210%endif
211%ifarch %{x8664}
212cd tools/power/cpupower/debug/x86_64
213install -p centrino-decode $RPM_BUILD_ROOT%{_bindir}/centrino-decode
214install -p powernow-k8-decode $RPM_BUILD_ROOT%{_bindir}/powernow-k8-decode
215cd -
216%endif
217
218%ifarch %{ix86} %{x8664}
219install -d $RPM_BUILD_ROOT%{_mandir}/man8
220# broken makefile, install manually
221%if 0
222%{__make} install \
223 -C tools/power/x86/x86_energy_perf_policy \
224 DESTDIR=$RPM_BUILD_ROOT
225%else
226cd tools/power/x86/x86_energy_perf_policy
227install -p x86_energy_perf_policy $RPM_BUILD_ROOT%{_bindir}
228install -p x86_energy_perf_policy.8 $RPM_BUILD_ROOT%{_mandir}/man8
229cd -
230%endif
231
232# broken makefile, install manually
233%if 0
234%{__make} install \
235 -C tools/power/x86/turbostat \
236 DESTDIR=$RPM_BUILD_ROOT
237%else
238cd tools/power/x86/turbostat
239install -p turbostat $RPM_BUILD_ROOT%{_bindir}/turbostat
240install -p turbostat.8 $RPM_BUILD_ROOT%{_mandir}/man8
fea1e605
ER
241cd -
242%endif
49fba13a 243%endif
fea1e605
ER
244
245%if %{with perf}
246# perf slang
247PWD=${PWD:-$(pwd)}
248# perf slang version
249%{__make} -j1 install install-man \
250 -C tools/perf \
251 O=$PWD/perf-slang \
252 NO_GTK2=1 \
253 CC="%{__cc}" \
254 %{?with_verbose:V=1} \
255 prefix=%{_prefix} \
256 perfexecdir=%{_datadir}/perf-core \
257 template_dir=%{_datadir}/perf-core/templates \
258 DESTDIR=$RPM_BUILD_ROOT
259
260# perf gtk
261%{__make} -j1 install install-man \
262 -C tools/perf \
263 O=$PWD/perf-gtk \
264 CC="%{__cc}" \
265 %{?with_verbose:V=1} \
266 prefix=%{_prefix} \
267 perfexecdir=%{_datadir}/perf-core \
268 template_dir=%{_datadir}/perf-core/templates \
269 DESTDIR=$RPM_BUILD_ROOT
49fba13a
ER
270%endif
271
dd28be58 272# gen_init_cpio
60972f76 273install -p usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
dd28be58 274
49fba13a
ER
275%clean
276rm -rf $RPM_BUILD_ROOT
277
4bc5704a
JK
278%post cpupower-libs -p /sbin/ldconfig
279%postun cpupower-libs -p /sbin/ldconfig
49fba13a 280
f57fcd71
ER
281%post cpupower
282%systemd_post cpupower.service
283
284%preun cpupower
285%systemd_preun cpupower.service
286
287%postun cpupower
288%systemd_reload
289
4bc5704a 290%files
49fba13a 291%defattr(644,root,root,755)
49fba13a
ER
292%ifarch %{ix86} %{x8664}
293%attr(755,root,root) %{_bindir}/centrino-decode
294%attr(755,root,root) %{_bindir}/powernow-k8-decode
295%endif
49fba13a
ER
296%ifarch %{ix86} %{x8664}
297%attr(755,root,root) %{_bindir}/turbostat
298%attr(755,root,root) %{_bindir}/x86_energy_perf_policy
bd620db3
JB
299%{_mandir}/man8/turbostat.8*
300%{_mandir}/man8/x86_energy_perf_policy.8*
49fba13a 301%endif
dd28be58 302%attr(755,root,root) %{_bindir}/gen_init_cpio
49fba13a 303
4bc5704a
JK
304%files cpupower -f cpupower.lang
305%defattr(644,root,root,755)
306%attr(755,root,root) %{_bindir}/cpupower
bd620db3 307%{_mandir}/man1/cpupower*.1*
f57fcd71
ER
308%{systemdunitdir}/cpupower.service
309%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cpupower
4bc5704a
JK
310
311%files cpupower-libs
49fba13a
ER
312%defattr(644,root,root,755)
313%attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
bd620db3 314%attr(755,root,root) %ghost %{_libdir}/libcpupower.so.0
49fba13a 315
4bc5704a 316%files cpupower-libs-devel
49fba13a 317%defattr(644,root,root,755)
bd620db3 318%attr(755,root,root) %{_libdir}/libcpupower.so
49fba13a 319%{_includedir}/cpufreq.h
fea1e605
ER
320
321%if %{with perf}
322%files perf
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
328
329%dir %{_datadir}/perf-core/scripts
330
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
340
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
350%endif
This page took 0.114941 seconds and 4 git commands to generate.