2 # - package virtfs-proxy-helper, qemu-bridge-helper.
4 # - qemu-system-ppc -hda ac-ppc.img says:
5 # qemu: could not open disk image ac-ppc.img: error "Success"
6 # qemu-0.12.2-2.x86_64.rpm - broken
7 # qemu-0.12.3-3.x86_64/qemu-0.12.4-1.x86_64 - stops on "returning from prom_init"
8 # qemu-0.15.0-2.x86_64.rpm - qemu-system-sparc/ppc booting with -kernel, -initrd options stalls in openbios prompt
9 # qemu-0.11.1-*.x86_64.rpm - OK
12 %bcond_with nosdlgui # do not use SDL gui (use X11 instead)
14 Summary: QEMU CPU Emulator
15 Summary(pl.UTF-8): QEMU - emulator procesora
20 Group: Applications/Emulators
21 Source0: http://wiki.qemu.org/download/%{name}-%{version}.tar.bz2
22 # Source0-md5: 78eb1e984f4532aa9f2bdd3c127b5b61
23 Patch0: %{name}-cflags.patch
24 Patch1: vgabios-widescreens.patch
25 Patch6: %{name}-nosdlgui.patch
26 # Proof of concept, for reference, do not remove
27 Patch8: %{name}-kde_virtual_workspaces_hack.patch
28 Patch17: %{name}-whitelist.patch
29 URL: http://wiki.qemu.org/Index.html
30 BuildRequires: SDL-devel >= 1.2.1
31 BuildRequires: alsa-lib-devel
32 BuildRequires: bluez-libs-devel
33 BuildRequires: gnutls-devel
34 BuildRequires: ncurses-devel
35 BuildRequires: perl-Encode
36 BuildRequires: perl-tools-pod
37 BuildRequires: pkgconfig
38 BuildRequires: sed >= 4.0
39 BuildRequires: texi2html
40 BuildRequires: texinfo
42 BuildRequires: xen-devel
43 BuildRequires: xorg-lib-libX11-devel
44 Requires: %{name}-img = %{version}-%{release}
45 Requires: %{name}-system-alpha = %{version}-%{release}
46 Requires: %{name}-system-arm = %{version}-%{release}
47 Requires: %{name}-system-cris = %{version}-%{release}
48 Requires: %{name}-system-lm32 = %{version}-%{release}
49 Requires: %{name}-system-m68k = %{version}-%{release}
50 Requires: %{name}-system-microblaze = %{version}-%{release}
51 Requires: %{name}-system-mips = %{version}-%{release}
52 Requires: %{name}-system-ppc = %{version}-%{release}
53 Requires: %{name}-system-or32 = %{version}-%{release}
54 Requires: %{name}-system-s390x = %{version}-%{release}
55 Requires: %{name}-system-sh4 = %{version}-%{release}
56 Requires: %{name}-system-sparc = %{version}-%{release}
57 Requires: %{name}-system-unicore32 = %{version}-%{release}
58 Requires: %{name}-system-x86 = %{version}-%{release}
59 Requires: %{name}-system-xtensa = %{version}-%{release}
60 Requires: %{name}-user = %{version}-%{release}
61 # sparc is currently unsupported (missing cpu_get_real_ticks() impl in vl.c)
62 ExclusiveArch: %{ix86} %{x8664} %{?with_userspace:ppc}
63 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65 # some PPC/SPARC boot image in ELF format
66 %define _noautostrip .*%{_datadir}/qemu/.*-.*
69 QEMU is a FAST! processor emulator. By using dynamic translation it
70 achieves a reasonnable speed while being easy to port on new host
71 CPUs. QEMU has two operating modes:
73 - User mode emulation. In this mode, QEMU can launch Linux processes
74 compiled for one CPU on another CPU. Linux system calls are converted
75 because of endianness and 32/64 bit mismatches. Wine (Windows
76 emulation) and DOSEMU (DOS emulation) are the main targets for QEMU.
78 - Full system emulation. In this mode, QEMU emulates a full system,
79 including a processor and various peripherials. It can also be used to
80 provide virtual hosting of several virtual PC on a single server.
82 %description -l pl.UTF-8
83 QEMU to szybki(!) emulator procesora. Poprzez użycie dynamicznego
84 tłumaczenia osiąga rozsądną szybkość i jest łatwy do przeportowania,
85 aby działał na kolejnych procesorach. QEMU ma dwa tryby pracy:
87 - Emulacja trybu użytkownika. W tym trybie QEMU może uruchamiać
88 procesy linuksowe skompilowane dla jednego procesora na innym
89 procesorze. Linuksowe wywołania systemowe są tłumaczone ze względu na
90 niezgodność kolejności bajtów w słowie i 32/64-bitowego rozmiaru
91 słowa. Wine (emulacja Windows) i DOSEMU (emulacja DOS-a) to główne
94 - Pełna emulacja systemu. W tym trybie QEMU emuluje cały system,
95 włączając w to procesor i różne urządzenia peryferyjne. Może być także
96 używane do wirtualnego hostowania kilku wirtualnych pecetów na
100 Summary: QEMU common files needed by all QEMU targets
101 Group: Development/Tools
102 Requires: SDL >= 1.2.1
103 Conflicts: qemu < 1.0-2
106 QEMU is a generic and open source processor emulator which achieves a
107 good emulation speed by using dynamic translation.
109 This package provides the common files needed by all QEMU targets.
112 Summary: QEMU command line tool for manipulating disk images
113 Group: Development/Tools
114 Conflicts: qemu < 1.0-2
117 This package provides a command line tool for manipulating disk images
120 Summary: QEMU user mode emulation of qemu targets
121 Group: Development/Tools
122 Requires: %{name}-common = %{version}-%{release}
125 QEMU is a generic and open source processor emulator which achieves a
126 good emulation speed by using dynamic translation.
128 This package provides the user mode emulation of QEMU targets.
130 %package system-alpha
131 Summary: QEMU system emulator for alpha
132 Group: Development/Tools
133 Requires: %{name}-common = %{version}-%{release}
135 %description system-alpha
136 QEMU is a generic and open source processor emulator which achieves a
137 good emulation speed by using dynamic translation.
139 This package provides the system emulator for alpha.
142 Summary: QEMU system emulator for arm
143 Group: Development/Tools
144 Requires: %{name}-common = %{version}-%{release}
146 %description system-arm
147 QEMU is a generic and open source processor emulator which achieves a
148 good emulation speed by using dynamic translation.
150 This package provides the system emulator for arm.
153 Summary: QEMU system emulator for cris
154 Group: Development/Tools
155 Requires: %{name}-common = %{version}-%{release}
157 %description system-cris
158 QEMU is a generic and open source processor emulator which achieves a
159 good emulation speed by using dynamic translation.
161 This package provides the system emulator for cris.
164 Summary: QEMU system emulator for lm32
165 Group: Development/Tools
166 Requires: %{name}-common = %{version}-%{release}
168 %description system-lm32
169 QEMU is a generic and open source processor emulator which achieves a
170 good emulation speed by using dynamic translation.
172 This package provides the system emulator for lm32.
175 Summary: QEMU system emulator for m68k
176 Group: Development/Tools
177 Requires: %{name}-common = %{version}-%{release}
179 %description system-m68k
180 QEMU is a generic and open source processor emulator which achieves a
181 good emulation speed by using dynamic translation.
183 This package provides the system emulator for m68k.
185 %package system-microblaze
186 Summary: QEMU system emulator for microblaze
187 Group: Development/Tools
188 Requires: %{name}-common = %{version}-%{release}
190 %description system-microblaze
191 QEMU is a generic and open source processor emulator which achieves a
192 good emulation speed by using dynamic translation.
194 This package provides the system emulator for microblaze.
197 Summary: QEMU system emulator for mips
198 Group: Development/Tools
199 Requires: %{name}-common = %{version}-%{release}
201 %description system-mips
202 QEMU is a generic and open source processor emulator which achieves a
203 good emulation speed by using dynamic translation.
205 This package provides the system emulator for mips.
208 Summary: QEMU system emulator for or32
209 Group: Development/Tools
210 Requires: %{name}-common = %{version}-%{release}
212 %description system-or32
213 QEMU is a generic and open source processor emulator which achieves a
214 good emulation speed by using dynamic translation.
216 This package provides the system emulator for or32.
219 Summary: QEMU system emulator for ppc
220 Group: Development/Tools
221 Requires: %{name}-common = %{version}-%{release}
223 %description system-ppc
224 QEMU is a generic and open source processor emulator which achieves a
225 good emulation speed by using dynamic translation.
227 This package provides the system emulator for ppc.
229 %package system-s390x
230 Summary: QEMU system emulator for s390x
231 Group: Development/Tools
232 Requires: %{name}-common = %{version}-%{release}
234 %description system-s390x
235 QEMU is a generic and open source processor emulator which achieves a
236 good emulation speed by using dynamic translation.
238 This package provides the system emulator for s390x.
241 Summary: QEMU system emulator for sh4
242 Group: Development/Tools
243 Requires: %{name}-common = %{version}-%{release}
245 %description system-sh4
246 QEMU is a generic and open source processor emulator which achieves a
247 good emulation speed by using dynamic translation.
249 This package provides the system emulator for sh4.
251 %package system-sparc
252 Summary: QEMU system emulator for sparc
253 Group: Development/Tools
254 Requires: %{name}-common = %{version}-%{release}
256 %description system-sparc
257 QEMU is a generic and open source processor emulator which achieves a
258 good emulation speed by using dynamic translation.
260 This package provides the system emulator for sparc/sparc64.
262 %package system-unicore32
263 Summary: QEMU system emulator for unicore32
264 Group: Development/Tools
265 Requires: %{name}-common = %{version}-%{release}
267 %description system-unicore32
268 QEMU is a generic and open source processor emulator which achieves a
269 good emulation speed by using dynamic translation.
271 This package provides the system emulator for unicore32.
274 Summary: QEMU system emulator for x86
275 Group: Development/Tools
276 Requires: %{name}-common = %{version}-%{release}
278 %description system-x86
279 QEMU is a generic and open source processor emulator which achieves a
280 good emulation speed by using dynamic translation.
282 This package provides the system emulator for x86. When being run in a
283 x86 machine that supports it, this package also provides the KVM
284 virtualization platform.
286 %package system-xtensa
287 Summary: QEMU system emulator for xtensa
288 Group: Development/Tools
289 Requires: %{name}-common = %{version}-%{release}
291 %description system-xtensa
292 QEMU is a generic and open source processor emulator which achieves a
293 good emulation speed by using dynamic translation.
295 This package provides the system emulator for xtensa.
301 %{?with_nosdlgui:%patch6 -p1}
305 # workaround for conflict with alsa/error.h
306 ln -s ../error.h qapi/error.h
310 --extra-cflags="%{rpmcflags} -I/usr/include/ncurses" \
311 --extra-ldflags="%{rpmldflags}" \
313 --sysconfdir=%{_sysconfdir} \
314 --prefix=%{_prefix} \
316 --host-cc="%{__cc}" \
318 --audio-drv-list="alsa" \
319 --interp-prefix=%{_libdir}/%{name}
322 # rebuild patched vesa tables with additional widescreen modes.
323 %{__make} -C roms/vgabios stdvga-bios
326 rm -rf $RPM_BUILD_ROOT
329 DESTDIR=$RPM_BUILD_ROOT
331 install -d $RPM_BUILD_ROOT%{_sysconfdir}
332 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ifup
338 rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-{doc,tech}.html
340 # install patched vesa tables with additional widescreen modes.
341 install -m 644 roms/vgabios/VGABIOS-lgpl-latest.stdvga.bin $RPM_BUILD_ROOT%{_datadir}/%{name}/vgabios-stdvga.bin
344 rm -rf $RPM_BUILD_ROOT
347 %defattr(644,root,root,755)
350 %defattr(644,root,root,755)
351 %doc README qemu-doc.html qemu-tech.html
352 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu-ifup
353 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu/target-*.conf
354 %dir %{_sysconfdir}/qemu
355 %attr(755,root,root) %{_bindir}/qemu-nbd
356 %{_mandir}/man1/qemu.1*
357 %{_mandir}/man8/qemu-nbd.8*
359 %dir %{_datadir}/qemu
360 %{_datadir}/%{name}/cpus-*.conf
361 %{_datadir}/%{name}/keymaps
362 # various bios images
363 %{_datadir}/%{name}/*.bin
364 %{_datadir}/%{name}/*.rom
365 %{_datadir}/%{name}/*.dtb
366 %{_datadir}/%{name}/openbios-ppc
367 %{_datadir}/%{name}/openbios-sparc*
368 %{_datadir}/%{name}/palcode-clipper
371 %defattr(644,root,root,755)
372 %attr(755,root,root) %{_bindir}/qemu-img
373 %{_mandir}/man1/qemu-img.1*
376 %defattr(644,root,root,755)
377 %attr(755,root,root) %{_bindir}/qemu-x86_64
378 %attr(755,root,root) %{_bindir}/qemu-i386
379 %attr(755,root,root) %{_bindir}/qemu-alpha
380 %attr(755,root,root) %{_bindir}/qemu-arm
381 %attr(755,root,root) %{_bindir}/qemu-armeb
382 %attr(755,root,root) %{_bindir}/qemu-cris
383 %attr(755,root,root) %{_bindir}/qemu-ga
384 %attr(755,root,root) %{_bindir}/qemu-io
385 %attr(755,root,root) %{_bindir}/qemu-m68k
386 %attr(755,root,root) %{_bindir}/qemu-microblaze
387 %attr(755,root,root) %{_bindir}/qemu-microblazeel
388 %attr(755,root,root) %{_bindir}/qemu-mips
389 %attr(755,root,root) %{_bindir}/qemu-mipsel
390 %attr(755,root,root) %{_bindir}/qemu-or32
391 %attr(755,root,root) %{_bindir}/qemu-ppc
392 %attr(755,root,root) %{_bindir}/qemu-ppc64
393 %attr(755,root,root) %{_bindir}/qemu-ppc64abi32
394 %attr(755,root,root) %{_bindir}/qemu-s390x
395 %attr(755,root,root) %{_bindir}/qemu-sh4
396 %attr(755,root,root) %{_bindir}/qemu-sh4eb
397 %attr(755,root,root) %{_bindir}/qemu-sparc
398 %attr(755,root,root) %{_bindir}/qemu-sparc32plus
399 %attr(755,root,root) %{_bindir}/qemu-sparc64
400 %attr(755,root,root) %{_bindir}/qemu-unicore32
403 %defattr(644,root,root,755)
404 %attr(755,root,root) %{_bindir}/qemu-system-alpha
407 %defattr(644,root,root,755)
408 %attr(755,root,root) %{_bindir}/qemu-system-arm
411 %defattr(644,root,root,755)
412 %attr(755,root,root) %{_bindir}/qemu-system-cris
415 %defattr(644,root,root,755)
416 %attr(755,root,root) %{_bindir}/qemu-system-lm32
419 %defattr(644,root,root,755)
420 %attr(755,root,root) %{_bindir}/qemu-system-m68k
422 %files system-microblaze
423 %defattr(644,root,root,755)
424 %attr(755,root,root) %{_bindir}/qemu-system-microblaze
425 %attr(755,root,root) %{_bindir}/qemu-system-microblazeel
428 %defattr(644,root,root,755)
429 %attr(755,root,root) %{_bindir}/qemu-system-mips
430 %attr(755,root,root) %{_bindir}/qemu-system-mipsel
431 %attr(755,root,root) %{_bindir}/qemu-system-mips64
432 %attr(755,root,root) %{_bindir}/qemu-system-mips64el
435 %defattr(644,root,root,755)
436 %attr(755,root,root) %{_bindir}/qemu-system-or32
439 %defattr(644,root,root,755)
440 %attr(755,root,root) %{_bindir}/qemu-system-ppc
441 %attr(755,root,root) %{_bindir}/qemu-system-ppc64
442 %attr(755,root,root) %{_bindir}/qemu-system-ppcemb
445 %defattr(644,root,root,755)
446 %attr(755,root,root) %{_bindir}/qemu-system-s390x
449 %defattr(644,root,root,755)
450 %attr(755,root,root) %{_bindir}/qemu-system-sh4
451 %attr(755,root,root) %{_bindir}/qemu-system-sh4eb
454 %defattr(644,root,root,755)
455 %attr(755,root,root) %{_bindir}/qemu-system-sparc
456 %attr(755,root,root) %{_bindir}/qemu-system-sparc64
458 %files system-unicore32
459 %defattr(644,root,root,755)
460 %attr(755,root,root) %{_bindir}/qemu-system-unicore32
463 %defattr(644,root,root,755)
464 %attr(755,root,root) %{_bindir}/qemu-system-i386
465 %attr(755,root,root) %{_bindir}/qemu-system-x86_64
468 %defattr(644,root,root,755)
469 %attr(755,root,root) %{_bindir}/qemu-system-xtensa
470 %attr(755,root,root) %{_bindir}/qemu-system-xtensaeb