]> git.pld-linux.org Git - packages/kernel-tools.git/blob - kernel-tools.spec
- updated to 6.8[.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.8
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:  72d623b959a11850b57406f0b9fe3946
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:   418553a71754fb26a0edbc264890afa5
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:  libtraceevent-devel
50 BuildRequires:  linux-libc-headers >= 7:4.12
51 BuildRequires:  ncurses-devel
52 BuildRequires:  ncurses-ext-devel
53 BuildRequires:  pciutils-devel
54 BuildRequires:  pkgconfig
55 BuildRequires:  python3
56 BuildRequires:  python3-modules
57 BuildRequires:  readline-devel
58 BuildRequires:  rpm-build >= 4.6
59 BuildRequires:  rpmbuild(macros) >= 1.673
60 BuildRequires:  tar >= 1:1.22
61 BuildRequires:  xz
62 %if %{with perf}
63 BuildRequires:  asciidoc
64 BuildRequires:  audit-libs-devel
65 BuildRequires:  babeltrace-devel
66 BuildRequires:  binutils-devel >= 4:2.29
67 BuildRequires:  docbook-dtd45-xml
68 BuildRequires:  docbook-style-xsl
69 BuildRequires:  elfutils-devel >= 0.158
70 %if %{with multilib}
71 BuildRequires:  gcc-multilib-32
72 BuildRequires:  gcc-multilib-x32
73 %endif
74 # for `btftool btf dump file ... format c` - requires vmlinux with BPF section
75 %{?with_runqslower:BuildRequires:       kernel-vmlinux >= 5.?}
76 BuildRequires:  libcap-devel
77 %{?with_libunwind:BuildRequires:        libunwind-devel >= 0.99}
78 BuildRequires:  numactl-devel
79 BuildRequires:  openssl-devel
80 BuildRequires:  perl-devel >= 5.1
81 BuildRequires:  python3-devel
82 BuildRequires:  python3-setuptools
83 BuildRequires:  rpm-pythonprov
84 BuildRequires:  slang-devel
85 BuildRequires:  xmlto
86 BuildRequires:  xz-devel
87 BuildRequires:  zlib-devel
88 BuildRequires:  zstd-devel
89 # openscd? (CORESIGHT=1 for %{arm}?)
90 %if %{with gtk}
91 BuildRequires:  gtk+2-devel >= 2.0
92 %endif
93 %endif
94 %if %{with usbip}
95 BuildRequires:  autoconf >= 2.59
96 BuildRequires:  automake >= 1:1.9
97 BuildRequires:  gcc >= 6:4.0
98 BuildRequires:  libtool >= 2:2
99 BuildRequires:  libwrap-devel
100 BuildRequires:  udev-devel
101 %endif
102 # /usr/bin/turbostat
103 Conflicts:      pmtools < 20110323-2
104 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
105
106 # otherwise /usr/lib/rpm/bin/debugedit: canonicalization unexpectedly shrank by one character
107 %define         _enable_debug_packages  0
108
109 %ifarch ppc ppc64
110 %define         makearch        powerpc
111 %else
112 %ifarch aarch64
113 %define         makearch        arm64
114 %else
115 %define         makearch        %{_target_base_arch}
116 %endif
117 %endif
118
119 %define         makeopts        ARCH=%{makearch} CC="%{__cc}" %{?with_verbose:V=1}
120
121 %description
122 This package contains the software from tools/ subdirectory from Linux
123 kernel source and the supporting documentation.
124
125 %description -l pl.UTF-8
126 Ten pakiet zawiera oprogramowanie z podkatalogu tools/ ze źródeł jądra
127 Linuksa oraz związaną z nim dokumentację.
128
129 %package cpupower
130 Summary:        cpupower - Shows and sets processor power related values
131 Summary(pl.UTF-8):      cpupower - wyświetlanie i ustawianie wartości związanych z zużyciem energii przez procesor
132 Group:          Applications/System
133 Requires(post,preun,postun):    systemd-units >= 38
134 Requires:       %{name}-cpupower-libs = %{version}-%{release}
135 Requires:       systemd-units >= 0.38
136 Provides:       cpupowerutils = 1:009-0.6.p1
137 Obsoletes:      cpupowerutils < 1:009-0.6.p1
138 Obsoletes:      cpuspeed < 1:1.5-16
139
140 %description cpupower
141 cpupower is a collection of tools to examine and tune power saving
142 related features of your processor.
143
144 %description cpupower -l pl.UTF-8
145 cpupower to zbiór narzędzi do sprawdzania i ustawiania opcji procesora
146 związanych z oszczędzaniem energii.
147
148 %package cpupower-libs
149 Summary:        cpupower library
150 Summary(pl.UTF-8):      Biblioteka cpupower
151 Group:          Libraries
152
153 %description cpupower-libs
154 cpupower library.
155
156 %description cpupower-libs -l pl.UTF-8
157 Biblioteka cpupower.
158
159 %package cpupower-libs-devel
160 Summary:        Development files for the cpupower library
161 Summary(pl.UTF-8):      Pliki programistyczne biblioteki cpupower
162 Group:          Development/Libraries
163 Requires:       %{name}-cpupower-libs = %{version}-%{release}
164 Provides:       cpupowerutils-devel = 1:009-0.6.p1
165 Obsoletes:      cpupowerutils-devel < 1:009-0.6.p1
166 Conflicts:      cpufrequtils-devel
167
168 %description cpupower-libs-devel
169 Development files for the cpupower library.
170
171 %description cpupower-libs-devel -l pl.UTF-8
172 Pliki programistyczne biblioteki cpupower.
173
174 %package -n bash-completion-cpupower
175 Summary:        Bash completion for cpupower tools
176 Summary(pl.UTF-8):      Bashowe uzupełnianie parametrów dla poleceń cpupower
177 Group:          Applications/Shells
178 Requires:       %{name}-cpupower = %{version}-%{release}
179 Requires:       bash-completion
180 BuildArch:      noarch
181
182 %description -n bash-completion-cpupower
183 Bash completion for cpupower tools.
184
185 %description -n bash-completion-cpupower -l pl.UTF-8
186 Bashowe uzupełnianie parametrów dla poleceń cpupower.
187
188 %package hv
189 Summary:        Hyper-V virtualization tools
190 Summary(pl.UTF-8):      Narzędzia do wirtualizacji Hyper-V
191 Group:          Applications/System
192
193 %description hv
194 Hyper-V virtualization tools.
195
196 %description hv -l pl.UTF-8
197 Narzędzia do wirtualizacji Hyper-V.
198
199 %package perf
200 Summary:        perf profiler tool
201 Summary(pl.UTF-8):      Narzędzie profilujące perf
202 Group:          Applications/System
203 Suggests:       binutils
204 Obsoletes:      kernel-tools-perf-core < 3.16.2
205 Obsoletes:      kernel-tools-perf-slang < 3.16.2
206
207 %description perf
208 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
209 away CPU hardware differences in Linux performance measurements and
210 presents a simple commandline interface. Perf is based on the
211 perf_events interface exported by recent versions of the Linux kernel.
212
213 This package contains core files, scripts and text interface (TUI).
214
215 %description perf -l pl.UTF-8
216 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
217 odseparowujące od różnic sprzętowych między pomiarami wydajności w
218 zależności od procesora oraz udostępniające prosty interfejs linii
219 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
220 przez nowe wersje jądra Linuksa.
221
222 Ten pakiet zawiera podstawowe pliki, skrypty oraz interfejs tekstowy
223 (TUI).
224
225 %package perf-vdso32
226 Summary:        perf profiler tool - VDSO 32-bit ABI reader
227 Summary(pl.UTF-8):      Narzędzie profilujące perf - odczyt VDSO dla ABI 32-bitowego
228 Group:          Applications/System
229 Requires:       %{name}-perf = %{version}-%{release}
230
231 %description perf-vdso32
232 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
233 away CPU hardware differences in Linux performance measurements and
234 presents a simple commandline interface. Perf is based on the
235 perf_events interface exported by recent versions of the Linux kernel.
236
237 This package contains perf-read-vdso32 tool for reading the 32-bit
238 compatibility VDSO in 64-bit mode.
239
240 %description perf-vdso32 -l pl.UTF-8
241 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
242 odseparowujące od różnic sprzętowych między pomiarami wydajności w
243 zależności od procesora oraz udostępniające prosty interfejs linii
244 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
245 przez nowe wersje jądra Linuksa.
246
247 Ten pakiet zawiera narzędzie perf-read-vdso32 do odczytu VDSO dla
248 binariów 32-bitowych w trybie 64-bitowym.
249
250 %package perf-vdsox32
251 Summary:        perf profiler tool - VDSO x32 ABI reader
252 Summary(pl.UTF-8):      Narzędzie profilujące perf - odczyt VDSO dla ABI x32
253 Group:          Applications/System
254 Requires:       %{name}-perf = %{version}-%{release}
255
256 %description perf-vdsox32
257 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
258 away CPU hardware differences in Linux performance measurements and
259 presents a simple commandline interface. Perf is based on the
260 perf_events interface exported by recent versions of the Linux kernel.
261
262 This package contains perf-read-vdso32 tool for reading the x32 mode
263 32-bit compatibility VDSO in 64-bit mode.
264
265 %description perf-vdsox32 -l pl.UTF-8
266 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
267 odseparowujące od różnic sprzętowych między pomiarami wydajności w
268 zależności od procesora oraz udostępniające prosty interfejs linii
269 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
270 przez nowe wersje jądra Linuksa.
271
272 Ten pakiet zawiera narzędzie perf-read-vdso32 do odczytu VDSO dla
273 binariów ABI x32 w trybie 64-bitowym.
274
275 %package perf-gtk
276 Summary:        perf profiler tool (GTK+ 2 GUI)
277 Summary(pl.UTF-8):      Narzędzie profilujące perf (interfejs graficzny GTK+ 2)
278 Group:          X11/Applications
279 Requires:       %{name}-perf = %{version}-%{release}
280
281 %description perf-gtk
282 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
283 away CPU hardware differences in Linux performance measurements and
284 presents a simple commandline interface. Perf is based on the
285 perf_events interface exported by recent versions of the Linux kernel.
286
287 This package contains GTK+ 2 based GUI.
288
289 %description perf-gtk -l pl.UTF-8
290 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
291 odseparowujące od różnic sprzętowych między pomiarami wydajności w
292 zależności od procesora oraz udostępniające prosty interfejs linii
293 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
294 przez nowe wersje jądra Linuksa.
295
296 Ten pakiet zawiera graficzny interfejs oparty na GTK+ 2.
297
298 %package -n bash-completion-perf
299 Summary:        Bash completion for perf command
300 Summary(pl.UTF-8):      Bashowe uzupełnianie parametrów dla polecenia perf
301 Group:          Applications/Shells
302 Requires:       %{name}-perf = %{version}-%{release}
303 Requires:       bash-completion
304 BuildArch:      noarch
305
306 %description -n bash-completion-perf
307 Bash completion for perf command.
308
309 %description -n bash-completion-perf -l pl.UTF-8
310 Bashowe uzupełnianie parametrów dla polecenia perf.
311
312 %package -n bash-completion-kernel-tools
313 Summary:        Bash completion for kernel-tools commands
314 Summary(pl.UTF-8):      Bashowe uzupełnianie parametrów dla poleceń kernel-tools
315 Group:          Applications/Shells
316 Requires:       %{name} = %{version}-%{release}
317 Requires:       bash-completion >= 1:2.0
318 BuildArch:      noarch
319
320 %description -n bash-completion-kernel-tools
321 Bash completion for kernel-tools commands (currently bpftool).
322
323 %description -n bash-completion-kernel-tools -l pl.UTF-8
324 Bashowe uzupełnianie parametrów dla poleceń kernel-tools (obecnie
325 bpftool).
326
327 %package -n usbip
328 Summary:        USB device sharing system over IP network
329 Summary(pl.UTF-8):      System współdzielenia urządzeń USB po sieci IP
330 Group:          Networking/Utilities
331 Requires:       usbip-libs = %{version}-%{release}
332 # /lib/hwdata/usb.ids (note: only uncompressed file supported)
333 Requires:       hwdata >= 0.243-2
334
335 %description -n usbip
336 The USB/IP Project aims to develop a general USB device sharing system
337 over IP network. To share USB devices between computers with their
338 full functionality, USB/IP encapsulates "USB requests" into IP packets
339 and transmits them between computers. Original USB device drivers and
340 applications can be also used for remote USB devices without any
341 modification of them. A computer can use remote USB devices as if they
342 were directly attached; for example, we can:
343  - USB storage devices: fdisk, mkfs, mount/umount, file operations,
344    play a DVD movie and record a DVD-R media.
345  - USB keyboards and USB mice: use with Linux console and X Window
346    System.
347  - USB webcams and USB speakers: view webcam, capture image data and
348    play some music.
349  - USB printers, USB scanners, USB serial converters and USB Ethernet
350    interfaces: ok, use fine.
351
352 %description -n usbip -l pl.UTF-8
353 Projekt USB/IP ma na celu stworzenie ogólnego systemu współdzielenia
354 urządzeń USB po sieci IP. W celu współdzielenia urządzeń USB między
355 komputerami z zachowaniem pełnej funkcjonalności, USB/IP obudowuje
356 żądania SUB w pakiety IP i przesyła je między komputerami. Oryginalne
357 sterowniki urządzeń USB oraz aplikacje mogą być używane bez żadnych
358 modyfikacji. Komputer może wykorzystywać zdaln urządzenia USB tak,
359 jakby były podłączone bezpośrednio. Przykładowe możliwości:
360  - urządzenia USB do przechowywania danych: można używać programów
361    fdisk, mkfs, mount/umount, operacji na plikach, odtwarzać filmy
362    DVD oraz nagrywać nośniki DVD-R
363  - klawiatury i myszy USB: można ich używać na linuksowej konsoli oraz
364    w systemie X Window
365  - kamery i głośniki USB: można oglądać obraz z kamery, robić zdjęcia
366    i odtwarzać muzykę
367  - drukarki, skanery, konwertery portów szeregowych oraz interfejsy
368    sieciowe USB: można ich normalnie używać
369
370 %package -n usbip-libs
371 Summary:        USB/IP library
372 Summary(pl.UTF-8):      Biblioteka USB/IP
373 Group:          Libraries
374
375 %description -n usbip-libs
376 USB over IP library.
377
378 %description -n usbip-libs -l pl.UTF-8
379 Biblioteka USB po IP.
380
381 %package -n usbip-devel
382 Summary:        Header files for usbip library
383 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki usbip
384 Group:          Development/Libraries
385 Requires:       usbip-libs = %{version}-%{release}
386
387 %description -n usbip-devel
388 This package contains the header files needed to develop programs
389 which make use of USB/IP.
390
391 %description -n usbip-devel -l pl.UTF-8
392 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów
393 wykorzystujących USB/IP.
394
395 %package -n usbip-static
396 Summary:        Static usbip library
397 Summary(pl.UTF-8):      Statyczna biblioteka usbip
398 Group:          Development/Libraries
399 Requires:       usbip-devel = %{version}-%{release}
400
401 %description -n usbip-static
402 Static usbip library.
403
404 %description -n usbip-static -l pl.UTF-8
405 Statyczna biblioteka usbip.
406
407 %prep
408 %setup -qc
409 cd linux-%{basever}
410
411 %if "%{postver}" != ".0"
412 %patch0 -p1
413 %endif
414
415 %patch1 -p1
416 %patch2 -p1
417 %patch3 -p1
418 %patch4 -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#%{_lib}/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/mm)
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=%{_libdir}/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/mm 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 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower@.service
584
585 %ifarch %{ix86} x32
586 install -p tools/power/cpupower/debug/i386/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
587 %endif
588 %ifarch %{x8664} x32
589 install -p tools/power/cpupower/debug/x86_64/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
590 %endif
591 %endif
592
593 %if %{with perf}
594 %{__make} -C tools/perf install \
595 %ifarch %{x8664}
596         IS_X86_64=1 \
597         %{!?with_multilib:NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1} \
598 %endif
599         %{?with_gtk:GTK2=1} \
600         %{!?with_libunwind:NO_LIBUNWIND=1} \
601         %{makeopts} \
602         EXTRA_CFLAGS="%{rpmcflags}" \
603         WERROR=0 \
604         prefix=%{_prefix} \
605         perfexecdir=%{_libdir}/perf-core \
606         template_dir=%{_datadir}/perf-core/templates \
607         bash_compdir=%{bash_compdir} \
608         lib=%{_lib} \
609         DESTDIR=$RPM_BUILD_ROOT
610
611 %py3_comp $RPM_BUILD_ROOT%{_libdir}/perf-core/scripts/python
612 %py3_ocomp $RPM_BUILD_ROOT%{_libdir}/perf-core/scripts/python
613
614 %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/perf-core/tests
615 %endif
616
617 %if %{with usbip}
618 %{__make} -C tools/usb/usbip install \
619         DESTDIR=$RPM_BUILD_ROOT
620
621 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libusbip.la
622 %endif
623
624 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man8}
625
626 install -p tools/laptop/dslm/dslm $RPM_BUILD_ROOT%{_sbindir}
627
628 install -p tools/gpio/lsgpio $RPM_BUILD_ROOT%{_bindir}
629
630 %ifarch %{ix86} %{x8664} x32
631 install -p tools/hv/hv_{fcopy,kvp,vss}_daemon $RPM_BUILD_ROOT%{_sbindir}
632 # TODO: PLD-specific hv_get_dhcp_info,hv_get_dns_info,hv_set_ifconfig
633 %{__sed} -e '1s,/usr/bin/env python,%{__python},' tools/hv/lsvmbus >$RPM_BUILD_ROOT%{_bindir}/lsvmbus
634 chmod 755 $RPM_BUILD_ROOT%{_bindir}/lsvmbus
635 %endif
636
637 install -p tools/iio/{iio_event_monitor,iio_generic_buffer,lsiio} $RPM_BUILD_ROOT%{_bindir}
638
639 install -p tools/laptop/freefall/freefall $RPM_BUILD_ROOT%{_sbindir}
640
641 %{__make} -C tools/bpf install \
642         prefix=$RPM_BUILD_ROOT%{_prefix} \
643         bash_compdir=$RPM_BUILD_ROOT%{bash_compdir} \
644         %{?with_verbose:V=1}
645 %{__make} -C tools/bpf/bpftool doc-install \
646         prefix=$RPM_BUILD_ROOT%{_prefix} \
647         mandir=$RPM_BUILD_ROOT%{_mandir} \
648         %{?with_verbose:V=1}
649
650 install -p tools/thermal/tmon/tmon $RPM_BUILD_ROOT%{_bindir}
651 cp -p tools/thermal/tmon/tmon.8 $RPM_BUILD_ROOT%{_mandir}/man8
652
653 install -p tools/mm/slabinfo $RPM_BUILD_ROOT%{_bindir}
654 install -p tools/mm/page-types $RPM_BUILD_ROOT%{_sbindir}
655
656 %ifarch %{ix86} %{x8664} x32
657 install -d $RPM_BUILD_ROOT%{_mandir}/man8
658 %{__make} -C tools/power/x86/x86_energy_perf_policy install \
659         DESTDIR=$RPM_BUILD_ROOT
660
661 %{__make} -C tools/power/x86/turbostat install \
662         DESTDIR=$RPM_BUILD_ROOT
663 %endif
664
665 # gen_init_cpio
666 install -p usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
667
668 %clean
669 rm -rf $RPM_BUILD_ROOT
670
671 %post   cpupower-libs -p /sbin/ldconfig
672 %postun cpupower-libs -p /sbin/ldconfig
673
674 %post cpupower
675 %systemd_post cpupower.service
676
677 %preun cpupower
678 %systemd_preun cpupower.service
679
680 %postun cpupower
681 %systemd_reload
682
683 %post   -n usbip-libs -p /sbin/ldconfig
684 %postun -n usbip-libs -p /sbin/ldconfig
685
686 %files
687 %defattr(644,root,root,755)
688 %attr(755,root,root) %{_bindir}/bpf_asm
689 %attr(755,root,root) %{_bindir}/bpf_dbg
690 %attr(755,root,root) %{_bindir}/bpf_jit_disasm
691 %attr(755,root,root) %{_bindir}/gen_init_cpio
692 %attr(755,root,root) %{_bindir}/iio_event_monitor
693 %attr(755,root,root) %{_bindir}/iio_generic_buffer
694 %attr(755,root,root) %{_bindir}/lsgpio
695 %attr(755,root,root) %{_bindir}/lsiio
696 %attr(755,root,root) %{_bindir}/slabinfo
697 %attr(755,root,root) %{_bindir}/tmon
698 %attr(755,root,root) %{_sbindir}/bpftool
699 %attr(755,root,root) %{_sbindir}/dslm
700 %attr(755,root,root) %{_sbindir}/freefall
701 %attr(755,root,root) %{_sbindir}/page-types
702 %{_mandir}/man8/bpftool*.8*
703 %{_mandir}/man8/tmon.8*
704 %ifarch %{ix86} %{x8664} x32
705 %attr(755,root,root) %{_bindir}/centrino-decode
706 %attr(755,root,root) %{_bindir}/powernow-k8-decode
707 %endif
708 %ifarch %{ix86} %{x8664} x32
709 %attr(755,root,root) %{_bindir}/turbostat
710 %attr(755,root,root) %{_bindir}/x86_energy_perf_policy
711 %{_mandir}/man8/turbostat.8*
712 %{_mandir}/man8/x86_energy_perf_policy.8*
713 %endif
714
715 %files cpupower -f cpupower.lang
716 %defattr(644,root,root,755)
717 %attr(755,root,root) %{_bindir}/cpupower
718 %{_mandir}/man1/cpupower*.1*
719 %{systemdunitdir}/cpupower.service
720 %{systemdunitdir}/cpupower@.service
721 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cpupower
722
723 %files cpupower-libs
724 %defattr(644,root,root,755)
725 %attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
726 %attr(755,root,root) %ghost %{_libdir}/libcpupower.so.1
727
728 %files cpupower-libs-devel
729 %defattr(644,root,root,755)
730 %attr(755,root,root) %{_libdir}/libcpupower.so
731 %{_includedir}/cpufreq.h
732 %{_includedir}/cpuidle.h
733 %{_includedir}/powercap.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 %{_datadir}/perf-core/strace
759 %dir %{_libdir}/perf-core
760 %attr(755,root,root) %{_libdir}/perf-core/perf-archive
761 %attr(755,root,root) %{_libdir}/perf-core/perf-iostat
762 %dir %{_libdir}/perf-core/dlfilters
763 %attr(755,root,root) %{_libdir}/perf-core/dlfilters/dlfilter-show-cycles.so
764 %attr(755,root,root) %{_libdir}/perf-core/dlfilters/dlfilter-test-api-v0.so
765 %attr(755,root,root) %{_libdir}/perf-core/dlfilters/dlfilter-test-api-v2.so
766
767 %dir %{_libdir}/perf-core/scripts
768
769 %dir %{_libdir}/perf-core/scripts/perl
770 %dir %{_libdir}/perf-core/scripts/perl/Perf-Trace-Util
771 %dir %{_libdir}/perf-core/scripts/perl/Perf-Trace-Util/lib
772 %dir %{_libdir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf
773 %dir %{_libdir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace
774 %{_libdir}/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/*.pm
775 %dir %{_libdir}/perf-core/scripts/perl/bin
776 %attr(755,root,root) %{_libdir}/perf-core/scripts/perl/bin/*
777 %{_libdir}/perf-core/scripts/perl/*.pl
778
779 %dir %{_libdir}/perf-core/scripts/python
780 %dir %{_libdir}/perf-core/scripts/python/Perf-Trace-Util
781 %dir %{_libdir}/perf-core/scripts/python/Perf-Trace-Util/lib
782 %dir %{_libdir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf
783 %dir %{_libdir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace
784 %{_libdir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py
785 %dir %{_libdir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/__pycache__
786 %{_libdir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/__pycache__/*.py[co]
787 %dir %{_libdir}/perf-core/scripts/python/bin
788 %attr(755,root,root) %{_libdir}/perf-core/scripts/python/bin/*
789 %{_libdir}/perf-core/scripts/python/*.py
790 %dir %{_libdir}/perf-core/scripts/python/__pycache__
791 %{_libdir}/perf-core/scripts/python/__pycache__/*.py[co]
792
793 %{_includedir}/perf
794
795 %if %{with multilib}
796 %files perf-vdso32
797 %defattr(644,root,root,755)
798 %attr(755,root,root) %{_bindir}/perf-read-vdso32
799
800 %files perf-vdsox32
801 %defattr(644,root,root,755)
802 %attr(755,root,root) %{_bindir}/perf-read-vdsox32
803 %endif
804
805 %if %{with gtk}
806 %files perf-gtk
807 %defattr(644,root,root,755)
808 %attr(755,root,root) %{_libdir}/libperf-gtk.so
809 %endif
810
811 %files -n bash-completion-perf
812 %defattr(644,root,root,755)
813 /etc/bash_completion.d/perf
814 %endif
815
816 %files -n bash-completion-kernel-tools
817 %defattr(644,root,root,755)
818 %{bash_compdir}/bpftool
819
820 %if %{with usbip}
821 %files -n usbip
822 %defattr(644,root,root,755)
823 %doc linux-%{basever}/tools/usb/usbip/{AUTHORS,README}
824 %attr(755,root,root) %{_sbindir}/usbip
825 %attr(755,root,root) %{_sbindir}/usbipd
826 %{_mandir}/man8/usbip.8*
827 %{_mandir}/man8/usbipd.8*
828
829 %files -n usbip-libs
830 %defattr(644,root,root,755)
831 %attr(755,root,root) %{_libdir}/libusbip.so.*.*.*
832 %attr(755,root,root) %ghost %{_libdir}/libusbip.so.0
833
834 %files -n usbip-devel
835 %defattr(644,root,root,755)
836 %attr(755,root,root) %{_libdir}/libusbip.so
837 %{_includedir}/usbip
838
839 %files -n usbip-static
840 %defattr(644,root,root,755)
841 %{_libdir}/libusbip.a
842 %endif
This page took 0.218246 seconds and 4 git commands to generate.