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