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