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