]> git.pld-linux.org Git - packages/qemu.git/blame - qemu.spec
Merge branch 'master' of git://git.pld-linux.org/packages/qemu
[packages/qemu.git] / qemu.spec
CommitLineData
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 13Summary: QEMU CPU Emulator
eec0535a 14Summary(pl.UTF-8): QEMU - emulator procesora
7b81d160 15Name: qemu
697b0ba8 16Version: 1.2.0
43927cd7 17Release: 4
5a2da1d0
JB
18License: GPL
19Group: Applications/Emulators
697b0ba8
PS
20Source0: http://wiki.qemu.org/download/%{name}-%{version}.tar.bz2
21# Source0-md5: 78eb1e984f4532aa9f2bdd3c127b5b61
9bcd4ab6 22Patch0: %{name}-cflags.patch
d9002706 23Patch1: vgabios-widescreens.patch
7b81d160 24Patch6: %{name}-nosdlgui.patch
81a493f2 25# Proof of concept, for reference, do not remove
7b81d160 26Patch8: %{name}-kde_virtual_workspaces_hack.patch
ba4329df 27Patch17: %{name}-whitelist.patch
d6bd22e9 28URL: http://wiki.qemu.org/Index.html
867764ba 29BuildRequires: SDL-devel >= 1.2.1
b0b3ca8d 30BuildRequires: alsa-lib-devel
b99b1652
AM
31BuildRequires: bluez-libs-devel
32BuildRequires: gnutls-devel
98a1a188 33BuildRequires: ncurses-devel
995bac8b 34BuildRequires: perl-Encode
2fb8ea02 35BuildRequires: perl-tools-pod
ba84a935 36BuildRequires: pkgconfig
8bb1261c 37BuildRequires: sed >= 4.0
a1146336 38BuildRequires: texi2html
22f71ecb 39BuildRequires: texinfo
cad677a4 40BuildRequires: which
3d0e0752 41BuildRequires: xen-devel
ba84a935 42BuildRequires: xorg-lib-libX11-devel
fabf5a9c
ER
43Requires: %{name}-img = %{version}-%{release}
44Requires: %{name}-system-alpha = %{version}-%{release}
45Requires: %{name}-system-arm = %{version}-%{release}
46Requires: %{name}-system-cris = %{version}-%{release}
47Requires: %{name}-system-lm32 = %{version}-%{release}
48Requires: %{name}-system-m68k = %{version}-%{release}
49Requires: %{name}-system-microblaze = %{version}-%{release}
50Requires: %{name}-system-mips = %{version}-%{release}
51Requires: %{name}-system-ppc = %{version}-%{release}
92c357d4 52Requires: %{name}-system-or32 = %{version}-%{release}
fabf5a9c
ER
53Requires: %{name}-system-s390x = %{version}-%{release}
54Requires: %{name}-system-sh4 = %{version}-%{release}
55Requires: %{name}-system-sparc = %{version}-%{release}
72ddf007 56Requires: %{name}-system-unicore32 = %{version}-%{release}
fabf5a9c
ER
57Requires: %{name}-system-x86 = %{version}-%{release}
58Requires: %{name}-system-xtensa = %{version}-%{release}
59Requires: %{name}-user = %{version}-%{release}
2ef13cb9 60# sparc is currently unsupported (missing cpu_get_real_ticks() impl in vl.c)
007877cb 61ExclusiveArch: %{ix86} %{x8664} %{?with_userspace:ppc}
cd19124e 62BuildRoot: %{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
68QEMU is a FAST! processor emulator. By using dynamic translation it
69achieves a reasonnable speed while being easy to port on new host
70CPUs. 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
82QEMU to szybki(!) emulator procesora. Poprzez użycie dynamicznego
83tłumaczenia osiąga rozsądną szybkość i jest łatwy do przeportowania,
84aby 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
99Summary: QEMU common files needed by all QEMU targets
100Group: Development/Tools
101Requires: SDL >= 1.2.1
102Conflicts: qemu < 1.0-2
103
104%description common
105QEMU is a generic and open source processor emulator which achieves a
106good emulation speed by using dynamic translation.
107
108This package provides the common files needed by all QEMU targets.
109
110%package img
111Summary: QEMU command line tool for manipulating disk images
112Group: Development/Tools
113Conflicts: qemu < 1.0-2
114
115%description img
116This package provides a command line tool for manipulating disk images
117
118%package user
119Summary: QEMU user mode emulation of qemu targets
120Group: Development/Tools
121Requires: %{name}-common = %{version}-%{release}
122
123%description user
124QEMU is a generic and open source processor emulator which achieves a
125good emulation speed by using dynamic translation.
126
127This package provides the user mode emulation of QEMU targets.
128
129%package system-alpha
130Summary: QEMU system emulator for alpha
131Group: Development/Tools
132Requires: %{name}-common = %{version}-%{release}
133
134%description system-alpha
135QEMU is a generic and open source processor emulator which achieves a
136good emulation speed by using dynamic translation.
137
138This package provides the system emulator for alpha.
139
140%package system-arm
141Summary: QEMU system emulator for arm
142Group: Development/Tools
143Requires: %{name}-common = %{version}-%{release}
144
145%description system-arm
146QEMU is a generic and open source processor emulator which achieves a
147good emulation speed by using dynamic translation.
148
149This package provides the system emulator for arm.
150
151%package system-cris
152Summary: QEMU system emulator for cris
153Group: Development/Tools
154Requires: %{name}-common = %{version}-%{release}
155
156%description system-cris
157QEMU is a generic and open source processor emulator which achieves a
158good emulation speed by using dynamic translation.
159
160This package provides the system emulator for cris.
161
162%package system-lm32
163Summary: QEMU system emulator for lm32
164Group: Development/Tools
165Requires: %{name}-common = %{version}-%{release}
166
167%description system-lm32
168QEMU is a generic and open source processor emulator which achieves a
169good emulation speed by using dynamic translation.
170
171This package provides the system emulator for lm32.
172
173%package system-m68k
174Summary: QEMU system emulator for m68k
175Group: Development/Tools
176Requires: %{name}-common = %{version}-%{release}
177
178%description system-m68k
179QEMU is a generic and open source processor emulator which achieves a
180good emulation speed by using dynamic translation.
181
182This package provides the system emulator for m68k.
183
184%package system-microblaze
185Summary: QEMU system emulator for microblaze
186Group: Development/Tools
187Requires: %{name}-common = %{version}-%{release}
188
189%description system-microblaze
190QEMU is a generic and open source processor emulator which achieves a
191good emulation speed by using dynamic translation.
192
193This package provides the system emulator for microblaze.
194
195%package system-mips
196Summary: QEMU system emulator for mips
197Group: Development/Tools
198Requires: %{name}-common = %{version}-%{release}
199
200%description system-mips
201QEMU is a generic and open source processor emulator which achieves a
202good emulation speed by using dynamic translation.
203
204This package provides the system emulator for mips.
205
92c357d4
PS
206%package system-or32
207Summary: QEMU system emulator for or32
208Group: Development/Tools
209Requires: %{name}-common = %{version}-%{release}
210
211%description system-or32
212QEMU is a generic and open source processor emulator which achieves a
213good emulation speed by using dynamic translation.
214
215This package provides the system emulator for or32.
216
fabf5a9c
ER
217%package system-ppc
218Summary: QEMU system emulator for ppc
219Group: Development/Tools
220Requires: %{name}-common = %{version}-%{release}
221
222%description system-ppc
223QEMU is a generic and open source processor emulator which achieves a
224good emulation speed by using dynamic translation.
225
226This package provides the system emulator for ppc.
227
228%package system-s390x
229Summary: QEMU system emulator for s390x
230Group: Development/Tools
231Requires: %{name}-common = %{version}-%{release}
232
233%description system-s390x
234QEMU is a generic and open source processor emulator which achieves a
235good emulation speed by using dynamic translation.
236
237This package provides the system emulator for s390x.
238
239%package system-sh4
240Summary: QEMU system emulator for sh4
241Group: Development/Tools
242Requires: %{name}-common = %{version}-%{release}
243
244%description system-sh4
245QEMU is a generic and open source processor emulator which achieves a
246good emulation speed by using dynamic translation.
247
248This package provides the system emulator for sh4.
249
250%package system-sparc
251Summary: QEMU system emulator for sparc
252Group: Development/Tools
253Requires: %{name}-common = %{version}-%{release}
254
255%description system-sparc
256QEMU is a generic and open source processor emulator which achieves a
257good emulation speed by using dynamic translation.
258
259This package provides the system emulator for sparc/sparc64.
260
72ddf007
PS
261%package system-unicore32
262Summary: QEMU system emulator for unicore32
263Group: Development/Tools
264Requires: %{name}-common = %{version}-%{release}
265
266%description system-unicore32
267QEMU is a generic and open source processor emulator which achieves a
268good emulation speed by using dynamic translation.
269
270This package provides the system emulator for unicore32.
271
fabf5a9c
ER
272%package system-x86
273Summary: QEMU system emulator for x86
274Group: Development/Tools
275Requires: %{name}-common = %{version}-%{release}
fabf5a9c
ER
276
277%description system-x86
278QEMU is a generic and open source processor emulator which achieves a
279good emulation speed by using dynamic translation.
280
281This package provides the system emulator for x86. When being run in a
282x86 machine that supports it, this package also provides the KVM
283virtualization platform.
284
285%package system-xtensa
286Summary: QEMU system emulator for xtensa
287Group: Development/Tools
288Requires: %{name}-common = %{version}-%{release}
289
290%description system-xtensa
291QEMU is a generic and open source processor emulator which achieves a
292good emulation speed by using dynamic translation.
293
294This package provides the system emulator for xtensa.
295
cd19124e 296%prep
c21a255a 297%setup -q
3c6e2290 298%patch0 -p1
d9002706 299%patch1 -p1
8d073aaa 300%{?with_nosdlgui:%patch6 -p1}
7b81d160 301#patch8 -p1
137653c3 302%patch17 -p0
0b920c52 303
bd30ad73
GP
304# workaround for conflict with alsa/error.h
305ln -s ../error.h qapi/error.h
306
80bac37e 307%build
8bd2aee2 308./configure \
3c6e2290
JR
309 --extra-cflags="%{rpmcflags} -I/usr/include/ncurses" \
310 --extra-ldflags="%{rpmldflags}" \
7c0786d1 311 --sysconfdir=%{_sysconfdir} \
8bd2aee2 312 --prefix=%{_prefix} \
98a1a188
AM
313 --cc="%{__cc}" \
314 --host-cc="%{__cc}" \
5263f8f5 315 --disable-strip \
b99b1652 316 --enable-mixemu \
98a1a188 317 --audio-drv-list="alsa" \
7b81d160 318 --interp-prefix=%{_libdir}/%{name}
5263f8f5
JB
319# note: CONFIG_QEMU_HELPERDIR is used when compiling, libexecdir when installing;
320# --libexecdir in configure is nop
321%{__make} \
322 V=1 \
323 CONFIG_QEMU_HELPERDIR="%{_libdir}"
cd19124e 324
d9002706
PS
325# rebuild patched vesa tables with additional widescreen modes.
326%{__make} -C roms/vgabios stdvga-bios
327
cd19124e 328%install
329rm -rf $RPM_BUILD_ROOT
5a2da1d0 330
cd19124e 331%{__make} install \
5263f8f5
JB
332 DESTDIR=$RPM_BUILD_ROOT \
333 libexecdir=%{_libdir}
ac6e5743 334
a91fea76 335install -d $RPM_BUILD_ROOT%{_sysconfdir}
336cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ifup
ac6e5743 337#!/bin/sh
a91fea76 338
ac6e5743 339EOF
a62a2d89 340
c33439fc 341# already packaged
5263f8f5
JB
342%{__rm} $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-{doc,tech}.html
343%{__rm} $RPM_BUILD_ROOT%{_docdir}/qemu/qmp-commands.txt
c33439fc 344
d9002706
PS
345# install patched vesa tables with additional widescreen modes.
346install -m 644 roms/vgabios/VGABIOS-lgpl-latest.stdvga.bin $RPM_BUILD_ROOT%{_datadir}/%{name}/vgabios-stdvga.bin
347
cd19124e 348%clean
349rm -rf $RPM_BUILD_ROOT
350
351%files
352%defattr(644,root,root,755)
fabf5a9c
ER
353
354%files common
355%defattr(644,root,root,755)
5263f8f5 356%doc README qemu-doc.html qemu-tech.html QMP/qmp-commands.txt
a91fea76 357%attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu-ifup
fabf5a9c 358%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu/target-*.conf
7c0786d1 359%dir %{_sysconfdir}/qemu
5263f8f5
JB
360%attr(755,root,root) %{_bindir}/virtfs-proxy-helper
361%attr(755,root,root) %{_bindir}/vscclient
fabf5a9c 362%attr(755,root,root) %{_bindir}/qemu-nbd
5263f8f5 363%attr(755,root,root) %{_libdir}/qemu-bridge-helper
cd19124e 364%{_mandir}/man1/qemu.1*
5263f8f5 365%{_mandir}/man1/virtfs-proxy-helper.1*
98a1a188 366%{_mandir}/man8/qemu-nbd.8*
fabf5a9c
ER
367
368%dir %{_datadir}/qemu
3d0e0752 369%{_datadir}/%{name}/cpus-*.conf
fabf5a9c 370%{_datadir}/%{name}/keymaps
5263f8f5 371%{_datadir}/%{name}/qemu-icon.bmp
fabf5a9c
ER
372# various bios images
373%{_datadir}/%{name}/*.bin
374%{_datadir}/%{name}/*.rom
375%{_datadir}/%{name}/*.dtb
376%{_datadir}/%{name}/openbios-ppc
377%{_datadir}/%{name}/openbios-sparc*
378%{_datadir}/%{name}/palcode-clipper
379
380%files img
381%defattr(644,root,root,755)
382%attr(755,root,root) %{_bindir}/qemu-img
383%{_mandir}/man1/qemu-img.1*
384
385%files user
386%defattr(644,root,root,755)
387%attr(755,root,root) %{_bindir}/qemu-x86_64
388%attr(755,root,root) %{_bindir}/qemu-i386
389%attr(755,root,root) %{_bindir}/qemu-alpha
390%attr(755,root,root) %{_bindir}/qemu-arm
391%attr(755,root,root) %{_bindir}/qemu-armeb
392%attr(755,root,root) %{_bindir}/qemu-cris
393%attr(755,root,root) %{_bindir}/qemu-ga
394%attr(755,root,root) %{_bindir}/qemu-io
395%attr(755,root,root) %{_bindir}/qemu-m68k
396%attr(755,root,root) %{_bindir}/qemu-microblaze
397%attr(755,root,root) %{_bindir}/qemu-microblazeel
398%attr(755,root,root) %{_bindir}/qemu-mips
399%attr(755,root,root) %{_bindir}/qemu-mipsel
92c357d4 400%attr(755,root,root) %{_bindir}/qemu-or32
fabf5a9c
ER
401%attr(755,root,root) %{_bindir}/qemu-ppc
402%attr(755,root,root) %{_bindir}/qemu-ppc64
403%attr(755,root,root) %{_bindir}/qemu-ppc64abi32
404%attr(755,root,root) %{_bindir}/qemu-s390x
405%attr(755,root,root) %{_bindir}/qemu-sh4
406%attr(755,root,root) %{_bindir}/qemu-sh4eb
407%attr(755,root,root) %{_bindir}/qemu-sparc
408%attr(755,root,root) %{_bindir}/qemu-sparc32plus
409%attr(755,root,root) %{_bindir}/qemu-sparc64
410%attr(755,root,root) %{_bindir}/qemu-unicore32
411
412%files system-alpha
413%defattr(644,root,root,755)
414%attr(755,root,root) %{_bindir}/qemu-system-alpha
415
416%files system-arm
417%defattr(644,root,root,755)
418%attr(755,root,root) %{_bindir}/qemu-system-arm
419
420%files system-cris
421%defattr(644,root,root,755)
422%attr(755,root,root) %{_bindir}/qemu-system-cris
423
424%files system-lm32
425%defattr(644,root,root,755)
426%attr(755,root,root) %{_bindir}/qemu-system-lm32
427
428%files system-m68k
429%defattr(644,root,root,755)
430%attr(755,root,root) %{_bindir}/qemu-system-m68k
431
432%files system-microblaze
433%defattr(644,root,root,755)
434%attr(755,root,root) %{_bindir}/qemu-system-microblaze
435%attr(755,root,root) %{_bindir}/qemu-system-microblazeel
436
437%files system-mips
438%defattr(644,root,root,755)
439%attr(755,root,root) %{_bindir}/qemu-system-mips
440%attr(755,root,root) %{_bindir}/qemu-system-mipsel
441%attr(755,root,root) %{_bindir}/qemu-system-mips64
442%attr(755,root,root) %{_bindir}/qemu-system-mips64el
443
92c357d4
PS
444%files system-or32
445%defattr(644,root,root,755)
446%attr(755,root,root) %{_bindir}/qemu-system-or32
447
fabf5a9c
ER
448%files system-ppc
449%defattr(644,root,root,755)
450%attr(755,root,root) %{_bindir}/qemu-system-ppc
451%attr(755,root,root) %{_bindir}/qemu-system-ppc64
452%attr(755,root,root) %{_bindir}/qemu-system-ppcemb
453
454%files system-s390x
455%defattr(644,root,root,755)
456%attr(755,root,root) %{_bindir}/qemu-system-s390x
457
458%files system-sh4
459%defattr(644,root,root,755)
460%attr(755,root,root) %{_bindir}/qemu-system-sh4
461%attr(755,root,root) %{_bindir}/qemu-system-sh4eb
462
463%files system-sparc
464%defattr(644,root,root,755)
465%attr(755,root,root) %{_bindir}/qemu-system-sparc
466%attr(755,root,root) %{_bindir}/qemu-system-sparc64
467
72ddf007
PS
468%files system-unicore32
469%defattr(644,root,root,755)
470%attr(755,root,root) %{_bindir}/qemu-system-unicore32
471
fabf5a9c
ER
472%files system-x86
473%defattr(644,root,root,755)
474%attr(755,root,root) %{_bindir}/qemu-system-i386
475%attr(755,root,root) %{_bindir}/qemu-system-x86_64
476
477%files system-xtensa
478%defattr(644,root,root,755)
479%attr(755,root,root) %{_bindir}/qemu-system-xtensa
480%attr(755,root,root) %{_bindir}/qemu-system-xtensaeb
This page took 0.161059 seconds and 4 git commands to generate.