]> git.pld-linux.org Git - packages/kernel-tools.git/blame - kernel-tools.spec
- release 2 (by relup.sh)
[packages/kernel-tools.git] / kernel-tools.spec
CommitLineData
bb6b0f50
ER
1# TODO:
2# - redefine: PACKAGE_BUGREPORT=cpufreq@vger.kernel.org
b1f08c11
ER
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
bb6b0f50 7
49fba13a
ER
8# Conditional build:
9%bcond_without verbose # verbose build (V=1)
db5f9ac9 10%bcond_without perf # perf tools
bc35d286 11%bcond_without gtk # gtk perf version
49fba13a 12
eafb79c4 13%define rel 2
3b4ac2b4 14%define basever 3.10
f0dde210 15%define postver .27
49fba13a 16Summary: Assortment of tools for the Linux kernel
bd620db3 17Summary(pl.UTF-8): Zestaw narzędzi dla jądra Linuksa
49fba13a
ER
18Name: kernel-tools
19Version: %{basever}%{postver}
20Release: %{rel}
21License: GPL v2
fea1e605 22Group: Applications/System
49fba13a 23Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
f111fe43 24# Source0-md5: 4f25cd5bec5f8d5a7d935b3f2ccb8481
49fba13a 25%if "%{postver}" != ".0"
83e3cc6b 26Patch0: http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.xz
f0dde210 27# Patch0-md5: 58009825fb7ca7ca7913ab68fbf8a8a7
49fba13a 28%endif
f57fcd71
ER
29Source1: cpupower.service
30Source2: cpupower.config
52583efa 31URL: http://www.kernel.org/
4a7175d2 32BuildRequires: gettext-tools
9596c3d3 33BuildRequires: pciutils-devel
a8b28c3a 34BuildRequires: rpmbuild(macros) >= 1.647
49fba13a
ER
35BuildRequires: tar >= 1:1.22
36BuildRequires: xz
fea1e605
ER
37%if %{with perf}
38BuildRequires: asciidoc
52583efa 39BuildRequires: audit-libs-devel
db5f9ac9 40BuildRequires: binutils-devel
52583efa 41BuildRequires: bison
a8b28c3a 42BuildRequires: docbook-dtd45-xml
52583efa
JB
43BuildRequires: docbook-style-xsl
44BuildRequires: elfutils-devel
45BuildRequires: flex
52583efa 46BuildRequires: libunwind-devel >= 0.99
52583efa 47BuildRequires: perl-devel >= 5.1
52583efa 48BuildRequires: python-devel
fea1e605 49BuildRequires: rpm-pythonprov
a1c57a8e 50BuildRequires: slang-devel
fea1e605 51BuildRequires: xmlto
a8b28c3a
ER
52%if %{with gtk}
53BuildRequires: gtk+2-devel >= 2.0
54BuildRequires: pkgconfig
55%endif
fea1e605 56%endif
49fba13a
ER
57BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58
60972f76
ER
59%define makeopts CC="%{__cc}" %{?with_verbose:V=1}
60
49fba13a 61%description
bd620db3
JB
62This package contains the software from tools/ subdirectory from Linux
63kernel source and the supporting documentation.
64
65%description -l pl.UTF-8
66Ten pakiet zawiera oprogramowanie z podkatalogu tools/ ze źródeł jądra
67Linuksa oraz związaną z nim dokumentację.
49fba13a 68
4bc5704a
JK
69%package cpupower
70Summary: cpupower - Shows and sets processor power related values
bd620db3 71Summary(pl.UTF-8): cpupower - wyświetlanie i ustawianie wartości związanych z zużyciem energii przez procesor
4bc5704a 72Group: Applications/System
f57fcd71 73Requires(post,preun,postun): systemd-units >= 38
91fd1f55 74Requires: %{name}-cpupower-libs = %{version}-%{release}
f57fcd71 75Requires: systemd-units >= 0.38
2bd21e06
ER
76Provides: cpufreq-utils = 1:009-0.6.p1
77Provides: cpufrequtils = 1:009-0.6.p1
78Provides: cpupowerutils = 1:009-0.6.p1
79Obsoletes: cpufreq-utils < 1:009-0.6.p1
80Obsoletes: cpufrequtils < 1:009-0.6.p1
81Obsoletes: cpupowerutils < 1:009-0.6.p1
82Obsoletes: cpuspeed < 1:1.5-16
4bc5704a
JK
83
84%description cpupower
60972f76
ER
85cpupower is a collection of tools to examine and tune power saving
86related features of your processor.
4bc5704a 87
bd620db3
JB
88%description cpupower -l pl.UTF-8
89cpupower to zbiór narzędzi do sprawdzania i ustawiania opcji procesora
90związanych z oszczędzaniem energii.
91
4bc5704a 92%package cpupower-libs
bd620db3
JB
93Summary: cpupower library
94Summary(pl.UTF-8): Biblioteka cpupower
49fba13a
ER
95Group: Libraries
96
4bc5704a 97%description cpupower-libs
bd620db3
JB
98cpupower library.
99
100%description cpupower-libs -l pl.UTF-8
101Biblioteka cpupower.
49fba13a 102
4bc5704a 103%package cpupower-libs-devel
bd620db3
JB
104Summary: Development files for the cpupower library
105Summary(pl.UTF-8): Pliki programistyczne biblioteki cpupower
49fba13a 106Group: Development/Libraries
178c4b31
ER
107Requires: %{name} = %{version}-%{release}
108Requires: %{name}-cpupower-libs = %{version}-%{release}
91fd1f55 109Provides: cpufrequtils-devel = 1:009-0.6.p1
49fba13a 110Provides: cpupowerutils-devel = 1:009-0.6.p1
91fd1f55 111Obsoletes: cpufrequtils-devel < 1:009-0.6.p1
49fba13a
ER
112Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
113
4bc5704a 114%description cpupower-libs-devel
bd620db3
JB
115Development files for the cpupower library.
116
117%description cpupower-libs-devel -l pl.UTF-8
118Pliki programistyczne biblioteki cpupower.
49fba13a 119
db5f9ac9
JB
120%package perf-core
121Summary: perf profiler tool (core package)
122Summary(pl.UTF-8): Narzędzie profilujące perf (podstawowe narzędzia)
fea1e605
ER
123Group: Applications/System
124
db5f9ac9 125%description perf-core
fea1e605
ER
126Perf is a profiler tool for Linux 2.6+ based systems that abstracts
127away CPU hardware differences in Linux performance measurements and
128presents a simple commandline interface. Perf is based on the
129perf_events interface exported by recent versions of the Linux kernel.
130
db5f9ac9
JB
131This package contains core files and scripts.
132
133%description perf-core -l pl.UTF-8
134Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
135odseparowujące od różnic sprzętowych między pomiarami wydajności w
136zależności od procesora oraz udostępniające prosty interfejs linii
137poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
138przez nowe wersje jądra Linuksa.
139
140Ten pakiet zawiera podstawowe pliki i skrypty.
141
142%package perf-gtk
143Summary: perf profiler tool (GTK+ GUI)
144Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs graficzny GTK+)
145Group: X11/Applications
146Requires: %{name}-perf-core = %{version}-%{release}
147Provides: %{name}-perf = %{version}-%{release}
148
149%description perf-gtk
150Perf is a profiler tool for Linux 2.6+ based systems that abstracts
151away CPU hardware differences in Linux performance measurements and
152presents a simple commandline interface. Perf is based on the
153perf_events interface exported by recent versions of the Linux kernel.
154
155This package contains GTK+ based GUI.
156
157%description perf-gtk -l pl.UTF-8
158Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
159odseparowujące od różnic sprzętowych między pomiarami wydajności w
160zależności od procesora oraz udostępniające prosty interfejs linii
161poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
162przez nowe wersje jądra Linuksa.
163
164Ten pakiet zawiera graficzny interfejs oparty na GTK+.
165
166%package perf-slang
167Summary: perf profiler tool (Slang TUI)
168Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs tekstowy Slang)
169Group: X11/Applications
170Requires: %{name}-perf-core = %{version}-%{release}
171Provides: %{name}-perf = %{version}-%{release}
172
173%description perf-slang
174Perf is a profiler tool for Linux 2.6+ based systems that abstracts
175away CPU hardware differences in Linux performance measurements and
176presents a simple commandline interface. Perf is based on the
177perf_events interface exported by recent versions of the Linux kernel.
178
179This package contains Slang based TUI.
180
181%description perf-slang -l pl.UTF-8
bd620db3
JB
182Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
183odseparowujące od różnic sprzętowych między pomiarami wydajności w
184zależności od procesora oraz udostępniające prosty interfejs linii
185poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
186przez nowe wersje jądra Linuksa.
187
db5f9ac9
JB
188Ten pakiet zawiera tekstowy interfejs oparty na bibliotece Slang.
189
190%package -n bash-completion-perf
191Summary: Bash completion for perf command
192Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia perf
193Group: Applications/Shells
3385eb86 194Requires: %{name}-perf
db5f9ac9
JB
195Requires: bash-completion
196
197%description -n bash-completion-perf
198Bash completion for perf command.
199
200%description -n bash-completion-perf -l pl.UTF-8
201Bashowe uzupełnianie parametrów dla polecenia perf.
202
49fba13a
ER
203%prep
204%setup -qc
205cd linux-%{basever}
206
207%if "%{postver}" != ".0"
208%patch0 -p1
209%endif
210
211%build
212cd linux-%{basever}
213
b1f08c11
ER
214# Simple Disk Sleep Monitor
215%{__cc} %{rpmcppflags} %{rpmcflags} %{rpmldflags} Documentation/laptops/dslm.c -o dslm
216
49fba13a
ER
217# cpupower
218%{__make} -C tools/power/cpupower \
60972f76 219 %{makeopts} \
fb1ff9fc
JB
220 CPUFREQ_BENCH=false \
221 OPTIMIZATION="%{rpmcflags}" \
222 STRIPCMD=true
49fba13a
ER
223
224%ifarch %{ix86}
225%{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
fb1ff9fc
JB
226 CC="%{__cc}" \
227 CFLAGS="%{rpmcflags}"
49fba13a
ER
228%endif
229
230%ifarch %{x8664}
231%{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
fb1ff9fc
JB
232 CC="%{__cc}" \
233 CFLAGS="%{rpmcflags}"
49fba13a
ER
234%endif
235
236%ifarch %{ix86} %{x8664}
237%{__make} -C tools/power/x86/x86_energy_perf_policy \
fb1ff9fc
JB
238 CC="%{__cc}" \
239 CFLAGS="%{rpmcflags}"
49fba13a 240%{__make} -C tools/power/x86/turbostat \
fb1ff9fc 241 CC="%{__cc}" \
83e3cc6b 242 CFLAGS="%{rpmcflags} -Wall -I../../../../arch/x86/include/uapi/"
49fba13a
ER
243%endif
244
f111fe43
JK
245# page-types, slabinfo
246%{__make} -C tools/vm page-types slabinfo \
701b458f 247 CC="%{__cc}" \
f111fe43 248 CFLAGS="%{rpmcflags} -Wall -Wextra -I../lib"
701b458f 249
fea1e605
ER
250%if %{with perf}
251# perf slang version
252PWD=${PWD:-$(pwd)}
253install -d $PWD/perf-{slang,gtk}
52583efa 254%{__make} -C tools/perf all man \
fea1e605
ER
255 O=$PWD/perf-slang \
256 NO_GTK2=1 \
60972f76 257 %{makeopts} \
fb1ff9fc 258 CFLAGS_OPTIMIZE="%{rpmcflags}" \
d0e13ec9 259 WERROR=0 \
fea1e605
ER
260 prefix=%{_prefix} \
261 perfexecdir=%{_datadir}/perf-core \
262 template_dir=%{_datadir}/perf-core/templates
263
bc35d286 264%if %{with gtk}
fea1e605 265# perf gtk version
52583efa 266%{__make} -C tools/perf all man \
fea1e605 267 O=$PWD/perf-gtk \
60972f76 268 %{makeopts} \
fb1ff9fc 269 CFLAGS_OPTIMIZE="%{rpmcflags}" \
d0e13ec9 270 WERROR=0 \
fea1e605
ER
271 prefix=%{_prefix} \
272 perfexecdir=%{_datadir}/perf-core \
273 template_dir=%{_datadir}/perf-core/templates
274%endif
bc35d286 275%endif
fea1e605 276
dd28be58
JK
277# gen_init_cpio
278%{__make} -C usr gen_init_cpio \
60972f76 279 %{makeopts} \
fb1ff9fc 280 CFLAGS="%{rpmcflags}"
dd28be58 281
49fba13a
ER
282%install
283rm -rf $RPM_BUILD_ROOT
b1f08c11 284
49fba13a 285cd linux-%{basever}
b1f08c11 286install -d $RPM_BUILD_ROOT%{_sbindir}
49fba13a 287
bd620db3 288%{__make} -C tools/power/cpupower install \
49fba13a
ER
289 DESTDIR=$RPM_BUILD_ROOT \
290 libdir=%{_libdir} \
291 mandir=%{_mandir} \
292 CPUFREQ_BENCH=false
293
294%find_lang cpupower
295mv cpupower.lang ..
296
f57fcd71
ER
297install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{systemdunitdir}}
298cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower.service
299cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cpupower
300
49fba13a 301%ifarch %{ix86}
701b458f 302install -p tools/power/cpupower/debug/i386/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
49fba13a
ER
303%endif
304%ifarch %{x8664}
701b458f 305install -p tools/power/cpupower/debug/x86_64/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
49fba13a
ER
306%endif
307
b1f08c11 308install -p tools/vm/slabinfo $RPM_BUILD_ROOT%{_bindir}
f111fe43 309install -p tools/vm/page-types $RPM_BUILD_ROOT%{_sbindir}
b1f08c11 310install -p dslm $RPM_BUILD_ROOT%{_sbindir}
701b458f 311
49fba13a
ER
312%ifarch %{ix86} %{x8664}
313install -d $RPM_BUILD_ROOT%{_mandir}/man8
314# broken makefile, install manually
315%if 0
316%{__make} install \
317 -C tools/power/x86/x86_energy_perf_policy \
318 DESTDIR=$RPM_BUILD_ROOT
319%else
320cd tools/power/x86/x86_energy_perf_policy
321install -p x86_energy_perf_policy $RPM_BUILD_ROOT%{_bindir}
b1f08c11 322cp -p x86_energy_perf_policy.8 $RPM_BUILD_ROOT%{_mandir}/man8
49fba13a
ER
323cd -
324%endif
325
326# broken makefile, install manually
327%if 0
328%{__make} install \
329 -C tools/power/x86/turbostat \
330 DESTDIR=$RPM_BUILD_ROOT
331%else
332cd tools/power/x86/turbostat
b1f08c11 333cp -p turbostat.8 $RPM_BUILD_ROOT%{_mandir}/man8
fea1e605 334cd -
b4d3d8ff 335install -p turbostat $RPM_BUILD_ROOT%{_bindir}/turbostat
fea1e605 336%endif
49fba13a 337%endif
fea1e605
ER
338
339%if %{with perf}
340# perf slang
341PWD=${PWD:-$(pwd)}
342# perf slang version
343%{__make} -j1 install install-man \
344 -C tools/perf \
345 O=$PWD/perf-slang \
346 NO_GTK2=1 \
347 CC="%{__cc}" \
fb1ff9fc 348 CFLAGS_OPTIMIZE="%{rpmcflags}" \
6e9d46c8 349 WERROR=0 \
fea1e605
ER
350 %{?with_verbose:V=1} \
351 prefix=%{_prefix} \
352 perfexecdir=%{_datadir}/perf-core \
353 template_dir=%{_datadir}/perf-core/templates \
354 DESTDIR=$RPM_BUILD_ROOT
4ca26053 355%{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_slang}
fea1e605 356
bc35d286 357%if %{with gtk}
fea1e605
ER
358# perf gtk
359%{__make} -j1 install install-man \
360 -C tools/perf \
361 O=$PWD/perf-gtk \
362 CC="%{__cc}" \
fb1ff9fc 363 CFLAGS_OPTIMIZE="%{rpmcflags}" \
6e9d46c8 364 WERROR=0 \
fea1e605
ER
365 %{?with_verbose:V=1} \
366 prefix=%{_prefix} \
367 perfexecdir=%{_datadir}/perf-core \
368 template_dir=%{_datadir}/perf-core/templates \
369 DESTDIR=$RPM_BUILD_ROOT
4ca26053 370%{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_gtk}
bc35d286 371%endif
db5f9ac9
JB
372
373%py_comp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
374%py_ocomp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
a8b28c3a
ER
375
376rm -r $RPM_BUILD_ROOT%{_datadir}/perf-core/tests
49fba13a
ER
377%endif
378
dd28be58 379# gen_init_cpio
60972f76 380install -p usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
dd28be58 381
49fba13a
ER
382%clean
383rm -rf $RPM_BUILD_ROOT
384
4bc5704a
JK
385%post cpupower-libs -p /sbin/ldconfig
386%postun cpupower-libs -p /sbin/ldconfig
49fba13a 387
f57fcd71
ER
388%post cpupower
389%systemd_post cpupower.service
390
391%preun cpupower
392%systemd_preun cpupower.service
393
394%postun cpupower
395%systemd_reload
396
4bc5704a 397%files
49fba13a 398%defattr(644,root,root,755)
701b458f
JB
399%attr(755,root,root) %{_bindir}/gen_init_cpio
400%attr(755,root,root) %{_bindir}/slabinfo
b1f08c11 401%attr(755,root,root) %{_sbindir}/dslm
f111fe43 402%attr(755,root,root) %{_sbindir}/page-types
49fba13a
ER
403%ifarch %{ix86} %{x8664}
404%attr(755,root,root) %{_bindir}/centrino-decode
405%attr(755,root,root) %{_bindir}/powernow-k8-decode
406%endif
49fba13a
ER
407%ifarch %{ix86} %{x8664}
408%attr(755,root,root) %{_bindir}/turbostat
409%attr(755,root,root) %{_bindir}/x86_energy_perf_policy
bd620db3
JB
410%{_mandir}/man8/turbostat.8*
411%{_mandir}/man8/x86_energy_perf_policy.8*
49fba13a
ER
412%endif
413
4bc5704a
JK
414%files cpupower -f cpupower.lang
415%defattr(644,root,root,755)
416%attr(755,root,root) %{_bindir}/cpupower
bd620db3 417%{_mandir}/man1/cpupower*.1*
f57fcd71
ER
418%{systemdunitdir}/cpupower.service
419%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cpupower
4bc5704a
JK
420
421%files cpupower-libs
49fba13a
ER
422%defattr(644,root,root,755)
423%attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
bd620db3 424%attr(755,root,root) %ghost %{_libdir}/libcpupower.so.0
49fba13a 425
4bc5704a 426%files cpupower-libs-devel
49fba13a 427%defattr(644,root,root,755)
bd620db3 428%attr(755,root,root) %{_libdir}/libcpupower.so
49fba13a 429%{_includedir}/cpufreq.h
fea1e605
ER
430
431%if %{with perf}
db5f9ac9 432%files perf-core
fea1e605 433%defattr(644,root,root,755)
fea1e605
ER
434%{_mandir}/man1/perf*.1*
435%dir %{_datadir}/perf-core
436%attr(755,root,root) %{_datadir}/perf-core/perf-archive
437
438%dir %{_datadir}/perf-core/scripts
439
440%dir %{_datadir}/perf-core/scripts/perl
441%dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util
442%dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib
443%dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf
444%dir %{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace
445%{_datadir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/*.pm
446%dir %{_datadir}/perf-core/scripts/perl/bin
447%attr(755,root,root) %{_datadir}/perf-core/scripts/perl/bin/*
448%{_datadir}/perf-core/scripts/perl/*.pl
449
450%dir %{_datadir}/perf-core/scripts/python
451%dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util
452%dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib
453%dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf
454%dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace
db5f9ac9 455%{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py*
fea1e605
ER
456%dir %{_datadir}/perf-core/scripts/python/bin
457%attr(755,root,root) %{_datadir}/perf-core/scripts/python/bin/*
db5f9ac9
JB
458%{_datadir}/perf-core/scripts/python/*.py*
459
bc35d286 460%if %{with gtk}
db5f9ac9
JB
461%files perf-gtk
462%defattr(644,root,root,755)
4ca26053 463%attr(755,root,root) %{_bindir}/perf_gtk
bc35d286 464%endif
db5f9ac9
JB
465
466%files perf-slang
467%defattr(644,root,root,755)
4ca26053 468%attr(755,root,root) %{_bindir}/perf_slang
db5f9ac9
JB
469
470%files -n bash-completion-perf
471%defattr(644,root,root,755)
472/etc/bash_completion.d/perf
fea1e605 473%endif
This page took 0.152222 seconds and 4 git commands to generate.