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