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