3 %bcond_without sdl # SDL UI and audio support
4 %bcond_without glx # OpenGL/GLX support
5 %bcond_without ceph # Ceph/RBD support
6 %bcond_without glusterfs # GlusterFS backend
7 %bcond_without rdma # RDMA-based migration support
8 %bcond_with gtk2 # GTK+ 2.x instead of 3.x
9 %bcond_without gtk3 # Do not build GTK UI
10 %bcond_without spice # SPICE support
11 %bcond_with esd # EsounD audio support
12 %bcond_without oss # OSS audio support
13 %bcond_without pulseaudio # PulseAudio audio support
14 %bcond_without xen # Xen backend driver support
15 %bcond_without bluetooth # bluetooth support
16 %bcond_without brlapi # brlapi support
17 %bcond_without smartcard # smartcard-nss support
18 %bcond_without iscsi # iscsi support
19 %bcond_without seccomp # seccomp support
20 %bcond_without usbredir # usb network redirection support
26 Summary: QEMU CPU Emulator
27 Summary(pl.UTF-8): QEMU - emulator procesora
32 Group: Applications/Emulators
33 Source0: http://wiki.qemu-project.org/download/%{name}-%{version}.tar.bz2
34 # Source0-md5: 9541063d999cf9659ed7fdce71314f31
35 Source2: %{name}.binfmt
36 # Loads kvm kernel modules at boot
37 Source3: kvm-modules-load.conf
42 Source6: ksm.sysconfig
44 Source8: ksmtuned.service
46 Source10: ksmtuned.conf
47 Source11: %{name}-guest-agent.service
48 Source12: 99-%{name}-guest-agent.rules
49 Patch0: %{name}-cflags.patch
50 Patch1: vgabios-widescreens.patch
51 Patch2: %{name}-whitelist.patch
52 Patch3: %{name}-system-libcacard.patch
54 Patch5: %{name}-xattr.patch
55 Patch6: libjpeg-boolean.patch
56 # Proof of concept, for reference, do not remove
57 Patch400: %{name}-kde_virtual_workspaces_hack.patch
58 URL: http://www.qemu-project.org/
59 %{?with_opengl:BuildRequires: OpenGL-GLX-devel}
60 %{?with_sdl:BuildRequires: SDL-devel >= 1.2.1}
61 BuildRequires: alsa-lib-devel
63 %{?with_bluetooth:BuildRequires: bluez-libs-devel}
64 %{?with_brlapi:BuildRequires: brlapi-devel}
65 %{?with_ceph:BuildRequires: ceph-devel}
66 BuildRequires: curl-devel
67 BuildRequires: cyrus-sasl-devel >= 2
68 %{?with_esd:BuildRequires: esound-devel}
69 BuildRequires: glib2-devel >= 1:2.12
70 %{?with_glusterfs:BuildRequires: glusterfs-devel >= 3.4}
71 BuildRequires: gnutls-devel
72 BuildRequires: libaio-devel
73 %{?with_smartcard:BuildRequires: libcacard-devel}
74 BuildRequires: libcap-devel
75 BuildRequires: libcap-ng-devel
76 BuildRequires: libfdt-devel
77 %{?with_rdma:BuildRequires: libibverbs-devel}
78 %{?with_iscsi:BuildRequires: libiscsi-devel}
79 BuildRequires: libjpeg-devel
80 BuildRequires: libpng-devel
81 %{?with_rdma:BuildRequires: librdmacm-devel}
82 %{?with_seccomp:BuildRequires: libseccomp-devel}
83 BuildRequires: libssh2-devel >= 1.2.8
84 # for usb passthrough, when available
85 #BuildRequires: libusb-devel >= 1.0.13
86 BuildRequires: libuuid-devel
87 BuildRequires: ncurses-devel
88 %{?with_smartcard:BuildRequires: nss-devel >= 3.12.8}
89 BuildRequires: perl-Encode
90 BuildRequires: perl-tools-pod
91 BuildRequires: pkgconfig
92 %{?with_pulseaudio:BuildRequires: pulseaudio-devel}
93 BuildRequires: rpmbuild(macros) >= 1.644
94 BuildRequires: sed >= 4.0
96 BuildRequires: spice-protocol >= 0.12.0
97 BuildRequires: spice-server-devel >= 0.12.0
99 BuildRequires: texi2html
100 BuildRequires: texinfo
101 %{?with_usbredir:BuildRequires: usbredir-devel >= 0.6}
102 BuildRequires: vde2-devel
104 %{?with_xen:BuildRequires: xen-devel >= 3.4}
105 BuildRequires: xfsprogs-devel
106 BuildRequires: xorg-lib-libX11-devel
107 BuildRequires: zlib-devel
109 BuildRequires: gtk+2-devel >= 2:2.18.0
110 BuildRequires: vte0-devel >= 0.24.0
113 BuildRequires: gtk+3-devel >= 3.0.0
114 BuildRequires: vte-devel >= 0.32.0
116 Requires: %{name}-img = %{version}-%{release}
117 Requires: %{name}-system-alpha = %{version}-%{release}
118 Requires: %{name}-system-arm = %{version}-%{release}
119 Requires: %{name}-system-cris = %{version}-%{release}
120 Requires: %{name}-system-lm32 = %{version}-%{release}
121 Requires: %{name}-system-m68k = %{version}-%{release}
122 Requires: %{name}-system-microblaze = %{version}-%{release}
123 Requires: %{name}-system-mips = %{version}-%{release}
124 Requires: %{name}-system-moxie = %{version}-%{release}
125 Requires: %{name}-system-or32 = %{version}-%{release}
126 Requires: %{name}-system-ppc = %{version}-%{release}
127 Requires: %{name}-system-s390x = %{version}-%{release}
128 Requires: %{name}-system-sh4 = %{version}-%{release}
129 Requires: %{name}-system-sparc = %{version}-%{release}
130 Requires: %{name}-system-unicore32 = %{version}-%{release}
131 Requires: %{name}-system-x86 = %{version}-%{release}
132 Requires: %{name}-system-xtensa = %{version}-%{release}
133 Requires: %{name}-user = %{version}-%{release}
135 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
137 %define systempkg_req \
139 Requires: SDL >= 1.2.1 \
141 %if %{with usbredir} \
142 Requires: usbredir >= 0.6 \
145 Requires: gtk+2 >= 2:2.18.0 \
146 Requires: vte0 >= 0.24.0 \
149 Requires: gtk+3 >= 3.0.0 \
150 Requires: vte >= 0.32.0 \
153 # some PPC/SPARC boot image in ELF format
154 %define _noautostrip .*%{_datadir}/qemu/.*-.*
157 QEMU is a FAST! processor emulator. By using dynamic translation it
158 achieves a reasonnable speed while being easy to port on new host
159 CPUs. QEMU has two operating modes:
161 - User mode emulation. In this mode, QEMU can launch Linux processes
162 compiled for one CPU on another CPU. Linux system calls are converted
163 because of endianness and 32/64 bit mismatches. Wine (Windows
164 emulation) and DOSEMU (DOS emulation) are the main targets for QEMU.
166 - Full system emulation. In this mode, QEMU emulates a full system,
167 including a processor and various peripherials. It can also be used to
168 provide virtual hosting of several virtual PC on a single server.
170 %description -l pl.UTF-8
171 QEMU to szybki(!) emulator procesora. Poprzez użycie dynamicznego
172 tłumaczenia osiąga rozsądną szybkość i jest łatwy do przeportowania,
173 aby działał na kolejnych procesorach. QEMU ma dwa tryby pracy:
175 - Emulacja trybu użytkownika. W tym trybie QEMU może uruchamiać
176 procesy linuksowe skompilowane dla jednego procesora na innym
177 procesorze. Linuksowe wywołania systemowe są tłumaczone ze względu na
178 niezgodność kolejności bajtów w słowie i 32/64-bitowego rozmiaru
179 słowa. Wine (emulacja Windows) i DOSEMU (emulacja DOS-a) to główne
182 - Pełna emulacja systemu. W tym trybie QEMU emuluje cały system,
183 włączając w to procesor i różne urządzenia peryferyjne. Może być także
184 używane do wirtualnego hostowania kilku wirtualnych pecetów na
185 pojedynczym serwerze.
188 Summary: QEMU common files needed by all QEMU targets
189 Summary(pl.UTF-8): Wspólne pliki QEMU wymagane przez wszystkie środowiska QEMU
190 Group: Development/Tools
191 Requires(post,preun,postun): systemd-units >= 38
192 Requires(postun): /usr/sbin/groupdel
193 Requires(postun): /usr/sbin/userdel
194 Requires(pre): /bin/id
195 Requires(pre): /usr/bin/getgid
196 Requires(pre): /usr/sbin/groupadd
197 Requires(pre): /usr/sbin/useradd
198 Requires: glib2 >= 1:2.12
199 Requires: libssh2 >= 1.2.8
200 Requires: systemd-units >= 38
201 Provides: group(qemu)
203 Obsoletes: qemu-kvm-common
204 Conflicts: qemu < 1.0-2
207 QEMU is a generic and open source processor emulator which achieves a
208 good emulation speed by using dynamic translation.
210 This package provides the common files needed by all QEMU targets.
212 %description common -l pl.UTF-8
213 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
214 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
216 Ten pakiet udostępnia wspólne pliki wymagane przez wszystkie
220 Summary: QEMU command line tool for manipulating disk images
221 Summary(pl.UTF-8): Narzędzie QEMU do operacji na obrazach dysków
222 Group: Development/Tools
223 Obsoletes: qemu-kvm-img
224 Conflicts: qemu < 1.0-2
227 This package provides a command line tool for manipulating disk
230 %description img -l pl.UTF-8
231 Ten pakiet udostępnia działające z linii poleceń narzędzia do operacji
235 Summary: QEMU user mode emulation of qemu targets
236 Summary(pl.UTF-8): QEMU - emulacja trybu użytkownika środowisk qemu
237 Group: Development/Tools
238 Requires: %{name}-common = %{version}-%{release}
239 Requires(post,postun): systemd-units >= 38
240 Requires: systemd-units >= 38
241 Obsoletes: qemu-kvm-user
244 QEMU is a generic and open source processor emulator which achieves a
245 good emulation speed by using dynamic translation.
247 This package provides the user mode emulation of QEMU targets.
249 %description user -l pl.UTF-8
250 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
251 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
253 Ten pakiet udostępnia emulację trybu użytkownika środowisk QEMU.
255 %package system-alpha
256 Summary: QEMU system emulator for Alpha
257 Summary(pl.UTF-8): QEMU - emulator systemu z procesorem Alpha
258 Group: Development/Tools
259 Requires: %{name}-common = %{version}-%{release}
261 Obsoletes: qemu-kvm-system-alpha
263 %description system-alpha
264 QEMU is a generic and open source processor emulator which achieves a
265 good emulation speed by using dynamic translation.
267 This package provides the system emulator with Alpha CPU.
269 %description system-alpha -l pl.UTF-8
270 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
271 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
273 Ten pakiet zawiera emulator systemu z procesorem Alpha.
276 Summary: QEMU system emulator for ARM
277 Summary(pl.UTF-8): QEMU - emulator systemu z procesorem ARM
278 Group: Development/Tools
279 Requires: %{name}-common = %{version}-%{release}
281 Obsoletes: qemu-kvm-system-arm
283 %description system-arm
284 QEMU is a generic and open source processor emulator which achieves a
285 good emulation speed by using dynamic translation.
287 This package provides the system emulator for ARM.
289 %description system-arm -l pl.UTF-8
290 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
291 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
293 Ten pakiet zawiera emulator systemu z procesorem ARM.
296 Summary: QEMU system emulator for CRIS
297 Summary(pl.UTF-8): QEMU - emulator systemu z procesorem CRIS
298 Group: Development/Tools
299 Requires: %{name}-common = %{version}-%{release}
301 Obsoletes: qemu-kvm-system-cris
303 %description system-cris
304 QEMU is a generic and open source processor emulator which achieves a
305 good emulation speed by using dynamic translation.
307 This package provides the system emulator with CRIS CPU.
309 %description system-cris -l pl.UTF-8
310 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
311 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
313 Ten pakiet zawiera emulator systemu z procesorem CRIS.
316 Summary: QEMU system emulator for LM32
317 Summary(pl.UTF-8): QEMU - emulator systemu z procesorem LM32
318 Group: Development/Tools
319 Requires: %{name}-common = %{version}-%{release}
321 Obsoletes: qemu-kvm-system-lm32
323 %description system-lm32
324 QEMU is a generic and open source processor emulator which achieves a
325 good emulation speed by using dynamic translation.
327 This package provides the system emulator with LM32 CPU.
329 %description system-lm32 -l pl.UTF-8
330 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
331 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
333 Ten pakiet zawiera emulator systemu z procesorem LM32.
336 Summary: QEMU system emulator for m68k
337 Summary(pl.UTF-8): QEMU - emulator systemu z procesorem m68k
338 Group: Development/Tools
339 Requires: %{name}-common = %{version}-%{release}
341 Obsoletes: qemu-kvm-system-m68k
343 %description system-m68k
344 QEMU is a generic and open source processor emulator which achieves a
345 good emulation speed by using dynamic translation.
347 This package provides the system emulator with m68k CPU.
349 %description system-m68k -l pl.UTF-8
350 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
351 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
353 Ten pakiet zawiera emulator systemu z procesorem m68k.
355 %package system-microblaze
356 Summary: QEMU system emulator for MicroBlaze
357 Summary(pl.UTF-8): QEMU - emulator systemu z procesorem MicroBlaze
358 Group: Development/Tools
359 Requires: %{name}-common = %{version}-%{release}
361 Obsoletes: qemu-kvm-system-microblaze
363 %description system-microblaze
364 QEMU is a generic and open source processor emulator which achieves a
365 good emulation speed by using dynamic translation.
367 This package provides the system emulator with MicroBlaze CPU.
369 %description system-microblaze -l pl.UTF-8
370 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
371 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
373 Ten pakiet zawiera emulator systemu z procesorem MicroBlaze.
376 Summary: QEMU system emulator for MIPS
377 Summary(pl.UTF-8): QEMU - emulator systemu z procesorem MIPS
378 Group: Development/Tools
379 Requires: %{name}-common = %{version}-%{release}
381 Obsoletes: qemu-kvm-system-mips
383 %description system-mips
384 QEMU is a generic and open source processor emulator which achieves a
385 good emulation speed by using dynamic translation.
387 This package provides the system emulator with MIPS CPU.
389 %description system-mips -l pl.UTF-8
390 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
391 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
393 Ten pakiet zawiera emulator systemu z procesorem MIPS.
395 %package system-moxie
396 Summary: QEMU system emulator for Moxie
397 Summary(pl.UTF-8): QEMU - emulator systemu z procesorem Moxie
398 Group: Development/Tools
399 Requires: %{name}-common = %{version}-%{release}
402 %description system-moxie
403 QEMU is a generic and open source processor emulator which achieves a
404 good emulation speed by using dynamic translation.
406 This package provides the system emulator with Moxie CPU.
408 %description system-moxie -l pl.UTF-8
409 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
410 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
412 Ten pakiet zawiera emulator systemu z procesorem Moxie.
415 Summary: QEMU system emulator for OpenRISC
416 Summary(pl.UTF-8): QEMU - emulator systemu z procesorem OpenRISC
417 Group: Development/Tools
418 Requires: %{name}-common = %{version}-%{release}
420 Obsoletes: qemu-kvm-system-or32
422 %description system-or32
423 QEMU is a generic and open source processor emulator which achieves a
424 good emulation speed by using dynamic translation.
426 This package provides the system emulator with OpenRISC CPU.
428 %description system-or32 -l pl.UTF-8
429 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
430 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
432 Ten pakiet zawiera emulator systemu z procesorem OpenRISC.
435 Summary: QEMU system emulator for PowerPC
436 Summary(pl.UTF-8): QEMU - emulator systemu z procesorem PowerPC
437 Group: Development/Tools
438 Requires: %{name}-common = %{version}-%{release}
440 Obsoletes: qemu-kvm-system-ppc
442 %description system-ppc
443 QEMU is a generic and open source processor emulator which achieves a
444 good emulation speed by using dynamic translation.
446 This package provides the system emulator with PowerPC CPU.
448 %description system-ppc -l pl.UTF-8
449 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
450 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
452 Ten pakiet zawiera emulator systemu z procesorem PowerPC.
454 %package system-s390x
455 Summary: QEMU system emulator for S390
456 Summary(pl.UTF-8): QEMU - emulator systemu z procesorem S390
457 Group: Development/Tools
458 Requires: %{name}-common = %{version}-%{release}
460 Obsoletes: qemu-kvm-system-s390x
462 %description system-s390x
463 QEMU is a generic and open source processor emulator which achieves a
464 good emulation speed by using dynamic translation.
466 This package provides the system emulator with S390 CPU.
468 %description system-s390x -l pl.UTF-8
469 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
470 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
472 Ten pakiet zawiera emulator systemu z procesorem S390.
475 Summary: QEMU system emulator for SH4
476 Summary(pl.UTF-8): QEMU - emulator systemu z procesorem SH4
477 Group: Development/Tools
478 Requires: %{name}-common = %{version}-%{release}
480 Obsoletes: qemu-kvm-system-sh4
482 %description system-sh4
483 QEMU is a generic and open source processor emulator which achieves a
484 good emulation speed by using dynamic translation.
486 This package provides the system emulator with SH4 CPU.
488 %description system-sh4 -l pl.UTF-8
489 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
490 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
492 Ten pakiet zawiera emulator systemu z procesorem SH4.
494 %package system-sparc
495 Summary: QEMU system emulator for SPARC
496 Summary(pl.UTF-8): QEMU - emulator systemu z procesorem SPARC
497 Group: Development/Tools
498 Requires: %{name}-common = %{version}-%{release}
500 Obsoletes: qemu-kvm-system-sparc
502 %description system-sparc
503 QEMU is a generic and open source processor emulator which achieves a
504 good emulation speed by using dynamic translation.
506 This package provides the system emulator with SPARC/SPARC64 CPU.
508 %description system-sparc -l pl.UTF-8
509 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
510 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
512 Ten pakiet zawiera emulator systemu z procesorem SPARC/SPARC64.
514 %package system-unicore32
515 Summary: QEMU system emulator for UniCore32
516 Summary(pl.UTF-8): QEMU - emulator systemu z procesorem UniCore32
517 Group: Development/Tools
518 Requires: %{name}-common = %{version}-%{release}
520 Obsoletes: qemu-kvm-system-unicore32
522 %description system-unicore32
523 QEMU is a generic and open source processor emulator which achieves a
524 good emulation speed by using dynamic translation.
526 This package provides the system emulator with UniCore32 CPU.
528 %description system-unicore32 -l pl.UTF-8
529 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
530 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
532 Ten pakiet zawiera emulator systemu z procesorem UniCore32.
535 Summary: QEMU system emulator for x86
536 Summary(pl.UTF-8): QEMU - emulator systemu z procesorem x86
537 Group: Development/Tools
538 Requires: %{name}-common = %{version}-%{release}
541 Obsoletes: qemu-kvm-system-x86
543 %description system-x86
544 QEMU is a generic and open source processor emulator which achieves a
545 good emulation speed by using dynamic translation.
547 %description system-x86 -l pl.UTF-8
548 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
549 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
551 %package system-xtensa
552 Summary: QEMU system emulator for Xtensa
553 Summary(pl.UTF-8): QEMU - emulator systemu z procesorem Xtensa
554 Group: Development/Tools
555 Requires: %{name}-common = %{version}-%{release}
557 Obsoletes: qemu-kvm-system-xtensa
559 %description system-xtensa
560 QEMU is a generic and open source processor emulator which achieves a
561 good emulation speed by using dynamic translation.
563 This package provides the system emulator with Xtensa CPU.
565 %description system-xtensa -l pl.UTF-8
566 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
567 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
569 Ten pakiet zawiera emulator systemu z procesorem Xtensa.
572 Summary: QEMU guest agent
573 Summary(pl.UTF-8): Agent gościa QEMU
575 Requires(post,preun,postun): systemd-units >= 38
576 Requires: glib2 >= 1:2.12
577 Requires: systemd-units >= 38
578 Obsoletes: qemu-kvm-guest-agent
580 %description guest-agent
581 QEMU is a generic and open source processor emulator which achieves a
582 good emulation speed by using dynamic translation.
584 This package provides an agent to run inside guests, which
585 communicates with the host over a virtio-serial channel named
586 "org.qemu.guest_agent.0".
588 This package does not need to be installed on the host OS.
590 %description guest-agent -l pl.UTF-8
591 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
592 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
594 Ten pakiet udostępnia agenta przeznaczonego do uruchomienia w
595 systemach-gościach, komunikującego się kanałem virtio-serial o nazwie
596 "org.qemu.guest_agent.0".
598 Ten pakiet nie musi być zainstalowany w systemie hosta.
610 %{__mv} libcacard libcacard-use-system-lib
612 # workaround for conflict with alsa/error.h
613 ln -s ../error.h qapi/error.h
617 --extra-cflags="%{rpmcflags} -I/usr/include/ncurses" \
618 --extra-ldflags="%{rpmldflags}" \
619 --prefix=%{_prefix} \
620 --sysconfdir=%{_sysconfdir} \
622 --host-cc="%{__cc}" \
625 %{__enable_disable bluetooth bluez} \
626 %{__enable_disable brlapi} \
632 %{__enable_disable glusterfs} \
633 %{__enable_disable iscsi libiscsi} \
634 %{__enable_disable glx} \
635 %{__enable_disable ceph rbd} \
636 %{__enable_disable rdma} \
637 %{__enable_disable sdl} \
638 %{__enable_disable seccomp} \
639 %{__enable_disable spice} \
640 %{__enable_disable smartcard smartcard-nss} \
642 %{__enable_disable usbredir usb-redir} \
651 %{__enable_disable xen} \
652 --audio-drv-list="alsa%{?with_iss:,oss}%{?with_sdl:,sdl}%{?with_esd:,esd}%{?with_pulseaudio:,pa}" \
653 --interp-prefix=%{_libdir}/qemu/lib-%%M \
654 %if %{without gtk2} && %{without gtk3}
657 --with-gtkabi="%{?with_gtk2:2.0}%{!?with_gtk2:3.0}"
660 # note: CONFIG_QEMU_HELPERDIR is used when compiling, libexecdir when installing;
661 # --libexecdir in configure is nop
664 CONFIG_QEMU_HELPERDIR="%{_libdir}" \
665 %{!?with_smartcard:CONFIG_USB_SMARTCARD=n}
667 # rebuild patched vesa tables with additional widescreen modes.
668 %{__make} -C roms/vgabios stdvga-bios
670 %{__cc} %{SOURCE7} %{rpmcflags} -o ksmctl
673 rm -rf $RPM_BUILD_ROOT
674 install -d $RPM_BUILD_ROOT{%{systemdunitdir},/usr/lib/binfmt.d} \
675 $RPM_BUILD_ROOT/etc/{sysconfig,udev/rules.d,modules-load.d} \
676 $RPM_BUILD_ROOT{%{_sysconfdir}/sasl,%{_sbindir}}
679 %{!?with_smartcard:CONFIG_USB_SMARTCARD=n} \
680 DESTDIR=$RPM_BUILD_ROOT \
681 libexecdir=%{_libdir}
683 install -d $RPM_BUILD_ROOT%{_sysconfdir}
684 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ifup
689 install -p qemu.sasl $RPM_BUILD_ROOT%{_sysconfdir}/sasl/qemu.conf
691 %ifarch %{ix86} %{x8664}
692 install -p scripts/kvm/kvm_stat $RPM_BUILD_ROOT%{_bindir}
693 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/modules-load.d/kvm.conf
694 install -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
697 install -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdunitdir}/ksm.service
698 install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/ksm
699 install -p ksmctl $RPM_BUILD_ROOT%{_sbindir}
701 install -p %{SOURCE8} $RPM_BUILD_ROOT%{systemdunitdir}/ksmtuned.service
702 install -p %{SOURCE9} $RPM_BUILD_ROOT%{_sbindir}/ksmtuned
703 install -p %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/ksmtuned.conf
705 # For the qemu-guest-agent subpackage install the systemd
706 # service and udev rules.
707 install -p %{SOURCE11} $RPM_BUILD_ROOT%{systemdunitdir}
708 install -p %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
711 %ifnarch %{ix86} %{x8664}
720 %ifnarch sparc sparc64
727 test $i = dummy && continue
728 grep /$i:\$ %{SOURCE2} > $RPM_BUILD_ROOT/usr/lib/binfmt.d/$i.conf
732 %{__rm} $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-{doc,tech}.html
733 %{__rm} $RPM_BUILD_ROOT%{_docdir}/qemu/qmp-commands.txt
735 # install patched vesa tables with additional widescreen modes.
736 cp -p roms/vgabios/VGABIOS-lgpl-latest.stdvga.bin $RPM_BUILD_ROOT%{_datadir}/%{name}/vgabios-stdvga.bin
738 %if %{with gtk2} || %{with gtk3}
739 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{de_DE,de}
740 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{fr_FR,fr}
747 rm -rf $RPM_BUILD_ROOT
751 %groupadd -g 276 qemu
752 %useradd -u 276 -g qemu -G kvm -c "QEMU User" qemu
755 %systemd_post ksm.service
756 %systemd_post ksmtuned.service
759 %systemd_preun ksm.service
760 %systemd_preun ksmtuned.service
763 if [ "$1" = "0" ]; then
770 %triggerpostun common -- qemu-common < 1.6.1-4
771 %systemd_trigger ksm.service
772 %systemd_trigger ksmtuned.service
775 %systemd_service_restart systemd-binfmt.service
778 %systemd_service_restart systemd-binfmt.service
784 %systemd_preun qemu-guest-agent.service
790 %defattr(644,root,root,755)
792 %files common -f %{name}.lang
793 %defattr(644,root,root,755)
794 %doc README qemu-doc.html qemu-tech.html qmp-commands.txt
795 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu-ifup
796 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu/target-*.conf
797 %config(noreplace) %verify(not md5 mtime size) /etc/ksmtuned.conf
798 %config(noreplace) %verify(not md5 mtime size) /etc/sasl/qemu.conf
799 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ksm
800 %{systemdunitdir}/ksm.service
801 %{systemdunitdir}/ksmtuned.service
802 %dir %{_sysconfdir}/qemu
803 %attr(755,root,root) %{_bindir}/virtfs-proxy-helper
804 %attr(755,root,root) %{_bindir}/qemu-nbd
805 %attr(755,root,root) %{_libdir}/qemu-bridge-helper
806 %attr(755,root,root) %{_sbindir}/ksmctl
807 %attr(755,root,root) %{_sbindir}/ksmtuned
808 %{_mandir}/man1/qemu.1*
809 %{_mandir}/man1/virtfs-proxy-helper.1*
810 %{_mandir}/man8/qemu-nbd.8*
812 %dir %{_datadir}/qemu
813 %{_datadir}/%{name}/keymaps
814 %{_datadir}/%{name}/qemu-icon.bmp
815 # various bios images
816 %{_datadir}/%{name}/*.aml
817 %{_datadir}/%{name}/*.bin
818 %{_datadir}/%{name}/*.rom
819 %{_datadir}/%{name}/*.dtb
820 %{_datadir}/%{name}/qemu_logo_no_text.svg
821 %{_datadir}/%{name}/openbios-ppc
822 %{_datadir}/%{name}/openbios-sparc*
823 %{_datadir}/%{name}/palcode-clipper
824 %{_datadir}/%{name}/s390-ccw.img
827 %defattr(644,root,root,755)
828 %attr(755,root,root) %{_bindir}/qemu-img
829 %{_mandir}/man1/qemu-img.1*
832 %defattr(644,root,root,755)
833 /usr/lib/binfmt.d/qemu-*.conf
834 %attr(755,root,root) %{_bindir}/qemu-alpha
835 %attr(755,root,root) %{_bindir}/qemu-arm
836 %attr(755,root,root) %{_bindir}/qemu-armeb
837 %attr(755,root,root) %{_bindir}/qemu-cris
838 %attr(755,root,root) %{_bindir}/qemu-i386
839 %attr(755,root,root) %{_bindir}/qemu-io
840 %attr(755,root,root) %{_bindir}/qemu-m68k
841 %attr(755,root,root) %{_bindir}/qemu-microblaze
842 %attr(755,root,root) %{_bindir}/qemu-microblazeel
843 %attr(755,root,root) %{_bindir}/qemu-mips
844 %attr(755,root,root) %{_bindir}/qemu-mipsel
845 %attr(755,root,root) %{_bindir}/qemu-mips64
846 %attr(755,root,root) %{_bindir}/qemu-mips64el
847 %attr(755,root,root) %{_bindir}/qemu-mipsn32
848 %attr(755,root,root) %{_bindir}/qemu-mipsn32el
849 %attr(755,root,root) %{_bindir}/qemu-or32
850 %attr(755,root,root) %{_bindir}/qemu-ppc
851 %attr(755,root,root) %{_bindir}/qemu-ppc64
852 %attr(755,root,root) %{_bindir}/qemu-ppc64abi32
853 %attr(755,root,root) %{_bindir}/qemu-s390x
854 %attr(755,root,root) %{_bindir}/qemu-sh4
855 %attr(755,root,root) %{_bindir}/qemu-sh4eb
856 %attr(755,root,root) %{_bindir}/qemu-sparc
857 %attr(755,root,root) %{_bindir}/qemu-sparc32plus
858 %attr(755,root,root) %{_bindir}/qemu-sparc64
859 %attr(755,root,root) %{_bindir}/qemu-unicore32
860 %attr(755,root,root) %{_bindir}/qemu-x86_64
863 %defattr(644,root,root,755)
864 %attr(755,root,root) %{_bindir}/qemu-system-alpha
867 %defattr(644,root,root,755)
868 %attr(755,root,root) %{_bindir}/qemu-system-arm
871 %defattr(644,root,root,755)
872 %attr(755,root,root) %{_bindir}/qemu-system-cris
875 %defattr(644,root,root,755)
876 %attr(755,root,root) %{_bindir}/qemu-system-lm32
879 %defattr(644,root,root,755)
880 %attr(755,root,root) %{_bindir}/qemu-system-m68k
882 %files system-microblaze
883 %defattr(644,root,root,755)
884 %attr(755,root,root) %{_bindir}/qemu-system-microblaze
885 %attr(755,root,root) %{_bindir}/qemu-system-microblazeel
888 %defattr(644,root,root,755)
889 %attr(755,root,root) %{_bindir}/qemu-system-mips
890 %attr(755,root,root) %{_bindir}/qemu-system-mipsel
891 %attr(755,root,root) %{_bindir}/qemu-system-mips64
892 %attr(755,root,root) %{_bindir}/qemu-system-mips64el
895 %defattr(644,root,root,755)
896 %attr(755,root,root) %{_bindir}/qemu-system-moxie
899 %defattr(644,root,root,755)
900 %attr(755,root,root) %{_bindir}/qemu-system-or32
903 %defattr(644,root,root,755)
904 %attr(755,root,root) %{_bindir}/qemu-system-ppc
905 %attr(755,root,root) %{_bindir}/qemu-system-ppc64
906 %attr(755,root,root) %{_bindir}/qemu-system-ppcemb
909 %defattr(644,root,root,755)
910 %attr(755,root,root) %{_bindir}/qemu-system-s390x
913 %defattr(644,root,root,755)
914 %attr(755,root,root) %{_bindir}/qemu-system-sh4
915 %attr(755,root,root) %{_bindir}/qemu-system-sh4eb
918 %defattr(644,root,root,755)
919 %attr(755,root,root) %{_bindir}/qemu-system-sparc
920 %attr(755,root,root) %{_bindir}/qemu-system-sparc64
922 %files system-unicore32
923 %defattr(644,root,root,755)
924 %attr(755,root,root) %{_bindir}/qemu-system-unicore32
927 %defattr(644,root,root,755)
928 %attr(755,root,root) %{_bindir}/qemu-system-i386
929 %attr(755,root,root) %{_bindir}/qemu-system-x86_64
930 %ifarch %{ix86} %{x8664}
931 %config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/kvm.conf
932 %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/80-kvm.rules
933 %attr(755,root,root) %{_bindir}/kvm_stat
937 %defattr(644,root,root,755)
938 %attr(755,root,root) %{_bindir}/qemu-system-xtensa
939 %attr(755,root,root) %{_bindir}/qemu-system-xtensaeb
942 %defattr(644,root,root,755)
943 %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/99-qemu-guest-agent.rules
944 %{systemdunitdir}/qemu-guest-agent.service
945 %attr(755,root,root) %{_bindir}/qemu-ga