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