]> git.pld-linux.org Git - packages/qemu.git/blob - qemu.spec
patch vga bios to support additional widescreen modes (1600x1000, 1600x900). it looks...
[packages/qemu.git] / qemu.spec
1 # TODO:
2 # - package virtfs-proxy-helper, qemu-bridge-helper.
3 # - package qemu-system-or32
4 # - update patches
5 # - qemu-system-ppc -hda ac-ppc.img says:
6 #   qemu: could not open disk image ac-ppc.img: error "Success"
7 #   qemu-0.12.2-2.x86_64.rpm - broken
8 #   qemu-0.12.3-3.x86_64/qemu-0.12.4-1.x86_64 - stops on "returning from prom_init"
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
11 #
12 # Conditional build:
13 %bcond_with     nosdlgui                # do not use SDL gui (use X11 instead)
14
15 Summary:        QEMU CPU Emulator
16 Summary(pl.UTF-8):      QEMU - emulator procesora
17 Name:           qemu
18 Version:        1.2.0
19 Release:        1
20 License:        GPL
21 Group:          Applications/Emulators
22 Source0:        http://wiki.qemu.org/download/%{name}-%{version}.tar.bz2
23 # Source0-md5:  78eb1e984f4532aa9f2bdd3c127b5b61
24 Patch0:         %{name}-cflags.patch
25 Patch1:         vgabios-widescreens.patch
26 Patch6:         %{name}-nosdlgui.patch
27 # Proof of concept, for reference, do not remove
28 Patch8:         %{name}-kde_virtual_workspaces_hack.patch
29 Patch17:        %{name}-whitelist.patch
30 URL:            http://wiki.qemu.org/Index.html
31 BuildRequires:  SDL-devel >= 1.2.1
32 BuildRequires:  alsa-lib-devel
33 BuildRequires:  bluez-libs-devel
34 BuildRequires:  gnutls-devel
35 BuildRequires:  ncurses-devel
36 BuildRequires:  perl-Encode
37 BuildRequires:  perl-tools-pod
38 BuildRequires:  pkgconfig
39 BuildRequires:  sed >= 4.0
40 BuildRequires:  texi2html
41 BuildRequires:  texinfo
42 BuildRequires:  which
43 BuildRequires:  xen-devel
44 BuildRequires:  xorg-lib-libX11-devel
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}
60 # sparc is currently unsupported (missing cpu_get_real_ticks() impl in vl.c)
61 ExclusiveArch:  %{ix86} %{x8664} %{?with_userspace:ppc}
62 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63
64 # some PPC/SPARC boot image in ELF format
65 %define         _noautostrip    .*%{_datadir}/qemu/.*-.*
66
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,
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.
80
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:
85
86 - Emulacja trybu użytkownika. W tym trybie QEMU może uruchamiać
87   procesy linuksowe skompilowane dla jednego procesora na innym
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
91   cele QEMU.
92
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
96   pojedynczym serwerze.
97
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}
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
274 %prep
275 %setup -q
276 %patch0 -p1
277 %patch1 -p1
278 %{?with_nosdlgui:%patch6 -p1}
279 #patch8 -p1
280 %patch17 -p0
281
282 # workaround for conflict with alsa/error.h
283 ln -s ../error.h qapi/error.h
284
285 %build
286 ./configure \
287         --extra-cflags="%{rpmcflags} -I/usr/include/ncurses" \
288         --extra-ldflags="%{rpmldflags}" \
289         --disable-strip \
290         --sysconfdir=%{_sysconfdir} \
291         --prefix=%{_prefix} \
292         --cc="%{__cc}" \
293         --host-cc="%{__cc}" \
294         --enable-mixemu \
295         --audio-drv-list="alsa" \
296         --interp-prefix=%{_libdir}/%{name}
297 %{__make} V=1
298
299 # rebuild patched vesa tables with additional widescreen modes.
300 %{__make} -C roms/vgabios stdvga-bios
301
302 %install
303 rm -rf $RPM_BUILD_ROOT
304
305 %{__make} install \
306         DESTDIR=$RPM_BUILD_ROOT
307
308 install -d $RPM_BUILD_ROOT%{_sysconfdir}
309 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ifup
310 #!/bin/sh
311
312 EOF
313
314 # already packaged
315 rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-{doc,tech}.html
316
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
320 %clean
321 rm -rf $RPM_BUILD_ROOT
322
323 %files
324 %defattr(644,root,root,755)
325
326 %files common
327 %defattr(644,root,root,755)
328 %doc README qemu-doc.html qemu-tech.html
329 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu-ifup
330 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu/target-*.conf
331 %dir %{_sysconfdir}/qemu
332 %attr(755,root,root) %{_bindir}/qemu-nbd
333 %{_mandir}/man1/qemu.1*
334 %{_mandir}/man8/qemu-nbd.8*
335
336 %dir %{_datadir}/qemu
337 %{_datadir}/%{name}/cpus-*.conf
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
This page took 0.057247 seconds and 4 git commands to generate.