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