]> git.pld-linux.org Git - packages/kernel-tools.git/blame - kernel-tools.spec
- updated to 5.17.1
[packages/kernel-tools.git] / kernel-tools.spec
CommitLineData
bb6b0f50
ER
1# TODO:
2# - redefine: PACKAGE_BUGREPORT=cpufreq@vger.kernel.org
b1f08c11 3# - add -n python-perf?
b1f08c11 4# - add bcond to disable building docs (perf docs)
a5af5310 5# - install of perf links perf binary again
c8c3bb5d
JB
6# - build runqslower (needs vmlinux with BPF section)
7#
49fba13a
ER
8# Conditional build:
9%bcond_without verbose # verbose build (V=1)
0a891de9 10%bcond_without cpupower # cpupower tools
db5f9ac9 11%bcond_without perf # perf tools
ae4c1fd4 12%bcond_without gtk # GTK+ 2.x perf support
5a8bbd03 13%bcond_without libunwind # libunwind perf support
a5af5310 14%bcond_without multilib # multilib perf support
c8c3bb5d 15%bcond_with runqslower # runqslower bpf tool
0a891de9 16%bcond_without usbip # usbip utils
5a8bbd03 17
a5af5310
JB
18%ifnarch %{x8664}
19%undefine with_multilib
20%endif
49fba13a 21
ea11ad52
JB
22%define basever 5.17
23%define postver .1
49fba13a 24Summary: Assortment of tools for the Linux kernel
bd620db3 25Summary(pl.UTF-8): Zestaw narzędzi dla jądra Linuksa
49fba13a
ER
26Name: kernel-tools
27Version: %{basever}%{postver}
ea11ad52 28Release: 1
49fba13a 29License: GPL v2
fea1e605 30Group: Applications/System
57e0ffb5 31Source0: https://www.kernel.org/pub/linux/kernel/v5.x/linux-%{basever}.tar.xz
ea11ad52 32# Source0-md5: 07321a70a48d062cebd0358132f11771
bedc6c43
JR
33Source1: cpupower.service
34Source2: cpupower.config
933f7b4d 35Source3: cpupower@.service
49fba13a 36%if "%{postver}" != ".0"
57e0ffb5 37Patch0: https://www.kernel.org/pub/linux/kernel/v5.x/patch-%{version}.xz
ea11ad52 38# Patch0-md5: 5a015eeaa9a3bf5bea84290f54ccf48d
49fba13a 39%endif
bedc6c43 40Patch1: x32.patch
388d18e6 41Patch2: regex.patch
32b75768 42Patch3: %{name}-perf-update.patch
ba3b9a67
JB
43Patch4: %{name}-perf-gtk2.patch
44URL: https://www.kernel.org/
0a891de9 45BuildRequires: bison
89b3b11f 46BuildRequires: docutils
0a891de9 47BuildRequires: flex
4a7175d2 48BuildRequires: gettext-tools
4490164f 49BuildRequires: linux-libc-headers >= 7:4.12
0a891de9 50BuildRequires: ncurses-devel
97b9d37b 51BuildRequires: ncurses-ext-devel
9596c3d3 52BuildRequires: pciutils-devel
0a891de9 53BuildRequires: pkgconfig
605beaf9
AM
54BuildRequires: python3
55BuildRequires: python3-modules
fcef54d7 56BuildRequires: readline-devel
c5a822e3 57BuildRequires: rpmbuild(macros) >= 1.673
49fba13a
ER
58BuildRequires: tar >= 1:1.22
59BuildRequires: xz
fea1e605
ER
60%if %{with perf}
61BuildRequires: asciidoc
52583efa 62BuildRequires: audit-libs-devel
ba3b9a67 63BuildRequires: babeltrace-devel
ea7d139b 64BuildRequires: binutils-devel >= 4:2.29
a8b28c3a 65BuildRequires: docbook-dtd45-xml
52583efa 66BuildRequires: docbook-style-xsl
ba3b9a67 67BuildRequires: elfutils-devel >= 0.158
a5af5310
JB
68%if %{with multilib}
69BuildRequires: gcc-multilib-32
70BuildRequires: gcc-multilib-x32
71%endif
c8c3bb5d
JB
72# for `btftool btf dump file ... format c` - requires vmlinux with BPF section
73%{?with_runqslower:BuildRequires: kernel-vmlinux >= 5.?}
65792fbb 74BuildRequires: libcap-devel
5a8bbd03 75%{?with_libunwind:BuildRequires: libunwind-devel >= 0.99}
60ccbbd3 76BuildRequires: numactl-devel
ba3b9a67 77BuildRequires: openssl-devel
52583efa 78BuildRequires: perl-devel >= 5.1
52583efa 79BuildRequires: python-devel
fea1e605 80BuildRequires: rpm-pythonprov
a1c57a8e 81BuildRequires: slang-devel
fea1e605 82BuildRequires: xmlto
ba3b9a67
JB
83BuildRequires: xz-devel
84BuildRequires: zlib-devel
85BuildRequires: zstd-devel
86# openscd? (CORESIGHT=1 for %{arm}?)
a8b28c3a
ER
87%if %{with gtk}
88BuildRequires: gtk+2-devel >= 2.0
a8b28c3a 89%endif
fea1e605 90%endif
0a891de9
JB
91%if %{with usbip}
92BuildRequires: autoconf >= 2.59
93BuildRequires: automake >= 1:1.9
94BuildRequires: gcc >= 6:4.0
95BuildRequires: libtool >= 2:2
96BuildRequires: libwrap-devel
97BuildRequires: udev-devel
98%endif
49fba13a
ER
99BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
100
eb373af4
AM
101# otherwise /usr/lib/rpm/bin/debugedit: canonicalization unexpectedly shrank by one character
102%define _enable_debug_packages 0
103
e6e29afa 104%ifarch ppc ppc64
43c60a14 105%define makearch powerpc
e6e29afa
JP
106%else
107%ifarch aarch64
108%define makearch arm64
109%else
110%define makearch %{_target_base_arch}
111%endif
112%endif
113
114%define makeopts ARCH=%{makearch} CC="%{__cc}" %{?with_verbose:V=1}
60972f76 115
49fba13a 116%description
bd620db3
JB
117This package contains the software from tools/ subdirectory from Linux
118kernel source and the supporting documentation.
119
120%description -l pl.UTF-8
121Ten pakiet zawiera oprogramowanie z podkatalogu tools/ ze źródeł jądra
122Linuksa oraz związaną z nim dokumentację.
49fba13a 123
4bc5704a
JK
124%package cpupower
125Summary: cpupower - Shows and sets processor power related values
bd620db3 126Summary(pl.UTF-8): cpupower - wyświetlanie i ustawianie wartości związanych z zużyciem energii przez procesor
4bc5704a 127Group: Applications/System
f57fcd71 128Requires(post,preun,postun): systemd-units >= 38
91fd1f55 129Requires: %{name}-cpupower-libs = %{version}-%{release}
f57fcd71 130Requires: systemd-units >= 0.38
2bd21e06 131Provides: cpupowerutils = 1:009-0.6.p1
2bd21e06
ER
132Obsoletes: cpupowerutils < 1:009-0.6.p1
133Obsoletes: cpuspeed < 1:1.5-16
4bc5704a
JK
134
135%description cpupower
60972f76
ER
136cpupower is a collection of tools to examine and tune power saving
137related features of your processor.
4bc5704a 138
bd620db3
JB
139%description cpupower -l pl.UTF-8
140cpupower to zbiór narzędzi do sprawdzania i ustawiania opcji procesora
141związanych z oszczędzaniem energii.
142
4bc5704a 143%package cpupower-libs
bd620db3
JB
144Summary: cpupower library
145Summary(pl.UTF-8): Biblioteka cpupower
49fba13a
ER
146Group: Libraries
147
4bc5704a 148%description cpupower-libs
bd620db3
JB
149cpupower library.
150
151%description cpupower-libs -l pl.UTF-8
152Biblioteka cpupower.
49fba13a 153
4bc5704a 154%package cpupower-libs-devel
bd620db3
JB
155Summary: Development files for the cpupower library
156Summary(pl.UTF-8): Pliki programistyczne biblioteki cpupower
49fba13a 157Group: Development/Libraries
178c4b31 158Requires: %{name}-cpupower-libs = %{version}-%{release}
49fba13a 159Provides: cpupowerutils-devel = 1:009-0.6.p1
49fba13a 160Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
08be99c5 161Conflicts: cpufrequtils-devel
49fba13a 162
4bc5704a 163%description cpupower-libs-devel
bd620db3
JB
164Development files for the cpupower library.
165
166%description cpupower-libs-devel -l pl.UTF-8
167Pliki programistyczne biblioteki cpupower.
49fba13a 168
388d18e6
JR
169%package -n bash-completion-cpupower
170Summary: Bash completion for cpupower tools
171Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla poleceń cpupower
172Group: Applications/Shells
173Requires: %{name}-cpupower = %{version}-%{release}
174Requires: bash-completion
974a02c5 175BuildArch: noarch
388d18e6
JR
176
177%description -n bash-completion-cpupower
178Bash completion for cpupower tools.
179
180%description -n bash-completion-cpupower -l pl.UTF-8
181Bashowe uzupełnianie parametrów dla poleceń cpupower.
182
0a891de9
JB
183%package hv
184Summary: Hyper-V virtualization tools
185Summary(pl.UTF-8): Narzędzia do wirtualizacji Hyper-V
186Group: Applications/System
187
188%description hv
189Hyper-V virtualization tools.
190
191%description hv -l pl.UTF-8
192Narzędzia do wirtualizacji Hyper-V.
193
ae4c1fd4
JB
194%package perf
195Summary: perf profiler tool
196Summary(pl.UTF-8): Narzędzie profilujące perf
fea1e605 197Group: Applications/System
9efc8fed 198Suggests: binutils
17d20c05
JB
199Obsoletes: kernel-tools-perf-core < 3.16.2
200Obsoletes: kernel-tools-perf-slang < 3.16.2
fea1e605 201
ae4c1fd4 202%description perf
fea1e605
ER
203Perf is a profiler tool for Linux 2.6+ based systems that abstracts
204away CPU hardware differences in Linux performance measurements and
205presents a simple commandline interface. Perf is based on the
206perf_events interface exported by recent versions of the Linux kernel.
207
ae4c1fd4 208This package contains core files, scripts and text interface (TUI).
db5f9ac9 209
ae4c1fd4 210%description perf -l pl.UTF-8
db5f9ac9
JB
211Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
212odseparowujące od różnic sprzętowych między pomiarami wydajności w
213zależności od procesora oraz udostępniające prosty interfejs linii
214poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
215przez nowe wersje jądra Linuksa.
216
ae4c1fd4
JB
217Ten pakiet zawiera podstawowe pliki, skrypty oraz interfejs tekstowy
218(TUI).
db5f9ac9 219
0a3bb9dd 220%package perf-vdso32
dda20c35
JB
221Summary: perf profiler tool - VDSO 32-bit ABI reader
222Summary(pl.UTF-8): Narzędzie profilujące perf - odczyt VDSO dla ABI 32-bitowego
0a3bb9dd
JR
223Group: Applications/System
224Requires: %{name}-perf = %{version}-%{release}
225
226%description perf-vdso32
227Perf is a profiler tool for Linux 2.6+ based systems that abstracts
228away CPU hardware differences in Linux performance measurements and
229presents a simple commandline interface. Perf is based on the
230perf_events interface exported by recent versions of the Linux kernel.
231
232This package contains perf-read-vdso32 tool for reading the 32-bit
233compatibility VDSO in 64-bit mode.
234
dda20c35
JB
235%description perf-vdso32 -l pl.UTF-8
236Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
237odseparowujące od różnic sprzętowych między pomiarami wydajności w
238zależności od procesora oraz udostępniające prosty interfejs linii
239poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
240przez nowe wersje jądra Linuksa.
241
242Ten pakiet zawiera narzędzie perf-read-vdso32 do odczytu VDSO dla
243binariów 32-bitowych w trybie 64-bitowym.
244
0a3bb9dd 245%package perf-vdsox32
dda20c35
JB
246Summary: perf profiler tool - VDSO x32 ABI reader
247Summary(pl.UTF-8): Narzędzie profilujące perf - odczyt VDSO dla ABI x32
0a3bb9dd
JR
248Group: Applications/System
249Requires: %{name}-perf = %{version}-%{release}
250
251%description perf-vdsox32
252Perf is a profiler tool for Linux 2.6+ based systems that abstracts
253away CPU hardware differences in Linux performance measurements and
254presents a simple commandline interface. Perf is based on the
255perf_events interface exported by recent versions of the Linux kernel.
256
257This package contains perf-read-vdso32 tool for reading the x32 mode
25832-bit compatibility VDSO in 64-bit mode.
259
dda20c35
JB
260%description perf-vdsox32 -l pl.UTF-8
261Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
262odseparowujące od różnic sprzętowych między pomiarami wydajności w
263zależności od procesora oraz udostępniające prosty interfejs linii
264poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
265przez nowe wersje jądra Linuksa.
266
267Ten pakiet zawiera narzędzie perf-read-vdso32 do odczytu VDSO dla
268binariów ABI x32 w trybie 64-bitowym.
269
db5f9ac9 270%package perf-gtk
ae4c1fd4
JB
271Summary: perf profiler tool (GTK+ 2 GUI)
272Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs graficzny GTK+ 2)
db5f9ac9 273Group: X11/Applications
dad8cd2d 274Requires: %{name}-perf = %{version}-%{release}
db5f9ac9
JB
275
276%description perf-gtk
277Perf is a profiler tool for Linux 2.6+ based systems that abstracts
278away CPU hardware differences in Linux performance measurements and
279presents a simple commandline interface. Perf is based on the
280perf_events interface exported by recent versions of the Linux kernel.
281
ae4c1fd4 282This package contains GTK+ 2 based GUI.
db5f9ac9
JB
283
284%description perf-gtk -l pl.UTF-8
285Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
286odseparowujące od różnic sprzętowych między pomiarami wydajności w
287zależności od procesora oraz udostępniające prosty interfejs linii
288poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
289przez nowe wersje jądra Linuksa.
290
ae4c1fd4 291Ten pakiet zawiera graficzny interfejs oparty na GTK+ 2.
db5f9ac9 292
db5f9ac9
JB
293%package -n bash-completion-perf
294Summary: Bash completion for perf command
295Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia perf
296Group: Applications/Shells
c5a822e3 297Requires: %{name}-perf = %{version}-%{release}
db5f9ac9 298Requires: bash-completion
974a02c5 299BuildArch: noarch
db5f9ac9
JB
300
301%description -n bash-completion-perf
302Bash completion for perf command.
303
304%description -n bash-completion-perf -l pl.UTF-8
305Bashowe uzupełnianie parametrów dla polecenia perf.
306
c5a822e3
JB
307%package -n bash-completion-kernel-tools
308Summary: Bash completion for kernel-tools commands
309Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla poleceń kernel-tools
310Group: Applications/Shells
311Requires: %{name} = %{version}-%{release}
312Requires: bash-completion >= 2.0
974a02c5 313BuildArch: noarch
c5a822e3
JB
314
315%description -n bash-completion-kernel-tools
316Bash completion for kernel-tools commands (currently bpftool).
317
318%description -n bash-completion-kernel-tools -l pl.UTF-8
319Bashowe uzupełnianie parametrów dla poleceń kernel-tools (obecnie
320bpftool).
321
0a891de9
JB
322%package -n usbip
323Summary: USB device sharing system over IP network
324Summary(pl.UTF-8): System współdzielenia urządzeń USB po sieci IP
325Group: Networking/Utilities
326Requires: usbip-libs = %{version}-%{release}
327# /lib/hwdata/usb.ids (note: only uncompressed file supported)
328Requires: hwdata >= 0.243-2
329
330%description -n usbip
331The USB/IP Project aims to develop a general USB device sharing system
332over IP network. To share USB devices between computers with their
333full functionality, USB/IP encapsulates "USB requests" into IP packets
334and transmits them between computers. Original USB device drivers and
335applications can be also used for remote USB devices without any
336modification of them. A computer can use remote USB devices as if they
337were directly attached; for example, we can:
338 - USB storage devices: fdisk, mkfs, mount/umount, file operations,
339 play a DVD movie and record a DVD-R media.
340 - USB keyboards and USB mice: use with Linux console and X Window
341 System.
342 - USB webcams and USB speakers: view webcam, capture image data and
343 play some music.
344 - USB printers, USB scanners, USB serial converters and USB Ethernet
345 interfaces: ok, use fine.
346
347%description -n usbip -l pl.UTF-8
348Projekt USB/IP ma na celu stworzenie ogólnego systemu współdzielenia
349urządzeń USB po sieci IP. W celu współdzielenia urządzeń USB między
350komputerami z zachowaniem pełnej funkcjonalności, USB/IP obudowuje
351żądania SUB w pakiety IP i przesyła je między komputerami. Oryginalne
352sterowniki urządzeń USB oraz aplikacje mogą być używane bez żadnych
353modyfikacji. Komputer może wykorzystywać zdaln urządzenia USB tak,
354jakby były podłączone bezpośrednio. Przykładowe możliwości:
355 - urządzenia USB do przechowywania danych: można używać programów
356 fdisk, mkfs, mount/umount, operacji na plikach, odtwarzać filmy
357 DVD oraz nagrywać nośniki DVD-R
358 - klawiatury i myszy USB: można ich używać na linuksowej konsoli oraz
359 w systemie X Window
360 - kamery i głośniki USB: można oglądać obraz z kamery, robić zdjęcia
361 i odtwarzać muzykę
362 - drukarki, skanery, konwertery portów szeregowych oraz interfejsy
363 sieciowe USB: można ich normalnie używać
364
365%package -n usbip-libs
366Summary: USB/IP library
367Summary(pl.UTF-8): Biblioteka USB/IP
368Group: Libraries
369
370%description -n usbip-libs
371USB over IP library.
372
373%description -n usbip-libs -l pl.UTF-8
374Biblioteka USB po IP.
375
376%package -n usbip-devel
377Summary: Header files for usbip library
378Summary(pl.UTF-8): Pliki nagłówkowe biblioteki usbip
379Group: Development/Libraries
380Requires: usbip-libs = %{version}-%{release}
381
382%description -n usbip-devel
383This package contains the header files needed to develop programs
384which make use of USB/IP.
385
386%description -n usbip-devel -l pl.UTF-8
387Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów
388wykorzystujących USB/IP.
389
390%package -n usbip-static
391Summary: Static usbip library
392Summary(pl.UTF-8): Statyczna biblioteka usbip
393Group: Development/Libraries
394Requires: usbip-devel = %{version}-%{release}
395
396%description -n usbip-static
397Static usbip library.
398
399%description -n usbip-static -l pl.UTF-8
400Statyczna biblioteka usbip.
401
49fba13a
ER
402%prep
403%setup -qc
404cd linux-%{basever}
405
406%if "%{postver}" != ".0"
407%patch0 -p1
408%endif
409
bedc6c43 410%patch1 -p1
388d18e6 411%patch2 -p1
32b75768 412%patch3 -p1
ba3b9a67 413%patch4 -p1
bedc6c43 414
0a891de9
JB
415%{__sed} -i -e '/^CFLAGS = /s/ -g / $(OPTFLAGS) /' tools/hv/Makefile
416%{__sed} -i -e '/^CFLAGS+=/s/ -O1 / $(OPTFLAGS) /' tools/thermal/tmon/Makefile
319723eb 417%{__sed} -i -e 's#libexec/perf-core#%{_lib}/perf-core#g' tools/perf/Makefile.config
eb373af4 418
e76f6fde
JB
419# don't rebuild on make install
420%{__sed} -i -e '/^\$(LIBBPF): FORCE/ s/FORCE$//' tools/bpf/bpftool/Makefile
421
c8c3bb5d
JB
422%if %{without runqslower}
423%{__sed} -i -e '/^all: / s/ runqslower//' \
424 -e '/^install: / s/ runqslower_install//' \
425 tools/bpf/Makefile
426%endif
427
49fba13a 428%build
ba3b9a67
JB
429Wstringop=""
430Waddressof=""
431%if "%{cc_version}" >= "8"
432Wstringop="-Wno-error=stringop-truncation"
433%endif
434%if "%{cc_version}" >= "9"
435Waddressof="-Wno-error=address-of-packed-member"
436%endif
49fba13a
ER
437cd linux-%{basever}
438
b1f08c11 439# Simple Disk Sleep Monitor
2c8f0d44
JR
440%{__make} -C tools/laptop/dslm \
441 %{makeopts} \
442 EXTRA_CFLAGS="%{rpmcflags}"
b1f08c11 443
0a891de9
JB
444# tools common (used eg. by tools/vm)
445%{__make} -C tools/lib/api \
51feff82 446 %{makeopts} \
ba3b9a67 447 EXTRA_CFLAGS="%{rpmcflags} $Wstringop"
0a891de9
JB
448
449# lsgpio
450CFLAGS="%{rpmcflags}" \
51feff82
JB
451%{__make} -C tools/gpio -j1 \
452 %{makeopts}
0a891de9
JB
453
454# HyperV is Windows based, x86 specific
455%ifarch %{ix86} %{x8664} x32
456%{__make} -C tools/hv \
4124d533 457 %{makeopts} \
0a891de9
JB
458 OPTFLAGS="%{rpmcflags}"
459%endif
460
461CFLAGS="%{rpmcflags}" \
d4e17d6f 462%{__make} -C tools/iio -j1 \
4124d533 463 %{makeopts}
0a891de9
JB
464
465%{__make} -C tools/laptop/freefall \
4124d533 466 %{makeopts} \
0a891de9
JB
467 CFLAGS="%{rpmcflags}"
468
ffa90917
JB
469# make bpftool first, top-level bpf CFLAGS cause includes conflict
470CFLAGS="%{rpmcflags}" \
471%{__make} -C tools/bpf/bpftool \
4124d533 472 %{makeopts}
ffa90917 473
0a891de9 474CFLAGS="%{rpmcflags}" \
c5a822e3 475%{__make} -C tools/bpf \
4124d533 476 %{makeopts} \
e76f6fde 477 EXTRA_CFLAGS="%{rpmcflags}" \
4124d533 478 %{?with_runqslower:VMLINUX_BTF=$(rpm -ql kernel-vmlinux | head -n 1)}
0a891de9
JB
479
480# perf
481%if %{with perf}
388d18e6 482%{__make} -j1 -C tools/perf all man \
0a891de9
JB
483%ifarch %{x8664}
484 IS_X86_64=1 \
485 %{!?with_multilib:NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1} \
486%endif
a7adb0d5 487 %{?with_gtk:GTK2=1} \
0a891de9
JB
488 %{!?with_libunwind:NO_LIBUNWIND=1} \
489 %{makeopts} \
21836c3c 490 EXTRA_CFLAGS="%{rpmcflags}" \
a7adb0d5 491 VF=1 \
0a891de9
JB
492 WERROR=0 \
493 prefix=%{_prefix} \
319723eb 494 perfexecdir=%{_libdir}/perf-core \
0a891de9
JB
495 lib=%{_lib} \
496 template_dir=%{_datadir}/perf-core/templates
497%endif
498
49fba13a 499# cpupower
0a891de9 500%if %{with cpupower}
49fba13a 501%{__make} -C tools/power/cpupower \
60972f76 502 %{makeopts} \
fb1ff9fc
JB
503 CPUFREQ_BENCH=false \
504 OPTIMIZATION="%{rpmcflags}" \
505 STRIPCMD=true
49fba13a 506
bedc6c43 507%ifarch %{ix86} x32
49fba13a 508%{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
4124d533 509 %{makeopts} \
fb1ff9fc 510 CFLAGS="%{rpmcflags}"
49fba13a
ER
511%endif
512
bedc6c43 513%ifarch %{x8664} x32
49fba13a 514%{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
4124d533 515 %{makeopts} \
fb1ff9fc 516 CFLAGS="%{rpmcflags}"
49fba13a 517%endif
0a891de9 518%endif
49fba13a 519
bedc6c43 520%ifarch %{ix86} %{x8664} x32
ea7d139b 521CFLAGS="%{rpmcflags}" \
49fba13a 522%{__make} -C tools/power/x86/x86_energy_perf_policy \
4124d533 523 %{makeopts}
ea7d139b 524
4b352448 525CFLAGS="%{rpmcflags}" \
49fba13a 526%{__make} -C tools/power/x86/turbostat \
4124d533 527 %{makeopts}
49fba13a
ER
528%endif
529
0a891de9 530%{__make} -C tools/thermal/tmon \
4124d533 531 %{makeopts} \
0a891de9
JB
532 OPTFLAGS="%{rpmcflags}"
533
534# usbip-utils
535%if %{with usbip}
536cd tools/usb/usbip
537%{__libtoolize}
538%{__aclocal}
539%{__autoconf}
540%{__autoheader}
541%{__automake}
542%configure \
ba3b9a67 543 CFLAGS="%{rpmcflags} $Wstringop $Waddressof" \
0a891de9
JB
544 --disable-silent-rules \
545 --with-usbids-dir=/lib/hwdata
546%{__make}
547cd ../../..
548%endif
dbaf19f8 549
f111fe43
JK
550# page-types, slabinfo
551%{__make} -C tools/vm page-types slabinfo \
4124d533 552 %{makeopts}
f111fe43 553 CFLAGS="%{rpmcflags} -Wall -Wextra -I../lib"
701b458f 554
dd28be58
JK
555# gen_init_cpio
556%{__make} -C usr gen_init_cpio \
60972f76 557 %{makeopts} \
fb1ff9fc 558 CFLAGS="%{rpmcflags}"
dd28be58 559
49fba13a
ER
560%install
561rm -rf $RPM_BUILD_ROOT
b1f08c11 562
49fba13a
ER
563cd linux-%{basever}
564
0a891de9 565%if %{with cpupower}
bd620db3 566%{__make} -C tools/power/cpupower install \
49fba13a
ER
567 DESTDIR=$RPM_BUILD_ROOT \
568 libdir=%{_libdir} \
569 mandir=%{_mandir} \
570 CPUFREQ_BENCH=false
571
572%find_lang cpupower
ba3b9a67 573%{__mv} cpupower.lang ..
49fba13a 574
f57fcd71
ER
575install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{systemdunitdir}}
576cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower.service
577cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cpupower
933f7b4d 578cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower@.service
f57fcd71 579
bedc6c43 580%ifarch %{ix86} x32
701b458f 581install -p tools/power/cpupower/debug/i386/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
49fba13a 582%endif
bedc6c43 583%ifarch %{x8664} x32
701b458f 584install -p tools/power/cpupower/debug/x86_64/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
49fba13a 585%endif
49fba13a 586%endif
fea1e605
ER
587
588%if %{with perf}
65792fbb 589%{__make} -C tools/perf install \
4dfb9dde
JR
590%ifarch %{x8664}
591 IS_X86_64=1 \
a5af5310 592 %{!?with_multilib:NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1} \
4dfb9dde 593%endif
a7adb0d5 594 %{?with_gtk:GTK2=1} \
5a8bbd03 595 %{!?with_libunwind:NO_LIBUNWIND=1} \
4124d533 596 %{makeopts} \
21836c3c 597 EXTRA_CFLAGS="%{rpmcflags}" \
6e9d46c8 598 WERROR=0 \
fea1e605 599 prefix=%{_prefix} \
319723eb 600 perfexecdir=%{_libdir}/perf-core \
fea1e605 601 template_dir=%{_datadir}/perf-core/templates \
388d18e6 602 bash_compdir=%{bash_compdir} \
4f4642fc 603 lib=%{_lib} \
fea1e605 604 DESTDIR=$RPM_BUILD_ROOT
db5f9ac9 605
319723eb
JB
606%py_comp $RPM_BUILD_ROOT%{_libdir}/perf-core/scripts/python
607%py_ocomp $RPM_BUILD_ROOT%{_libdir}/perf-core/scripts/python
a8b28c3a 608
319723eb 609%{__rm} -r $RPM_BUILD_ROOT%{_libdir}/perf-core/tests
49fba13a
ER
610%endif
611
0a891de9
JB
612%if %{with usbip}
613%{__make} -C tools/usb/usbip install \
614 DESTDIR=$RPM_BUILD_ROOT
615
616%{__rm} $RPM_BUILD_ROOT%{_libdir}/libusbip.la
617%endif
618
619install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man8}
620
2c8f0d44 621install -p tools/laptop/dslm/dslm $RPM_BUILD_ROOT%{_sbindir}
0a891de9
JB
622
623install -p tools/gpio/lsgpio $RPM_BUILD_ROOT%{_bindir}
624
625%ifarch %{ix86} %{x8664} x32
626install -p tools/hv/hv_{fcopy,kvp,vss}_daemon $RPM_BUILD_ROOT%{_sbindir}
627# TODO: PLD-specific hv_get_dhcp_info,hv_get_dns_info,hv_set_ifconfig
628%{__sed} -e '1s,/usr/bin/env python,%{__python},' tools/hv/lsvmbus >$RPM_BUILD_ROOT%{_bindir}/lsvmbus
629chmod 755 $RPM_BUILD_ROOT%{_bindir}/lsvmbus
630%endif
631
51feff82 632install -p tools/iio/{iio_event_monitor,iio_generic_buffer,lsiio} $RPM_BUILD_ROOT%{_bindir}
0a891de9
JB
633
634install -p tools/laptop/freefall/freefall $RPM_BUILD_ROOT%{_sbindir}
635
c5a822e3
JB
636%{__make} -C tools/bpf install \
637 prefix=$RPM_BUILD_ROOT%{_prefix} \
e76f6fde
JB
638 bash_compdir=$RPM_BUILD_ROOT%{bash_compdir} \
639 %{?with_verbose:V=1}
c5a822e3 640%{__make} -C tools/bpf/bpftool doc-install \
e76f6fde
JB
641 prefix=$RPM_BUILD_ROOT%{_prefix} \
642 mandir=$RPM_BUILD_ROOT%{_mandir} \
643 %{?with_verbose:V=1}
0a891de9
JB
644
645install -p tools/thermal/tmon/tmon $RPM_BUILD_ROOT%{_bindir}
646cp -p tools/thermal/tmon/tmon.8 $RPM_BUILD_ROOT%{_mandir}/man8
647
648install -p tools/vm/slabinfo $RPM_BUILD_ROOT%{_bindir}
649install -p tools/vm/page-types $RPM_BUILD_ROOT%{_sbindir}
650
651%ifarch %{ix86} %{x8664} x32
652install -d $RPM_BUILD_ROOT%{_mandir}/man8
653%{__make} -C tools/power/x86/x86_energy_perf_policy install \
654 DESTDIR=$RPM_BUILD_ROOT
655
656%{__make} -C tools/power/x86/turbostat install \
657 DESTDIR=$RPM_BUILD_ROOT
658%endif
659
dd28be58 660# gen_init_cpio
60972f76 661install -p usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
dd28be58 662
49fba13a
ER
663%clean
664rm -rf $RPM_BUILD_ROOT
665
4bc5704a
JK
666%post cpupower-libs -p /sbin/ldconfig
667%postun cpupower-libs -p /sbin/ldconfig
49fba13a 668
f57fcd71
ER
669%post cpupower
670%systemd_post cpupower.service
671
672%preun cpupower
673%systemd_preun cpupower.service
674
675%postun cpupower
676%systemd_reload
677
0a891de9
JB
678%post -n usbip-libs -p /sbin/ldconfig
679%postun -n usbip-libs -p /sbin/ldconfig
680
4bc5704a 681%files
49fba13a 682%defattr(644,root,root,755)
0a891de9
JB
683%attr(755,root,root) %{_bindir}/bpf_asm
684%attr(755,root,root) %{_bindir}/bpf_dbg
685%attr(755,root,root) %{_bindir}/bpf_jit_disasm
701b458f 686%attr(755,root,root) %{_bindir}/gen_init_cpio
0a891de9
JB
687%attr(755,root,root) %{_bindir}/iio_event_monitor
688%attr(755,root,root) %{_bindir}/iio_generic_buffer
0a891de9
JB
689%attr(755,root,root) %{_bindir}/lsgpio
690%attr(755,root,root) %{_bindir}/lsiio
701b458f 691%attr(755,root,root) %{_bindir}/slabinfo
0a891de9 692%attr(755,root,root) %{_bindir}/tmon
c5a822e3 693%attr(755,root,root) %{_sbindir}/bpftool
b1f08c11 694%attr(755,root,root) %{_sbindir}/dslm
0a891de9 695%attr(755,root,root) %{_sbindir}/freefall
f111fe43 696%attr(755,root,root) %{_sbindir}/page-types
c5a822e3 697%{_mandir}/man8/bpftool*.8*
0a891de9 698%{_mandir}/man8/tmon.8*
bedc6c43 699%ifarch %{ix86} %{x8664} x32
49fba13a
ER
700%attr(755,root,root) %{_bindir}/centrino-decode
701%attr(755,root,root) %{_bindir}/powernow-k8-decode
702%endif
bedc6c43 703%ifarch %{ix86} %{x8664} x32
49fba13a
ER
704%attr(755,root,root) %{_bindir}/turbostat
705%attr(755,root,root) %{_bindir}/x86_energy_perf_policy
bd620db3
JB
706%{_mandir}/man8/turbostat.8*
707%{_mandir}/man8/x86_energy_perf_policy.8*
49fba13a
ER
708%endif
709
4bc5704a
JK
710%files cpupower -f cpupower.lang
711%defattr(644,root,root,755)
712%attr(755,root,root) %{_bindir}/cpupower
bd620db3 713%{_mandir}/man1/cpupower*.1*
f57fcd71 714%{systemdunitdir}/cpupower.service
ea11ad52 715%{systemdunitdir}/cpupower@.service
f57fcd71 716%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cpupower
4bc5704a
JK
717
718%files cpupower-libs
49fba13a
ER
719%defattr(644,root,root,755)
720%attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
bd620db3 721%attr(755,root,root) %ghost %{_libdir}/libcpupower.so.0
49fba13a 722
4bc5704a 723%files cpupower-libs-devel
49fba13a 724%defattr(644,root,root,755)
bd620db3 725%attr(755,root,root) %{_libdir}/libcpupower.so
49fba13a 726%{_includedir}/cpufreq.h
dbaf19f8 727%{_includedir}/cpuidle.h
fea1e605 728
388d18e6
JR
729%files -n bash-completion-cpupower
730%defattr(644,root,root,755)
731%{bash_compdir}/cpupower
732
0a891de9
JB
733%ifarch %{ix86} %{x8664} x32
734%files hv
735%defattr(644,root,root,755)
736# TODO: PLDify these scripts and move to bindir
737%doc linux-%{basever}/tools/hv/hv_{get_dhcp_info,get_dns_info,set_ifconfig}.sh
738%attr(755,root,root) %{_bindir}/lsvmbus
739%attr(755,root,root) %{_sbindir}/hv_fcopy_daemon
740%attr(755,root,root) %{_sbindir}/hv_kvp_daemon
741%attr(755,root,root) %{_sbindir}/hv_vss_daemon
742%endif
743
fea1e605 744%if %{with perf}
ae4c1fd4 745%files perf
fea1e605 746%defattr(644,root,root,755)
35be6466 747%attr(755,root,root) %{_bindir}/perf
ae4c1fd4 748%attr(755,root,root) %{_bindir}/trace
fea1e605 749%{_mandir}/man1/perf*.1*
c5a822e3 750%{_docdir}/perf-tip
fea1e605 751%dir %{_datadir}/perf-core
c5a822e3 752%{_datadir}/perf-core/strace
319723eb
JB
753%dir %{_libdir}/perf-core
754%attr(755,root,root) %{_libdir}/perf-core/perf-archive
755%attr(755,root,root) %{_libdir}/perf-core/perf-iostat
756%attr(755,root,root) %{_libdir}/perf-core/perf-with-kcore
757%dir %{_libdir}/perf-core/dlfilters
758%attr(755,root,root) %{_libdir}/perf-core/dlfilters/dlfilter-show-cycles.so
759%attr(755,root,root) %{_libdir}/perf-core/dlfilters/dlfilter-test-api-v0.so
760
761%dir %{_libdir}/perf-core/scripts
762
763%dir %{_libdir}/perf-core/scripts/perl
764%dir %{_libdir}/perf-core/scripts/perl/Perf-Trace-Util
765%dir %{_libdir}/perf-core/scripts/perl/Perf-Trace-Util/lib
766%dir %{_libdir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf
767%dir %{_libdir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace
768%{_libdir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/*.pm
769%dir %{_libdir}/perf-core/scripts/perl/bin
770%attr(755,root,root) %{_libdir}/perf-core/scripts/perl/bin/*
771%{_libdir}/perf-core/scripts/perl/*.pl
772
773%dir %{_libdir}/perf-core/scripts/python
774%dir %{_libdir}/perf-core/scripts/python/Perf-Trace-Util
775%dir %{_libdir}/perf-core/scripts/python/Perf-Trace-Util/lib
776%dir %{_libdir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf
777%dir %{_libdir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace
778%{_libdir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py*
779%dir %{_libdir}/perf-core/scripts/python/bin
780%attr(755,root,root) %{_libdir}/perf-core/scripts/python/bin/*
781%{_libdir}/perf-core/scripts/python/*.py*
db5f9ac9 782
eb373af4
AM
783%dir %{_libdir}/traceevent
784%dir %{_libdir}/traceevent/plugins
785%attr(755,root,root) %{_libdir}/traceevent/plugins/plugin_*.so
786
51522bd6
JB
787%dir %{_prefix}/lib/perf
788%{_prefix}/lib/perf/examples
789%{_prefix}/lib/perf/include
790
178570b8
JB
791%{_includedir}/perf
792
a5af5310 793%if %{with multilib}
0a3bb9dd
JR
794%files perf-vdso32
795%defattr(644,root,root,755)
796%attr(755,root,root) %{_bindir}/perf-read-vdso32
797
798%files perf-vdsox32
799%defattr(644,root,root,755)
800%attr(755,root,root) %{_bindir}/perf-read-vdsox32
801%endif
802
bc35d286 803%if %{with gtk}
db5f9ac9
JB
804%files perf-gtk
805%defattr(644,root,root,755)
ae4c1fd4 806%attr(755,root,root) %{_libdir}/libperf-gtk.so
bc35d286 807%endif
db5f9ac9 808
db5f9ac9
JB
809%files -n bash-completion-perf
810%defattr(644,root,root,755)
811/etc/bash_completion.d/perf
fea1e605 812%endif
0a891de9 813
c5a822e3
JB
814%files -n bash-completion-kernel-tools
815%defattr(644,root,root,755)
816%{bash_compdir}/bpftool
817
0a891de9
JB
818%if %{with usbip}
819%files -n usbip
820%defattr(644,root,root,755)
821%doc linux-%{basever}/tools/usb/usbip/{AUTHORS,README}
822%attr(755,root,root) %{_sbindir}/usbip
823%attr(755,root,root) %{_sbindir}/usbipd
824%{_mandir}/man8/usbip.8*
825%{_mandir}/man8/usbipd.8*
826
827%files -n usbip-libs
828%defattr(644,root,root,755)
829%attr(755,root,root) %{_libdir}/libusbip.so.*.*.*
830%attr(755,root,root) %ghost %{_libdir}/libusbip.so.0
831
832%files -n usbip-devel
833%defattr(644,root,root,755)
834%attr(755,root,root) %{_libdir}/libusbip.so
835%{_includedir}/usbip
836
837%files -n usbip-static
838%defattr(644,root,root,755)
839%{_libdir}/libusbip.a
840%endif
This page took 0.213747 seconds and 4 git commands to generate.