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