]>
Commit | Line | Data |
---|---|---|
0b920c52 | 1 | # TODO: |
3d0e0752 | 2 | # - package virtfs-proxy-helper, qemu-bridge-helper. |
697b0ba8 | 3 | # - package qemu-system-or32 |
98a1a188 | 4 | # - update patches |
01b9430c | 5 | # - qemu-system-ppc -hda ac-ppc.img says: |
fabf5a9c | 6 | # qemu: could not open disk image ac-ppc.img: error "Success" |
01b9430c | 7 | # qemu-0.12.2-2.x86_64.rpm - broken |
cef095a4 | 8 | # qemu-0.12.3-3.x86_64/qemu-0.12.4-1.x86_64 - stops on "returning from prom_init" |
fabf5a9c ER |
9 | # qemu-0.15.0-2.x86_64.rpm - qemu-system-sparc/ppc booting with -kernel, -initrd options stalls in openbios prompt |
10 | # qemu-0.11.1-*.x86_64.rpm - OK | |
0b920c52 | 11 | # |
6aef4654 | 12 | # Conditional build: |
a6d3659e | 13 | %bcond_with nosdlgui # do not use SDL gui (use X11 instead) |
007877cb | 14 | |
cd19124e | 15 | Summary: QEMU CPU Emulator |
eec0535a | 16 | Summary(pl.UTF-8): QEMU - emulator procesora |
7b81d160 | 17 | Name: qemu |
697b0ba8 | 18 | Version: 1.2.0 |
ad857655 | 19 | Release: 1 |
5a2da1d0 JB |
20 | License: GPL |
21 | Group: Applications/Emulators | |
697b0ba8 PS |
22 | Source0: http://wiki.qemu.org/download/%{name}-%{version}.tar.bz2 |
23 | # Source0-md5: 78eb1e984f4532aa9f2bdd3c127b5b61 | |
9bcd4ab6 | 24 | Patch0: %{name}-cflags.patch |
d9002706 | 25 | Patch1: vgabios-widescreens.patch |
7b81d160 | 26 | Patch6: %{name}-nosdlgui.patch |
81a493f2 | 27 | # Proof of concept, for reference, do not remove |
7b81d160 | 28 | Patch8: %{name}-kde_virtual_workspaces_hack.patch |
ba4329df | 29 | Patch17: %{name}-whitelist.patch |
d6bd22e9 | 30 | URL: http://wiki.qemu.org/Index.html |
867764ba | 31 | BuildRequires: SDL-devel >= 1.2.1 |
b0b3ca8d | 32 | BuildRequires: alsa-lib-devel |
b99b1652 AM |
33 | BuildRequires: bluez-libs-devel |
34 | BuildRequires: gnutls-devel | |
98a1a188 | 35 | BuildRequires: ncurses-devel |
995bac8b | 36 | BuildRequires: perl-Encode |
2fb8ea02 | 37 | BuildRequires: perl-tools-pod |
ba84a935 | 38 | BuildRequires: pkgconfig |
8bb1261c | 39 | BuildRequires: sed >= 4.0 |
a1146336 | 40 | BuildRequires: texi2html |
22f71ecb | 41 | BuildRequires: texinfo |
cad677a4 | 42 | BuildRequires: which |
3d0e0752 | 43 | BuildRequires: xen-devel |
ba84a935 | 44 | BuildRequires: xorg-lib-libX11-devel |
fabf5a9c ER |
45 | Requires: %{name}-img = %{version}-%{release} |
46 | Requires: %{name}-system-alpha = %{version}-%{release} | |
47 | Requires: %{name}-system-arm = %{version}-%{release} | |
48 | Requires: %{name}-system-cris = %{version}-%{release} | |
49 | Requires: %{name}-system-lm32 = %{version}-%{release} | |
50 | Requires: %{name}-system-m68k = %{version}-%{release} | |
51 | Requires: %{name}-system-microblaze = %{version}-%{release} | |
52 | Requires: %{name}-system-mips = %{version}-%{release} | |
53 | Requires: %{name}-system-ppc = %{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-x86 = %{version}-%{release} | |
58 | Requires: %{name}-system-xtensa = %{version}-%{release} | |
59 | Requires: %{name}-user = %{version}-%{release} | |
2ef13cb9 | 60 | # sparc is currently unsupported (missing cpu_get_real_ticks() impl in vl.c) |
007877cb | 61 | ExclusiveArch: %{ix86} %{x8664} %{?with_userspace:ppc} |
cd19124e | 62 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
63 | ||
98a1a188 | 64 | # some PPC/SPARC boot image in ELF format |
22f71ecb | 65 | %define _noautostrip .*%{_datadir}/qemu/.*-.* |
a154aede | 66 | |
cd19124e | 67 | %description |
68 | QEMU is a FAST! processor emulator. By using dynamic translation it | |
69 | achieves a reasonnable speed while being easy to port on new host | |
70 | CPUs. QEMU has two operating modes: | |
71 | ||
72 | - User mode emulation. In this mode, QEMU can launch Linux processes | |
73 | compiled for one CPU on another CPU. Linux system calls are converted | |
74 | because of endianness and 32/64 bit mismatches. Wine (Windows | |
75 | emulation) and DOSEMU (DOS emulation) are the main targets for QEMU. | |
76 | ||
77 | - Full system emulation. In this mode, QEMU emulates a full system, | |
8799423b ER |
78 | including a processor and various peripherials. It can also be used to |
79 | provide virtual hosting of several virtual PC on a single server. | |
cd19124e | 80 | |
27b30e9c JR |
81 | %description -l pl.UTF-8 |
82 | QEMU to szybki(!) emulator procesora. Poprzez użycie dynamicznego | |
83 | tłumaczenia osiąga rozsądną szybkość i jest łatwy do przeportowania, | |
84 | aby działał na kolejnych procesorach. QEMU ma dwa tryby pracy: | |
5a2da1d0 | 85 | |
27b30e9c | 86 | - Emulacja trybu użytkownika. W tym trybie QEMU może uruchamiać |
5a2da1d0 | 87 | procesy linuksowe skompilowane dla jednego procesora na innym |
27b30e9c JR |
88 | procesorze. Linuksowe wywołania systemowe są tłumaczone ze względu na |
89 | niezgodność kolejności bajtów w słowie i 32/64-bitowego rozmiaru | |
90 | słowa. Wine (emulacja Windows) i DOSEMU (emulacja DOS-a) to główne | |
5a2da1d0 JB |
91 | cele QEMU. |
92 | ||
27b30e9c JR |
93 | - Pełna emulacja systemu. W tym trybie QEMU emuluje cały system, |
94 | włączając w to procesor i różne urządzenia peryferyjne. Może być także | |
95 | używane do wirtualnego hostowania kilku wirtualnych pecetów na | |
8799423b | 96 | pojedynczym serwerze. |
5a2da1d0 | 97 | |
fabf5a9c ER |
98 | %package common |
99 | Summary: QEMU common files needed by all QEMU targets | |
100 | Group: Development/Tools | |
101 | Requires: SDL >= 1.2.1 | |
102 | Conflicts: qemu < 1.0-2 | |
103 | ||
104 | %description common | |
105 | QEMU is a generic and open source processor emulator which achieves a | |
106 | good emulation speed by using dynamic translation. | |
107 | ||
108 | This package provides the common files needed by all QEMU targets. | |
109 | ||
110 | %package img | |
111 | Summary: QEMU command line tool for manipulating disk images | |
112 | Group: Development/Tools | |
113 | Conflicts: qemu < 1.0-2 | |
114 | ||
115 | %description img | |
116 | This package provides a command line tool for manipulating disk images | |
117 | ||
118 | %package user | |
119 | Summary: QEMU user mode emulation of qemu targets | |
120 | Group: Development/Tools | |
121 | Requires: %{name}-common = %{version}-%{release} | |
122 | ||
123 | %description user | |
124 | QEMU is a generic and open source processor emulator which achieves a | |
125 | good emulation speed by using dynamic translation. | |
126 | ||
127 | This package provides the user mode emulation of QEMU targets. | |
128 | ||
129 | %package system-alpha | |
130 | Summary: QEMU system emulator for alpha | |
131 | Group: Development/Tools | |
132 | Requires: %{name}-common = %{version}-%{release} | |
133 | ||
134 | %description system-alpha | |
135 | QEMU is a generic and open source processor emulator which achieves a | |
136 | good emulation speed by using dynamic translation. | |
137 | ||
138 | This package provides the system emulator for alpha. | |
139 | ||
140 | %package system-arm | |
141 | Summary: QEMU system emulator for arm | |
142 | Group: Development/Tools | |
143 | Requires: %{name}-common = %{version}-%{release} | |
144 | ||
145 | %description system-arm | |
146 | QEMU is a generic and open source processor emulator which achieves a | |
147 | good emulation speed by using dynamic translation. | |
148 | ||
149 | This package provides the system emulator for arm. | |
150 | ||
151 | %package system-cris | |
152 | Summary: QEMU system emulator for cris | |
153 | Group: Development/Tools | |
154 | Requires: %{name}-common = %{version}-%{release} | |
155 | ||
156 | %description system-cris | |
157 | QEMU is a generic and open source processor emulator which achieves a | |
158 | good emulation speed by using dynamic translation. | |
159 | ||
160 | This package provides the system emulator for cris. | |
161 | ||
162 | %package system-lm32 | |
163 | Summary: QEMU system emulator for lm32 | |
164 | Group: Development/Tools | |
165 | Requires: %{name}-common = %{version}-%{release} | |
166 | ||
167 | %description system-lm32 | |
168 | QEMU is a generic and open source processor emulator which achieves a | |
169 | good emulation speed by using dynamic translation. | |
170 | ||
171 | This package provides the system emulator for lm32. | |
172 | ||
173 | %package system-m68k | |
174 | Summary: QEMU system emulator for m68k | |
175 | Group: Development/Tools | |
176 | Requires: %{name}-common = %{version}-%{release} | |
177 | ||
178 | %description system-m68k | |
179 | QEMU is a generic and open source processor emulator which achieves a | |
180 | good emulation speed by using dynamic translation. | |
181 | ||
182 | This package provides the system emulator for m68k. | |
183 | ||
184 | %package system-microblaze | |
185 | Summary: QEMU system emulator for microblaze | |
186 | Group: Development/Tools | |
187 | Requires: %{name}-common = %{version}-%{release} | |
188 | ||
189 | %description system-microblaze | |
190 | QEMU is a generic and open source processor emulator which achieves a | |
191 | good emulation speed by using dynamic translation. | |
192 | ||
193 | This package provides the system emulator for microblaze. | |
194 | ||
195 | %package system-mips | |
196 | Summary: QEMU system emulator for mips | |
197 | Group: Development/Tools | |
198 | Requires: %{name}-common = %{version}-%{release} | |
199 | ||
200 | %description system-mips | |
201 | QEMU is a generic and open source processor emulator which achieves a | |
202 | good emulation speed by using dynamic translation. | |
203 | ||
204 | This package provides the system emulator for mips. | |
205 | ||
206 | %package system-ppc | |
207 | Summary: QEMU system emulator for ppc | |
208 | Group: Development/Tools | |
209 | Requires: %{name}-common = %{version}-%{release} | |
210 | ||
211 | %description system-ppc | |
212 | QEMU is a generic and open source processor emulator which achieves a | |
213 | good emulation speed by using dynamic translation. | |
214 | ||
215 | This package provides the system emulator for ppc. | |
216 | ||
217 | %package system-s390x | |
218 | Summary: QEMU system emulator for s390x | |
219 | Group: Development/Tools | |
220 | Requires: %{name}-common = %{version}-%{release} | |
221 | ||
222 | %description system-s390x | |
223 | QEMU is a generic and open source processor emulator which achieves a | |
224 | good emulation speed by using dynamic translation. | |
225 | ||
226 | This package provides the system emulator for s390x. | |
227 | ||
228 | %package system-sh4 | |
229 | Summary: QEMU system emulator for sh4 | |
230 | Group: Development/Tools | |
231 | Requires: %{name}-common = %{version}-%{release} | |
232 | ||
233 | %description system-sh4 | |
234 | QEMU is a generic and open source processor emulator which achieves a | |
235 | good emulation speed by using dynamic translation. | |
236 | ||
237 | This package provides the system emulator for sh4. | |
238 | ||
239 | %package system-sparc | |
240 | Summary: QEMU system emulator for sparc | |
241 | Group: Development/Tools | |
242 | Requires: %{name}-common = %{version}-%{release} | |
243 | ||
244 | %description system-sparc | |
245 | QEMU is a generic and open source processor emulator which achieves a | |
246 | good emulation speed by using dynamic translation. | |
247 | ||
248 | This package provides the system emulator for sparc/sparc64. | |
249 | ||
250 | %package system-x86 | |
251 | Summary: QEMU system emulator for x86 | |
252 | Group: Development/Tools | |
253 | Requires: %{name}-common = %{version}-%{release} | |
fabf5a9c ER |
254 | |
255 | %description system-x86 | |
256 | QEMU is a generic and open source processor emulator which achieves a | |
257 | good emulation speed by using dynamic translation. | |
258 | ||
259 | This package provides the system emulator for x86. When being run in a | |
260 | x86 machine that supports it, this package also provides the KVM | |
261 | virtualization platform. | |
262 | ||
263 | %package system-xtensa | |
264 | Summary: QEMU system emulator for xtensa | |
265 | Group: Development/Tools | |
266 | Requires: %{name}-common = %{version}-%{release} | |
267 | ||
268 | %description system-xtensa | |
269 | QEMU is a generic and open source processor emulator which achieves a | |
270 | good emulation speed by using dynamic translation. | |
271 | ||
272 | This package provides the system emulator for xtensa. | |
273 | ||
cd19124e | 274 | %prep |
c21a255a | 275 | %setup -q |
3c6e2290 | 276 | %patch0 -p1 |
d9002706 | 277 | %patch1 -p1 |
8d073aaa | 278 | %{?with_nosdlgui:%patch6 -p1} |
7b81d160 | 279 | #patch8 -p1 |
137653c3 | 280 | %patch17 -p0 |
0b920c52 | 281 | |
bd30ad73 GP |
282 | # workaround for conflict with alsa/error.h |
283 | ln -s ../error.h qapi/error.h | |
284 | ||
80bac37e | 285 | %build |
8bd2aee2 | 286 | ./configure \ |
3c6e2290 JR |
287 | --extra-cflags="%{rpmcflags} -I/usr/include/ncurses" \ |
288 | --extra-ldflags="%{rpmldflags}" \ | |
697b0ba8 | 289 | --disable-strip \ |
7c0786d1 | 290 | --sysconfdir=%{_sysconfdir} \ |
8bd2aee2 | 291 | --prefix=%{_prefix} \ |
98a1a188 AM |
292 | --cc="%{__cc}" \ |
293 | --host-cc="%{__cc}" \ | |
b99b1652 | 294 | --enable-mixemu \ |
98a1a188 | 295 | --audio-drv-list="alsa" \ |
7b81d160 | 296 | --interp-prefix=%{_libdir}/%{name} |
b74098c4 | 297 | %{__make} V=1 |
cd19124e | 298 | |
d9002706 PS |
299 | # rebuild patched vesa tables with additional widescreen modes. |
300 | %{__make} -C roms/vgabios stdvga-bios | |
301 | ||
cd19124e | 302 | %install |
303 | rm -rf $RPM_BUILD_ROOT | |
5a2da1d0 | 304 | |
cd19124e | 305 | %{__make} install \ |
306 | DESTDIR=$RPM_BUILD_ROOT | |
ac6e5743 | 307 | |
a91fea76 | 308 | install -d $RPM_BUILD_ROOT%{_sysconfdir} |
309 | cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ifup | |
ac6e5743 | 310 | #!/bin/sh |
a91fea76 | 311 | |
ac6e5743 | 312 | EOF |
a62a2d89 | 313 | |
c33439fc ER |
314 | # already packaged |
315 | rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-{doc,tech}.html | |
316 | ||
d9002706 PS |
317 | # install patched vesa tables with additional widescreen modes. |
318 | install -m 644 roms/vgabios/VGABIOS-lgpl-latest.stdvga.bin $RPM_BUILD_ROOT%{_datadir}/%{name}/vgabios-stdvga.bin | |
319 | ||
cd19124e | 320 | %clean |
321 | rm -rf $RPM_BUILD_ROOT | |
322 | ||
323 | %files | |
324 | %defattr(644,root,root,755) | |
fabf5a9c ER |
325 | |
326 | %files common | |
327 | %defattr(644,root,root,755) | |
867764ba | 328 | %doc README qemu-doc.html qemu-tech.html |
a91fea76 | 329 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu-ifup |
fabf5a9c | 330 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu/target-*.conf |
7c0786d1 | 331 | %dir %{_sysconfdir}/qemu |
fabf5a9c | 332 | %attr(755,root,root) %{_bindir}/qemu-nbd |
cd19124e | 333 | %{_mandir}/man1/qemu.1* |
98a1a188 | 334 | %{_mandir}/man8/qemu-nbd.8* |
fabf5a9c ER |
335 | |
336 | %dir %{_datadir}/qemu | |
3d0e0752 | 337 | %{_datadir}/%{name}/cpus-*.conf |
fabf5a9c ER |
338 | %{_datadir}/%{name}/keymaps |
339 | # various bios images | |
340 | %{_datadir}/%{name}/*.bin | |
341 | %{_datadir}/%{name}/*.rom | |
342 | %{_datadir}/%{name}/*.dtb | |
343 | %{_datadir}/%{name}/openbios-ppc | |
344 | %{_datadir}/%{name}/openbios-sparc* | |
345 | %{_datadir}/%{name}/palcode-clipper | |
346 | ||
347 | %files img | |
348 | %defattr(644,root,root,755) | |
349 | %attr(755,root,root) %{_bindir}/qemu-img | |
350 | %{_mandir}/man1/qemu-img.1* | |
351 | ||
352 | %files user | |
353 | %defattr(644,root,root,755) | |
354 | %attr(755,root,root) %{_bindir}/qemu-x86_64 | |
355 | %attr(755,root,root) %{_bindir}/qemu-i386 | |
356 | %attr(755,root,root) %{_bindir}/qemu-alpha | |
357 | %attr(755,root,root) %{_bindir}/qemu-arm | |
358 | %attr(755,root,root) %{_bindir}/qemu-armeb | |
359 | %attr(755,root,root) %{_bindir}/qemu-cris | |
360 | %attr(755,root,root) %{_bindir}/qemu-ga | |
361 | %attr(755,root,root) %{_bindir}/qemu-io | |
362 | %attr(755,root,root) %{_bindir}/qemu-m68k | |
363 | %attr(755,root,root) %{_bindir}/qemu-microblaze | |
364 | %attr(755,root,root) %{_bindir}/qemu-microblazeel | |
365 | %attr(755,root,root) %{_bindir}/qemu-mips | |
366 | %attr(755,root,root) %{_bindir}/qemu-mipsel | |
367 | %attr(755,root,root) %{_bindir}/qemu-ppc | |
368 | %attr(755,root,root) %{_bindir}/qemu-ppc64 | |
369 | %attr(755,root,root) %{_bindir}/qemu-ppc64abi32 | |
370 | %attr(755,root,root) %{_bindir}/qemu-s390x | |
371 | %attr(755,root,root) %{_bindir}/qemu-sh4 | |
372 | %attr(755,root,root) %{_bindir}/qemu-sh4eb | |
373 | %attr(755,root,root) %{_bindir}/qemu-sparc | |
374 | %attr(755,root,root) %{_bindir}/qemu-sparc32plus | |
375 | %attr(755,root,root) %{_bindir}/qemu-sparc64 | |
376 | %attr(755,root,root) %{_bindir}/qemu-unicore32 | |
377 | ||
378 | %files system-alpha | |
379 | %defattr(644,root,root,755) | |
380 | %attr(755,root,root) %{_bindir}/qemu-system-alpha | |
381 | ||
382 | %files system-arm | |
383 | %defattr(644,root,root,755) | |
384 | %attr(755,root,root) %{_bindir}/qemu-system-arm | |
385 | ||
386 | %files system-cris | |
387 | %defattr(644,root,root,755) | |
388 | %attr(755,root,root) %{_bindir}/qemu-system-cris | |
389 | ||
390 | %files system-lm32 | |
391 | %defattr(644,root,root,755) | |
392 | %attr(755,root,root) %{_bindir}/qemu-system-lm32 | |
393 | ||
394 | %files system-m68k | |
395 | %defattr(644,root,root,755) | |
396 | %attr(755,root,root) %{_bindir}/qemu-system-m68k | |
397 | ||
398 | %files system-microblaze | |
399 | %defattr(644,root,root,755) | |
400 | %attr(755,root,root) %{_bindir}/qemu-system-microblaze | |
401 | %attr(755,root,root) %{_bindir}/qemu-system-microblazeel | |
402 | ||
403 | %files system-mips | |
404 | %defattr(644,root,root,755) | |
405 | %attr(755,root,root) %{_bindir}/qemu-system-mips | |
406 | %attr(755,root,root) %{_bindir}/qemu-system-mipsel | |
407 | %attr(755,root,root) %{_bindir}/qemu-system-mips64 | |
408 | %attr(755,root,root) %{_bindir}/qemu-system-mips64el | |
409 | ||
410 | %files system-ppc | |
411 | %defattr(644,root,root,755) | |
412 | %attr(755,root,root) %{_bindir}/qemu-system-ppc | |
413 | %attr(755,root,root) %{_bindir}/qemu-system-ppc64 | |
414 | %attr(755,root,root) %{_bindir}/qemu-system-ppcemb | |
415 | ||
416 | %files system-s390x | |
417 | %defattr(644,root,root,755) | |
418 | %attr(755,root,root) %{_bindir}/qemu-system-s390x | |
419 | ||
420 | %files system-sh4 | |
421 | %defattr(644,root,root,755) | |
422 | %attr(755,root,root) %{_bindir}/qemu-system-sh4 | |
423 | %attr(755,root,root) %{_bindir}/qemu-system-sh4eb | |
424 | ||
425 | %files system-sparc | |
426 | %defattr(644,root,root,755) | |
427 | %attr(755,root,root) %{_bindir}/qemu-system-sparc | |
428 | %attr(755,root,root) %{_bindir}/qemu-system-sparc64 | |
429 | ||
430 | %files system-x86 | |
431 | %defattr(644,root,root,755) | |
432 | %attr(755,root,root) %{_bindir}/qemu-system-i386 | |
433 | %attr(755,root,root) %{_bindir}/qemu-system-x86_64 | |
434 | ||
435 | %files system-xtensa | |
436 | %defattr(644,root,root,755) | |
437 | %attr(755,root,root) %{_bindir}/qemu-system-xtensa | |
438 | %attr(755,root,root) %{_bindir}/qemu-system-xtensaeb |