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