]>
Commit | Line | Data |
---|---|---|
0b920c52 | 1 | # TODO: |
98a1a188 | 2 | # - update patches |
01b9430c ER |
3 | # - qemu-system-ppc -hda ac-ppc.img says: |
4 | # qemu: could not open disk image ac-ppc.img: Success | |
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" |
01b9430c | 7 | # qemu-0.11.1-7k.x86_64.rpm - OK |
0b920c52 | 8 | # |
6aef4654 | 9 | # Conditional build: |
161ffd93 | 10 | %bcond_with cflags_passing # with passing rpmcflags to Makefiles |
b4d7fbfb | 11 | %bcond_with dosguest # add special patch when use with DOS as guest os |
a6d3659e | 12 | %bcond_with nosdlgui # do not use SDL gui (use X11 instead) |
007877cb | 13 | |
cd19124e | 14 | Summary: QEMU CPU Emulator |
eec0535a | 15 | Summary(pl.UTF-8): QEMU - emulator procesora |
7b81d160 | 16 | Name: qemu |
b74098c4 | 17 | Version: 1.0 |
7c0786d1 | 18 | Release: 1 |
5a2da1d0 JB |
19 | License: GPL |
20 | Group: Applications/Emulators | |
c4b12b8b | 21 | # Source0Download: http://fabrice.bellard.free.fr/qemu/download.html |
06dce779 GP |
22 | #Source0: http://download.savannah.gnu.org/releases/qemu/%{name}-%{version}.tar.gz |
23 | Source0: http://wiki.qemu.org/download/%{name}-%{version}.tar.gz | |
b74098c4 | 24 | # Source0-md5: a64b36067a191451323b0d34ebb44954 |
7b81d160 | 25 | Patch0: %{name}-ncurses.patch |
26 | Patch6: %{name}-nosdlgui.patch | |
81a493f2 | 27 | # Proof of concept, for reference, do not remove |
7b81d160 | 28 | Patch8: %{name}-kde_virtual_workspaces_hack.patch |
ba4329df | 29 | #Patch12: %{name}-0.7.2-dyngen-check-stack-clobbers.patch |
7b81d160 | 30 | Patch13: %{name}-dosguest.patch |
31 | Patch14: %{name}-ppc_old_binutils.patch | |
32 | Patch15: %{name}-isa-bios-ram.patch | |
c9c22e78 ER |
33 | # below one fixes problems with passing ram size to bios/bootloader |
34 | # which affects coreboot/linuxbios | |
7b81d160 | 35 | Patch16: %{name}-piix-ram-size.patch |
ba4329df | 36 | Patch17: %{name}-whitelist.patch |
d6bd22e9 | 37 | URL: http://wiki.qemu.org/Index.html |
867764ba | 38 | BuildRequires: SDL-devel >= 1.2.1 |
b0b3ca8d | 39 | BuildRequires: alsa-lib-devel |
b99b1652 AM |
40 | BuildRequires: bluez-libs-devel |
41 | BuildRequires: gnutls-devel | |
98a1a188 | 42 | BuildRequires: ncurses-devel |
995bac8b | 43 | BuildRequires: perl-Encode |
2fb8ea02 | 44 | BuildRequires: perl-tools-pod |
ba84a935 | 45 | BuildRequires: pkgconfig |
8bb1261c | 46 | BuildRequires: sed >= 4.0 |
a1146336 | 47 | BuildRequires: texi2html |
cad677a4 | 48 | BuildRequires: which |
ba84a935 | 49 | BuildRequires: xorg-lib-libX11-devel |
8bb1261c | 50 | Requires: SDL >= 1.2.1 |
7c0786d1 | 51 | Obsoletes: qemu-kvm |
2ef13cb9 | 52 | # sparc is currently unsupported (missing cpu_get_real_ticks() impl in vl.c) |
007877cb | 53 | ExclusiveArch: %{ix86} %{x8664} %{?with_userspace:ppc} |
cd19124e | 54 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
55 | ||
98a1a188 | 56 | # some PPC/SPARC boot image in ELF format |
7c0786d1 | 57 | %define _noautostrip .*%{_datadir}/qemu/.*-.* |
a154aede | 58 | |
cd19124e | 59 | %description |
60 | QEMU is a FAST! processor emulator. By using dynamic translation it | |
61 | achieves a reasonnable speed while being easy to port on new host | |
62 | CPUs. QEMU has two operating modes: | |
63 | ||
64 | - User mode emulation. In this mode, QEMU can launch Linux processes | |
65 | compiled for one CPU on another CPU. Linux system calls are converted | |
66 | because of endianness and 32/64 bit mismatches. Wine (Windows | |
67 | emulation) and DOSEMU (DOS emulation) are the main targets for QEMU. | |
68 | ||
69 | - Full system emulation. In this mode, QEMU emulates a full system, | |
8799423b ER |
70 | including a processor and various peripherials. It can also be used to |
71 | provide virtual hosting of several virtual PC on a single server. | |
cd19124e | 72 | |
27b30e9c JR |
73 | %description -l pl.UTF-8 |
74 | QEMU to szybki(!) emulator procesora. Poprzez użycie dynamicznego | |
75 | tłumaczenia osiąga rozsądną szybkość i jest łatwy do przeportowania, | |
76 | aby działał na kolejnych procesorach. QEMU ma dwa tryby pracy: | |
5a2da1d0 | 77 | |
27b30e9c | 78 | - Emulacja trybu użytkownika. W tym trybie QEMU może uruchamiać |
5a2da1d0 | 79 | procesy linuksowe skompilowane dla jednego procesora na innym |
27b30e9c JR |
80 | procesorze. Linuksowe wywołania systemowe są tłumaczone ze względu na |
81 | niezgodność kolejności bajtów w słowie i 32/64-bitowego rozmiaru | |
82 | słowa. Wine (emulacja Windows) i DOSEMU (emulacja DOS-a) to główne | |
5a2da1d0 JB |
83 | cele QEMU. |
84 | ||
27b30e9c JR |
85 | - Pełna emulacja systemu. W tym trybie QEMU emuluje cały system, |
86 | włączając w to procesor i różne urządzenia peryferyjne. Może być także | |
87 | używane do wirtualnego hostowania kilku wirtualnych pecetów na | |
8799423b | 88 | pojedynczym serwerze. |
5a2da1d0 | 89 | |
cd19124e | 90 | %prep |
c21a255a | 91 | %setup -q |
a9a35ffb | 92 | %patch0 -p1 |
8d073aaa | 93 | %{?with_nosdlgui:%patch6 -p1} |
7b81d160 | 94 | #patch8 -p1 |
137653c3 | 95 | %patch17 -p0 |
0b920c52 MŁ |
96 | |
97 | %{__sed} -i -e 's/sdl_static=yes/sdl_static=no/' configure | |
8bb1261c | 98 | %{__sed} -i 's/.*MAKE) -C kqemu$//' Makefile |
cd19124e | 99 | |
c3048014 | 100 | # cannot use optflags on x86 - they cause "no register to spill" errors |
0b920c52 | 101 | %if %{with cflags_passing} |
f0ac4619 | 102 | %{__sed} -i -e 's/-g $CFLAGS/-Wall %{rpmcflags}/' configure |
57d8430f | 103 | %else |
f0ac4619 | 104 | %{__sed} -i 's/-g $CFLAGS/-Wall -fno-var-tracking-assignments/' configure |
0b920c52 | 105 | %endif |
c3048014 | 106 | |
bd30ad73 GP |
107 | # workaround for conflict with alsa/error.h |
108 | ln -s ../error.h qapi/error.h | |
109 | ||
80bac37e | 110 | %build |
c3048014 | 111 | # --extra-cflags don't work (overridden by CFLAGS in Makefile*) |
0b920c52 | 112 | # they can be passed if the cflags_passing bcond is used |
8bd2aee2 | 113 | ./configure \ |
7c0786d1 | 114 | --sysconfdir=%{_sysconfdir} \ |
8bd2aee2 | 115 | --prefix=%{_prefix} \ |
98a1a188 AM |
116 | --cc="%{__cc}" \ |
117 | --host-cc="%{__cc}" \ | |
b99b1652 | 118 | --enable-mixemu \ |
98a1a188 | 119 | --audio-drv-list="alsa" \ |
7b81d160 | 120 | --interp-prefix=%{_libdir}/%{name} |
b74098c4 | 121 | %{__make} V=1 |
cd19124e | 122 | |
123 | %install | |
124 | rm -rf $RPM_BUILD_ROOT | |
5a2da1d0 | 125 | |
cd19124e | 126 | %{__make} install \ |
127 | DESTDIR=$RPM_BUILD_ROOT | |
ac6e5743 | 128 | |
a91fea76 | 129 | install -d $RPM_BUILD_ROOT%{_sysconfdir} |
130 | cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ifup | |
ac6e5743 | 131 | #!/bin/sh |
a91fea76 | 132 | |
ac6e5743 | 133 | EOF |
a62a2d89 | 134 | |
c33439fc ER |
135 | # already packaged |
136 | rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-{doc,tech}.html | |
137 | ||
cd19124e | 138 | %clean |
139 | rm -rf $RPM_BUILD_ROOT | |
140 | ||
141 | %files | |
142 | %defattr(644,root,root,755) | |
867764ba | 143 | %doc README qemu-doc.html qemu-tech.html |
a91fea76 | 144 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu-ifup |
003e2129 | 145 | %attr(755,root,root) %{_bindir}/* |
146 | %{_datadir}/qemu | |
7c0786d1 AM |
147 | %dir %{_sysconfdir}/qemu |
148 | %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu/target-*.conf | |
cd19124e | 149 | %{_mandir}/man1/qemu.1* |
867764ba | 150 | %{_mandir}/man1/qemu-img.1* |
98a1a188 | 151 | %{_mandir}/man8/qemu-nbd.8* |