3 # - qemu-system-ppc -hda ac-ppc.img says:
4 # qemu: could not open disk image ac-ppc.img: error "Success"
5 # qemu-0.12.2-2.x86_64.rpm - broken
6 # qemu-0.12.3-3.x86_64/qemu-0.12.4-1.x86_64 - stops on "returning from prom_init"
7 # qemu-0.15.0-2.x86_64.rpm - qemu-system-sparc/ppc booting with -kernel, -initrd options stalls in openbios prompt
8 # qemu-0.11.1-*.x86_64.rpm - OK
11 %bcond_with cflags_passing # with passing rpmcflags to Makefiles
12 %bcond_with dosguest # add special patch when use with DOS as guest os
13 %bcond_with nosdlgui # do not use SDL gui (use X11 instead)
15 Summary: QEMU CPU Emulator
16 Summary(pl.UTF-8): QEMU - emulator procesora
21 Group: Applications/Emulators
22 Source0: http://wiki.qemu.org/download/%{name}-%{version}.tar.gz
23 # Source0-md5: a64b36067a191451323b0d34ebb44954
24 Patch0: %{name}-ncurses.patch
25 Patch6: %{name}-nosdlgui.patch
26 # Proof of concept, for reference, do not remove
27 Patch8: %{name}-kde_virtual_workspaces_hack.patch
28 #Patch12: %{name}-0.7.2-dyngen-check-stack-clobbers.patch
29 Patch13: %{name}-dosguest.patch
30 Patch14: %{name}-ppc_old_binutils.patch
31 Patch15: %{name}-isa-bios-ram.patch
32 # below one fixes problems with passing ram size to bios/bootloader
33 # which affects coreboot/linuxbios
34 Patch16: %{name}-piix-ram-size.patch
35 Patch17: %{name}-whitelist.patch
36 URL: http://wiki.qemu.org/Index.html
37 BuildRequires: SDL-devel >= 1.2.1
38 BuildRequires: alsa-lib-devel
39 BuildRequires: bluez-libs-devel
40 BuildRequires: gnutls-devel
41 BuildRequires: ncurses-devel
42 BuildRequires: perl-Encode
43 BuildRequires: perl-tools-pod
44 BuildRequires: pkgconfig
45 BuildRequires: sed >= 4.0
46 BuildRequires: texi2html
47 BuildRequires: texinfo
49 BuildRequires: xorg-lib-libX11-devel
50 Requires: %{name}-img = %{version}-%{release}
51 Requires: %{name}-system-alpha = %{version}-%{release}
52 Requires: %{name}-system-arm = %{version}-%{release}
53 Requires: %{name}-system-cris = %{version}-%{release}
54 Requires: %{name}-system-lm32 = %{version}-%{release}
55 Requires: %{name}-system-m68k = %{version}-%{release}
56 Requires: %{name}-system-microblaze = %{version}-%{release}
57 Requires: %{name}-system-mips = %{version}-%{release}
58 Requires: %{name}-system-ppc = %{version}-%{release}
59 Requires: %{name}-system-s390x = %{version}-%{release}
60 Requires: %{name}-system-sh4 = %{version}-%{release}
61 Requires: %{name}-system-sparc = %{version}-%{release}
62 Requires: %{name}-system-x86 = %{version}-%{release}
63 Requires: %{name}-system-xtensa = %{version}-%{release}
64 Requires: %{name}-user = %{version}-%{release}
65 # sparc is currently unsupported (missing cpu_get_real_ticks() impl in vl.c)
66 ExclusiveArch: %{ix86} %{x8664} %{?with_userspace:ppc}
67 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69 # some PPC/SPARC boot image in ELF format
70 %define _noautostrip .*%{_datadir}/qemu/.*-.*
73 QEMU is a FAST! processor emulator. By using dynamic translation it
74 achieves a reasonnable speed while being easy to port on new host
75 CPUs. QEMU has two operating modes:
77 - User mode emulation. In this mode, QEMU can launch Linux processes
78 compiled for one CPU on another CPU. Linux system calls are converted
79 because of endianness and 32/64 bit mismatches. Wine (Windows
80 emulation) and DOSEMU (DOS emulation) are the main targets for QEMU.
82 - Full system emulation. In this mode, QEMU emulates a full system,
83 including a processor and various peripherials. It can also be used to
84 provide virtual hosting of several virtual PC on a single server.
86 %description -l pl.UTF-8
87 QEMU to szybki(!) emulator procesora. Poprzez użycie dynamicznego
88 tłumaczenia osiąga rozsądną szybkość i jest łatwy do przeportowania,
89 aby działał na kolejnych procesorach. QEMU ma dwa tryby pracy:
91 - Emulacja trybu użytkownika. W tym trybie QEMU może uruchamiać
92 procesy linuksowe skompilowane dla jednego procesora na innym
93 procesorze. Linuksowe wywołania systemowe są tłumaczone ze względu na
94 niezgodność kolejności bajtów w słowie i 32/64-bitowego rozmiaru
95 słowa. Wine (emulacja Windows) i DOSEMU (emulacja DOS-a) to główne
98 - Pełna emulacja systemu. W tym trybie QEMU emuluje cały system,
99 włączając w to procesor i różne urządzenia peryferyjne. Może być także
100 używane do wirtualnego hostowania kilku wirtualnych pecetów na
101 pojedynczym serwerze.
104 Summary: QEMU common files needed by all QEMU targets
105 Group: Development/Tools
106 Requires: SDL >= 1.2.1
107 Conflicts: qemu < 1.0-2
110 QEMU is a generic and open source processor emulator which achieves a
111 good emulation speed by using dynamic translation.
113 This package provides the common files needed by all QEMU targets.
116 Summary: QEMU command line tool for manipulating disk images
117 Group: Development/Tools
118 Conflicts: qemu < 1.0-2
121 This package provides a command line tool for manipulating disk images
124 Summary: QEMU user mode emulation of qemu targets
125 Group: Development/Tools
126 Requires: %{name}-common = %{version}-%{release}
129 QEMU is a generic and open source processor emulator which achieves a
130 good emulation speed by using dynamic translation.
132 This package provides the user mode emulation of QEMU targets.
134 %package system-alpha
135 Summary: QEMU system emulator for alpha
136 Group: Development/Tools
137 Requires: %{name}-common = %{version}-%{release}
139 %description system-alpha
140 QEMU is a generic and open source processor emulator which achieves a
141 good emulation speed by using dynamic translation.
143 This package provides the system emulator for alpha.
146 Summary: QEMU system emulator for arm
147 Group: Development/Tools
148 Requires: %{name}-common = %{version}-%{release}
150 %description system-arm
151 QEMU is a generic and open source processor emulator which achieves a
152 good emulation speed by using dynamic translation.
154 This package provides the system emulator for arm.
157 Summary: QEMU system emulator for cris
158 Group: Development/Tools
159 Requires: %{name}-common = %{version}-%{release}
161 %description system-cris
162 QEMU is a generic and open source processor emulator which achieves a
163 good emulation speed by using dynamic translation.
165 This package provides the system emulator for cris.
168 Summary: QEMU system emulator for lm32
169 Group: Development/Tools
170 Requires: %{name}-common = %{version}-%{release}
172 %description system-lm32
173 QEMU is a generic and open source processor emulator which achieves a
174 good emulation speed by using dynamic translation.
176 This package provides the system emulator for lm32.
179 Summary: QEMU system emulator for m68k
180 Group: Development/Tools
181 Requires: %{name}-common = %{version}-%{release}
183 %description system-m68k
184 QEMU is a generic and open source processor emulator which achieves a
185 good emulation speed by using dynamic translation.
187 This package provides the system emulator for m68k.
189 %package system-microblaze
190 Summary: QEMU system emulator for microblaze
191 Group: Development/Tools
192 Requires: %{name}-common = %{version}-%{release}
194 %description system-microblaze
195 QEMU is a generic and open source processor emulator which achieves a
196 good emulation speed by using dynamic translation.
198 This package provides the system emulator for microblaze.
201 Summary: QEMU system emulator for mips
202 Group: Development/Tools
203 Requires: %{name}-common = %{version}-%{release}
205 %description system-mips
206 QEMU is a generic and open source processor emulator which achieves a
207 good emulation speed by using dynamic translation.
209 This package provides the system emulator for mips.
212 Summary: QEMU system emulator for ppc
213 Group: Development/Tools
214 Requires: %{name}-common = %{version}-%{release}
216 %description system-ppc
217 QEMU is a generic and open source processor emulator which achieves a
218 good emulation speed by using dynamic translation.
220 This package provides the system emulator for ppc.
222 %package system-s390x
223 Summary: QEMU system emulator for s390x
224 Group: Development/Tools
225 Requires: %{name}-common = %{version}-%{release}
227 %description system-s390x
228 QEMU is a generic and open source processor emulator which achieves a
229 good emulation speed by using dynamic translation.
231 This package provides the system emulator for s390x.
234 Summary: QEMU system emulator for sh4
235 Group: Development/Tools
236 Requires: %{name}-common = %{version}-%{release}
238 %description system-sh4
239 QEMU is a generic and open source processor emulator which achieves a
240 good emulation speed by using dynamic translation.
242 This package provides the system emulator for sh4.
244 %package system-sparc
245 Summary: QEMU system emulator for sparc
246 Group: Development/Tools
247 Requires: %{name}-common = %{version}-%{release}
249 %description system-sparc
250 QEMU is a generic and open source processor emulator which achieves a
251 good emulation speed by using dynamic translation.
253 This package provides the system emulator for sparc/sparc64.
256 Summary: QEMU system emulator for x86
257 Group: Development/Tools
258 Requires: %{name}-common = %{version}-%{release}
261 %description system-x86
262 QEMU is a generic and open source processor emulator which achieves a
263 good emulation speed by using dynamic translation.
265 This package provides the system emulator for x86. When being run in a
266 x86 machine that supports it, this package also provides the KVM
267 virtualization platform.
269 %package system-xtensa
270 Summary: QEMU system emulator for xtensa
271 Group: Development/Tools
272 Requires: %{name}-common = %{version}-%{release}
274 %description system-xtensa
275 QEMU is a generic and open source processor emulator which achieves a
276 good emulation speed by using dynamic translation.
278 This package provides the system emulator for xtensa.
283 %{?with_nosdlgui:%patch6 -p1}
287 %{__sed} -i -e 's/sdl_static=yes/sdl_static=no/' configure
288 %{__sed} -i 's/.*MAKE) -C kqemu$//' Makefile
290 # cannot use optflags on x86 - they cause "no register to spill" errors
291 %if %{with cflags_passing}
292 %{__sed} -i -e 's/-g $CFLAGS/-Wall %{rpmcflags}/' configure
294 %{__sed} -i 's/-g $CFLAGS/-Wall -fno-var-tracking-assignments/' configure
297 # workaround for conflict with alsa/error.h
298 ln -s ../error.h qapi/error.h
301 # --extra-cflags don't work (overridden by CFLAGS in Makefile*)
302 # they can be passed if the cflags_passing bcond is used
304 --sysconfdir=%{_sysconfdir} \
305 --prefix=%{_prefix} \
307 --host-cc="%{__cc}" \
309 --audio-drv-list="alsa" \
310 --interp-prefix=%{_libdir}/%{name}
314 rm -rf $RPM_BUILD_ROOT
317 DESTDIR=$RPM_BUILD_ROOT
319 install -d $RPM_BUILD_ROOT%{_sysconfdir}
320 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ifup
326 rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-{doc,tech}.html
329 rm -rf $RPM_BUILD_ROOT
332 %defattr(644,root,root,755)
335 %defattr(644,root,root,755)
336 %doc README qemu-doc.html qemu-tech.html
337 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu-ifup
338 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu/target-*.conf
339 %dir %{_sysconfdir}/qemu
340 %attr(755,root,root) %{_bindir}/qemu-nbd
341 %{_mandir}/man1/qemu.1*
342 %{_mandir}/man8/qemu-nbd.8*
344 %dir %{_datadir}/qemu
345 %{_datadir}/%{name}/keymaps
346 # various bios images
347 %{_datadir}/%{name}/*.bin
348 %{_datadir}/%{name}/*.rom
349 %{_datadir}/%{name}/*.dtb
350 %{_datadir}/%{name}/openbios-ppc
351 %{_datadir}/%{name}/openbios-sparc*
352 %{_datadir}/%{name}/palcode-clipper
355 %defattr(644,root,root,755)
356 %attr(755,root,root) %{_bindir}/qemu-img
357 %{_mandir}/man1/qemu-img.1*
360 %defattr(644,root,root,755)
361 %attr(755,root,root) %{_bindir}/qemu-x86_64
362 %attr(755,root,root) %{_bindir}/qemu-i386
363 %attr(755,root,root) %{_bindir}/qemu-alpha
364 %attr(755,root,root) %{_bindir}/qemu-arm
365 %attr(755,root,root) %{_bindir}/qemu-armeb
366 %attr(755,root,root) %{_bindir}/qemu-cris
367 %attr(755,root,root) %{_bindir}/qemu-ga
368 %attr(755,root,root) %{_bindir}/qemu-io
369 %attr(755,root,root) %{_bindir}/qemu-m68k
370 %attr(755,root,root) %{_bindir}/qemu-microblaze
371 %attr(755,root,root) %{_bindir}/qemu-microblazeel
372 %attr(755,root,root) %{_bindir}/qemu-mips
373 %attr(755,root,root) %{_bindir}/qemu-mipsel
374 %attr(755,root,root) %{_bindir}/qemu-ppc
375 %attr(755,root,root) %{_bindir}/qemu-ppc64
376 %attr(755,root,root) %{_bindir}/qemu-ppc64abi32
377 %attr(755,root,root) %{_bindir}/qemu-s390x
378 %attr(755,root,root) %{_bindir}/qemu-sh4
379 %attr(755,root,root) %{_bindir}/qemu-sh4eb
380 %attr(755,root,root) %{_bindir}/qemu-sparc
381 %attr(755,root,root) %{_bindir}/qemu-sparc32plus
382 %attr(755,root,root) %{_bindir}/qemu-sparc64
383 %attr(755,root,root) %{_bindir}/qemu-unicore32
386 %defattr(644,root,root,755)
387 %attr(755,root,root) %{_bindir}/qemu-system-alpha
390 %defattr(644,root,root,755)
391 %attr(755,root,root) %{_bindir}/qemu-system-arm
394 %defattr(644,root,root,755)
395 %attr(755,root,root) %{_bindir}/qemu-system-cris
398 %defattr(644,root,root,755)
399 %attr(755,root,root) %{_bindir}/qemu-system-lm32
402 %defattr(644,root,root,755)
403 %attr(755,root,root) %{_bindir}/qemu-system-m68k
405 %files system-microblaze
406 %defattr(644,root,root,755)
407 %attr(755,root,root) %{_bindir}/qemu-system-microblaze
408 %attr(755,root,root) %{_bindir}/qemu-system-microblazeel
411 %defattr(644,root,root,755)
412 %attr(755,root,root) %{_bindir}/qemu-system-mips
413 %attr(755,root,root) %{_bindir}/qemu-system-mipsel
414 %attr(755,root,root) %{_bindir}/qemu-system-mips64
415 %attr(755,root,root) %{_bindir}/qemu-system-mips64el
418 %defattr(644,root,root,755)
419 %attr(755,root,root) %{_bindir}/qemu-system-ppc
420 %attr(755,root,root) %{_bindir}/qemu-system-ppc64
421 %attr(755,root,root) %{_bindir}/qemu-system-ppcemb
424 %defattr(644,root,root,755)
425 %attr(755,root,root) %{_bindir}/qemu-system-s390x
428 %defattr(644,root,root,755)
429 %attr(755,root,root) %{_bindir}/qemu-system-sh4
430 %attr(755,root,root) %{_bindir}/qemu-system-sh4eb
433 %defattr(644,root,root,755)
434 %attr(755,root,root) %{_bindir}/qemu-system-sparc
435 %attr(755,root,root) %{_bindir}/qemu-system-sparc64
438 %defattr(644,root,root,755)
439 %attr(755,root,root) %{_bindir}/qemu-system-i386
440 %attr(755,root,root) %{_bindir}/qemu-system-x86_64
443 %defattr(644,root,root,755)
444 %attr(755,root,root) %{_bindir}/qemu-system-xtensa
445 %attr(755,root,root) %{_bindir}/qemu-system-xtensaeb