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