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