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