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