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