]>
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} | |
72ddf007 | 57 | Requires: %{name}-system-unicore32 = %{version}-%{release} |
fabf5a9c ER |
58 | Requires: %{name}-system-x86 = %{version}-%{release} |
59 | Requires: %{name}-system-xtensa = %{version}-%{release} | |
60 | Requires: %{name}-user = %{version}-%{release} | |
2ef13cb9 | 61 | # sparc is currently unsupported (missing cpu_get_real_ticks() impl in vl.c) |
007877cb | 62 | ExclusiveArch: %{ix86} %{x8664} %{?with_userspace:ppc} |
cd19124e | 63 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
64 | ||
98a1a188 | 65 | # some PPC/SPARC boot image in ELF format |
22f71ecb | 66 | %define _noautostrip .*%{_datadir}/qemu/.*-.* |
a154aede | 67 | |
cd19124e | 68 | %description |
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: | |
72 | ||
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. | |
77 | ||
78 | - Full system emulation. In this mode, QEMU emulates a full system, | |
8799423b ER |
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. | |
cd19124e | 81 | |
27b30e9c JR |
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: | |
5a2da1d0 | 86 | |
27b30e9c | 87 | - Emulacja trybu użytkownika. W tym trybie QEMU może uruchamiać |
5a2da1d0 | 88 | procesy linuksowe skompilowane dla jednego procesora na innym |
27b30e9c JR |
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 | |
5a2da1d0 JB |
92 | cele QEMU. |
93 | ||
27b30e9c JR |
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 | |
8799423b | 97 | pojedynczym serwerze. |
5a2da1d0 | 98 | |
fabf5a9c ER |
99 | %package common |
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 | |
104 | ||
105 | %description common | |
106 | QEMU is a generic and open source processor emulator which achieves a | |
107 | good emulation speed by using dynamic translation. | |
108 | ||
109 | This package provides the common files needed by all QEMU targets. | |
110 | ||
111 | %package img | |
112 | Summary: QEMU command line tool for manipulating disk images | |
113 | Group: Development/Tools | |
114 | Conflicts: qemu < 1.0-2 | |
115 | ||
116 | %description img | |
117 | This package provides a command line tool for manipulating disk images | |
118 | ||
119 | %package user | |
120 | Summary: QEMU user mode emulation of qemu targets | |
121 | Group: Development/Tools | |
122 | Requires: %{name}-common = %{version}-%{release} | |
123 | ||
124 | %description user | |
125 | QEMU is a generic and open source processor emulator which achieves a | |
126 | good emulation speed by using dynamic translation. | |
127 | ||
128 | This package provides the user mode emulation of QEMU targets. | |
129 | ||
130 | %package system-alpha | |
131 | Summary: QEMU system emulator for alpha | |
132 | Group: Development/Tools | |
133 | Requires: %{name}-common = %{version}-%{release} | |
134 | ||
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. | |
138 | ||
139 | This package provides the system emulator for alpha. | |
140 | ||
141 | %package system-arm | |
142 | Summary: QEMU system emulator for arm | |
143 | Group: Development/Tools | |
144 | Requires: %{name}-common = %{version}-%{release} | |
145 | ||
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. | |
149 | ||
150 | This package provides the system emulator for arm. | |
151 | ||
152 | %package system-cris | |
153 | Summary: QEMU system emulator for cris | |
154 | Group: Development/Tools | |
155 | Requires: %{name}-common = %{version}-%{release} | |
156 | ||
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. | |
160 | ||
161 | This package provides the system emulator for cris. | |
162 | ||
163 | %package system-lm32 | |
164 | Summary: QEMU system emulator for lm32 | |
165 | Group: Development/Tools | |
166 | Requires: %{name}-common = %{version}-%{release} | |
167 | ||
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. | |
171 | ||
172 | This package provides the system emulator for lm32. | |
173 | ||
174 | %package system-m68k | |
175 | Summary: QEMU system emulator for m68k | |
176 | Group: Development/Tools | |
177 | Requires: %{name}-common = %{version}-%{release} | |
178 | ||
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. | |
182 | ||
183 | This package provides the system emulator for m68k. | |
184 | ||
185 | %package system-microblaze | |
186 | Summary: QEMU system emulator for microblaze | |
187 | Group: Development/Tools | |
188 | Requires: %{name}-common = %{version}-%{release} | |
189 | ||
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. | |
193 | ||
194 | This package provides the system emulator for microblaze. | |
195 | ||
196 | %package system-mips | |
197 | Summary: QEMU system emulator for mips | |
198 | Group: Development/Tools | |
199 | Requires: %{name}-common = %{version}-%{release} | |
200 | ||
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. | |
204 | ||
205 | This package provides the system emulator for mips. | |
206 | ||
207 | %package system-ppc | |
208 | Summary: QEMU system emulator for ppc | |
209 | Group: Development/Tools | |
210 | Requires: %{name}-common = %{version}-%{release} | |
211 | ||
212 | %description system-ppc | |
213 | QEMU is a generic and open source processor emulator which achieves a | |
214 | good emulation speed by using dynamic translation. | |
215 | ||
216 | This package provides the system emulator for ppc. | |
217 | ||
218 | %package system-s390x | |
219 | Summary: QEMU system emulator for s390x | |
220 | Group: Development/Tools | |
221 | Requires: %{name}-common = %{version}-%{release} | |
222 | ||
223 | %description system-s390x | |
224 | QEMU is a generic and open source processor emulator which achieves a | |
225 | good emulation speed by using dynamic translation. | |
226 | ||
227 | This package provides the system emulator for s390x. | |
228 | ||
229 | %package system-sh4 | |
230 | Summary: QEMU system emulator for sh4 | |
231 | Group: Development/Tools | |
232 | Requires: %{name}-common = %{version}-%{release} | |
233 | ||
234 | %description system-sh4 | |
235 | QEMU is a generic and open source processor emulator which achieves a | |
236 | good emulation speed by using dynamic translation. | |
237 | ||
238 | This package provides the system emulator for sh4. | |
239 | ||
240 | %package system-sparc | |
241 | Summary: QEMU system emulator for sparc | |
242 | Group: Development/Tools | |
243 | Requires: %{name}-common = %{version}-%{release} | |
244 | ||
245 | %description system-sparc | |
246 | QEMU is a generic and open source processor emulator which achieves a | |
247 | good emulation speed by using dynamic translation. | |
248 | ||
249 | This package provides the system emulator for sparc/sparc64. | |
250 | ||
72ddf007 PS |
251 | %package system-unicore32 |
252 | Summary: QEMU system emulator for unicore32 | |
253 | Group: Development/Tools | |
254 | Requires: %{name}-common = %{version}-%{release} | |
255 | ||
256 | %description system-unicore32 | |
257 | QEMU is a generic and open source processor emulator which achieves a | |
258 | good emulation speed by using dynamic translation. | |
259 | ||
260 | This package provides the system emulator for unicore32. | |
261 | ||
fabf5a9c ER |
262 | %package system-x86 |
263 | Summary: QEMU system emulator for x86 | |
264 | Group: Development/Tools | |
265 | Requires: %{name}-common = %{version}-%{release} | |
fabf5a9c ER |
266 | |
267 | %description system-x86 | |
268 | QEMU is a generic and open source processor emulator which achieves a | |
269 | good emulation speed by using dynamic translation. | |
270 | ||
271 | This package provides the system emulator for x86. When being run in a | |
272 | x86 machine that supports it, this package also provides the KVM | |
273 | virtualization platform. | |
274 | ||
275 | %package system-xtensa | |
276 | Summary: QEMU system emulator for xtensa | |
277 | Group: Development/Tools | |
278 | Requires: %{name}-common = %{version}-%{release} | |
279 | ||
280 | %description system-xtensa | |
281 | QEMU is a generic and open source processor emulator which achieves a | |
282 | good emulation speed by using dynamic translation. | |
283 | ||
284 | This package provides the system emulator for xtensa. | |
285 | ||
cd19124e | 286 | %prep |
c21a255a | 287 | %setup -q |
3c6e2290 | 288 | %patch0 -p1 |
d9002706 | 289 | %patch1 -p1 |
8d073aaa | 290 | %{?with_nosdlgui:%patch6 -p1} |
7b81d160 | 291 | #patch8 -p1 |
137653c3 | 292 | %patch17 -p0 |
0b920c52 | 293 | |
bd30ad73 GP |
294 | # workaround for conflict with alsa/error.h |
295 | ln -s ../error.h qapi/error.h | |
296 | ||
80bac37e | 297 | %build |
8bd2aee2 | 298 | ./configure \ |
3c6e2290 JR |
299 | --extra-cflags="%{rpmcflags} -I/usr/include/ncurses" \ |
300 | --extra-ldflags="%{rpmldflags}" \ | |
697b0ba8 | 301 | --disable-strip \ |
7c0786d1 | 302 | --sysconfdir=%{_sysconfdir} \ |
8bd2aee2 | 303 | --prefix=%{_prefix} \ |
98a1a188 AM |
304 | --cc="%{__cc}" \ |
305 | --host-cc="%{__cc}" \ | |
b99b1652 | 306 | --enable-mixemu \ |
98a1a188 | 307 | --audio-drv-list="alsa" \ |
7b81d160 | 308 | --interp-prefix=%{_libdir}/%{name} |
b74098c4 | 309 | %{__make} V=1 |
cd19124e | 310 | |
d9002706 PS |
311 | # rebuild patched vesa tables with additional widescreen modes. |
312 | %{__make} -C roms/vgabios stdvga-bios | |
313 | ||
cd19124e | 314 | %install |
315 | rm -rf $RPM_BUILD_ROOT | |
5a2da1d0 | 316 | |
cd19124e | 317 | %{__make} install \ |
318 | DESTDIR=$RPM_BUILD_ROOT | |
ac6e5743 | 319 | |
a91fea76 | 320 | install -d $RPM_BUILD_ROOT%{_sysconfdir} |
321 | cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ifup | |
ac6e5743 | 322 | #!/bin/sh |
a91fea76 | 323 | |
ac6e5743 | 324 | EOF |
a62a2d89 | 325 | |
c33439fc ER |
326 | # already packaged |
327 | rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-{doc,tech}.html | |
328 | ||
d9002706 PS |
329 | # install patched vesa tables with additional widescreen modes. |
330 | install -m 644 roms/vgabios/VGABIOS-lgpl-latest.stdvga.bin $RPM_BUILD_ROOT%{_datadir}/%{name}/vgabios-stdvga.bin | |
331 | ||
cd19124e | 332 | %clean |
333 | rm -rf $RPM_BUILD_ROOT | |
334 | ||
335 | %files | |
336 | %defattr(644,root,root,755) | |
fabf5a9c ER |
337 | |
338 | %files common | |
339 | %defattr(644,root,root,755) | |
867764ba | 340 | %doc README qemu-doc.html qemu-tech.html |
a91fea76 | 341 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu-ifup |
fabf5a9c | 342 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu/target-*.conf |
7c0786d1 | 343 | %dir %{_sysconfdir}/qemu |
fabf5a9c | 344 | %attr(755,root,root) %{_bindir}/qemu-nbd |
cd19124e | 345 | %{_mandir}/man1/qemu.1* |
98a1a188 | 346 | %{_mandir}/man8/qemu-nbd.8* |
fabf5a9c ER |
347 | |
348 | %dir %{_datadir}/qemu | |
3d0e0752 | 349 | %{_datadir}/%{name}/cpus-*.conf |
fabf5a9c ER |
350 | %{_datadir}/%{name}/keymaps |
351 | # various bios images | |
352 | %{_datadir}/%{name}/*.bin | |
353 | %{_datadir}/%{name}/*.rom | |
354 | %{_datadir}/%{name}/*.dtb | |
355 | %{_datadir}/%{name}/openbios-ppc | |
356 | %{_datadir}/%{name}/openbios-sparc* | |
357 | %{_datadir}/%{name}/palcode-clipper | |
358 | ||
359 | %files img | |
360 | %defattr(644,root,root,755) | |
361 | %attr(755,root,root) %{_bindir}/qemu-img | |
362 | %{_mandir}/man1/qemu-img.1* | |
363 | ||
364 | %files user | |
365 | %defattr(644,root,root,755) | |
366 | %attr(755,root,root) %{_bindir}/qemu-x86_64 | |
367 | %attr(755,root,root) %{_bindir}/qemu-i386 | |
368 | %attr(755,root,root) %{_bindir}/qemu-alpha | |
369 | %attr(755,root,root) %{_bindir}/qemu-arm | |
370 | %attr(755,root,root) %{_bindir}/qemu-armeb | |
371 | %attr(755,root,root) %{_bindir}/qemu-cris | |
372 | %attr(755,root,root) %{_bindir}/qemu-ga | |
373 | %attr(755,root,root) %{_bindir}/qemu-io | |
374 | %attr(755,root,root) %{_bindir}/qemu-m68k | |
375 | %attr(755,root,root) %{_bindir}/qemu-microblaze | |
376 | %attr(755,root,root) %{_bindir}/qemu-microblazeel | |
377 | %attr(755,root,root) %{_bindir}/qemu-mips | |
378 | %attr(755,root,root) %{_bindir}/qemu-mipsel | |
379 | %attr(755,root,root) %{_bindir}/qemu-ppc | |
380 | %attr(755,root,root) %{_bindir}/qemu-ppc64 | |
381 | %attr(755,root,root) %{_bindir}/qemu-ppc64abi32 | |
382 | %attr(755,root,root) %{_bindir}/qemu-s390x | |
383 | %attr(755,root,root) %{_bindir}/qemu-sh4 | |
384 | %attr(755,root,root) %{_bindir}/qemu-sh4eb | |
385 | %attr(755,root,root) %{_bindir}/qemu-sparc | |
386 | %attr(755,root,root) %{_bindir}/qemu-sparc32plus | |
387 | %attr(755,root,root) %{_bindir}/qemu-sparc64 | |
388 | %attr(755,root,root) %{_bindir}/qemu-unicore32 | |
389 | ||
390 | %files system-alpha | |
391 | %defattr(644,root,root,755) | |
392 | %attr(755,root,root) %{_bindir}/qemu-system-alpha | |
393 | ||
394 | %files system-arm | |
395 | %defattr(644,root,root,755) | |
396 | %attr(755,root,root) %{_bindir}/qemu-system-arm | |
397 | ||
398 | %files system-cris | |
399 | %defattr(644,root,root,755) | |
400 | %attr(755,root,root) %{_bindir}/qemu-system-cris | |
401 | ||
402 | %files system-lm32 | |
403 | %defattr(644,root,root,755) | |
404 | %attr(755,root,root) %{_bindir}/qemu-system-lm32 | |
405 | ||
406 | %files system-m68k | |
407 | %defattr(644,root,root,755) | |
408 | %attr(755,root,root) %{_bindir}/qemu-system-m68k | |
409 | ||
410 | %files system-microblaze | |
411 | %defattr(644,root,root,755) | |
412 | %attr(755,root,root) %{_bindir}/qemu-system-microblaze | |
413 | %attr(755,root,root) %{_bindir}/qemu-system-microblazeel | |
414 | ||
415 | %files system-mips | |
416 | %defattr(644,root,root,755) | |
417 | %attr(755,root,root) %{_bindir}/qemu-system-mips | |
418 | %attr(755,root,root) %{_bindir}/qemu-system-mipsel | |
419 | %attr(755,root,root) %{_bindir}/qemu-system-mips64 | |
420 | %attr(755,root,root) %{_bindir}/qemu-system-mips64el | |
421 | ||
422 | %files system-ppc | |
423 | %defattr(644,root,root,755) | |
424 | %attr(755,root,root) %{_bindir}/qemu-system-ppc | |
425 | %attr(755,root,root) %{_bindir}/qemu-system-ppc64 | |
426 | %attr(755,root,root) %{_bindir}/qemu-system-ppcemb | |
427 | ||
428 | %files system-s390x | |
429 | %defattr(644,root,root,755) | |
430 | %attr(755,root,root) %{_bindir}/qemu-system-s390x | |
431 | ||
432 | %files system-sh4 | |
433 | %defattr(644,root,root,755) | |
434 | %attr(755,root,root) %{_bindir}/qemu-system-sh4 | |
435 | %attr(755,root,root) %{_bindir}/qemu-system-sh4eb | |
436 | ||
437 | %files system-sparc | |
438 | %defattr(644,root,root,755) | |
439 | %attr(755,root,root) %{_bindir}/qemu-system-sparc | |
440 | %attr(755,root,root) %{_bindir}/qemu-system-sparc64 | |
441 | ||
72ddf007 PS |
442 | %files system-unicore32 |
443 | %defattr(644,root,root,755) | |
444 | %attr(755,root,root) %{_bindir}/qemu-system-unicore32 | |
445 | ||
fabf5a9c ER |
446 | %files system-x86 |
447 | %defattr(644,root,root,755) | |
448 | %attr(755,root,root) %{_bindir}/qemu-system-i386 | |
449 | %attr(755,root,root) %{_bindir}/qemu-system-x86_64 | |
450 | ||
451 | %files system-xtensa | |
452 | %defattr(644,root,root,755) | |
453 | %attr(755,root,root) %{_bindir}/qemu-system-xtensa | |
454 | %attr(755,root,root) %{_bindir}/qemu-system-xtensaeb |