]> git.pld-linux.org Git - packages/qemu.git/blob - qemu.spec
- 0.12.4 broken as well
[packages/qemu.git] / qemu.spec
1 # TODO:
2 # - update patches
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
6 #   qemu-0.12.3-3.x86_64/qemu-0.12.4-1.x86_64 - stops on "returning from prom_init"
7 #   qemu-0.11.1-7k.x86_64.rpm - OK
8 #
9 # Conditional build:
10 %bcond_with     cflags_passing          # with passing rpmcflags to Makefiles
11 %bcond_with     dosguest                # add special patch when use with DOS as guest os
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:        0.12.4
18 Release:        1
19 License:        GPL
20 Group:          Applications/Emulators
21 # Source0Download: http://fabrice.bellard.free.fr/qemu/download.html
22 Source0:        http://download.savannah.gnu.org/releases/qemu/%{name}-%{version}.tar.gz
23 # Source0-md5:  93e6b134dff89b2799f57b7d9e0e0fc5
24 Patch0:         %{name}-ncurses.patch
25 Patch6:         %{name}-nosdlgui.patch
26 # Proof of concept, for reference, do not remove
27 Patch8:         %{name}-kde_virtual_workspaces_hack.patch
28 #Patch12: %{name}-0.7.2-dyngen-check-stack-clobbers.patch
29 Patch13:        %{name}-dosguest.patch
30 Patch14:        %{name}-ppc_old_binutils.patch
31 Patch15:        %{name}-isa-bios-ram.patch
32 # below one fixes problems with passing ram size to bios/bootloader
33 # which affects coreboot/linuxbios
34 Patch16:        %{name}-piix-ram-size.patch
35 Patch17:        %{name}-whitelist.patch
36 URL:            http://www.nongnu.org/qemu/
37 BuildRequires:  SDL-devel >= 1.2.1
38 BuildRequires:  alsa-lib-devel
39 BuildRequires:  bluez-libs-devel
40 BuildRequires:  gnutls-devel
41 BuildRequires:  ncurses-devel
42 BuildRequires:  perl-Encode
43 BuildRequires:  perl-tools-pod
44 BuildRequires:  pkgconfig
45 BuildRequires:  sed >= 4.0
46 BuildRequires:  texi2html
47 BuildRequires:  which
48 BuildRequires:  xorg-lib-libX11-devel
49 Requires:       SDL >= 1.2.1
50 # sparc is currently unsupported (missing cpu_get_real_ticks() impl in vl.c)
51 ExclusiveArch:  %{ix86} %{x8664} %{?with_userspace:ppc}
52 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54 # some PPC/SPARC boot image in ELF format
55 %define         _noautostrip    .*%{_datadir}/qemu/openbios-.*
56
57 %description
58 QEMU is a FAST! processor emulator. By using dynamic translation it
59 achieves a reasonnable speed while being easy to port on new host
60 CPUs. QEMU has two operating modes:
61
62 - User mode emulation. In this mode, QEMU can launch Linux processes
63   compiled for one CPU on another CPU. Linux system calls are converted
64   because of endianness and 32/64 bit mismatches. Wine (Windows
65   emulation) and DOSEMU (DOS emulation) are the main targets for QEMU.
66
67 - Full system emulation. In this mode, QEMU emulates a full system,
68   including a processor and various peripherials. It can also be used to
69   provide virtual hosting of several virtual PC on a single server.
70
71 %description -l pl.UTF-8
72 QEMU to szybki(!) emulator procesora. Poprzez użycie dynamicznego
73 tłumaczenia osiąga rozsądną szybkość i jest łatwy do przeportowania,
74 aby działał na kolejnych procesorach. QEMU ma dwa tryby pracy:
75
76 - Emulacja trybu użytkownika. W tym trybie QEMU może uruchamiać
77   procesy linuksowe skompilowane dla jednego procesora na innym
78   procesorze. Linuksowe wywołania systemowe są tłumaczone ze względu na
79   niezgodność kolejności bajtów w słowie i 32/64-bitowego rozmiaru
80   słowa. Wine (emulacja Windows) i DOSEMU (emulacja DOS-a) to główne
81   cele QEMU.
82
83 - Pełna emulacja systemu. W tym trybie QEMU emuluje cały system,
84   włączając w to procesor i różne urządzenia peryferyjne. Może być także
85   używane do wirtualnego hostowania kilku wirtualnych pecetów na
86   pojedynczym serwerze.
87
88 %prep
89 %setup -q
90 %patch0 -p1
91 %{?with_nosdlgui:%patch6 -p1}
92 #patch8 -p1
93 %patch17 -p0
94
95 %{__sed} -i -e 's/sdl_static=yes/sdl_static=no/' configure
96 %{__sed} -i 's/.*MAKE) -C kqemu$//' Makefile
97
98 # cannot use optflags on x86 - they cause "no register to spill" errors
99 %if %{with cflags_passing}
100 %{__sed} -i -e 's/-Wall -O2 -g/-Wall %{rpmcflags}/' Makefile Makefile.target
101 %else
102 %{__sed} -i 's/-Wall -O2 -g/-Wall -O2/' Makefile Makefile.target
103 %endif
104
105 %build
106 # --extra-cflags don't work (overridden by CFLAGS in Makefile*)
107 # they can be passed if the cflags_passing bcond is used
108 ./configure \
109         --prefix=%{_prefix} \
110         --cc="%{__cc}" \
111         --host-cc="%{__cc}" \
112         --make="%{__make}" \
113         --enable-mixemu \
114         --audio-drv-list="alsa" \
115         --interp-prefix=%{_libdir}/%{name}
116 %{__make}
117
118 %install
119 rm -rf $RPM_BUILD_ROOT
120
121 %{__make} install \
122         DESTDIR=$RPM_BUILD_ROOT
123
124 install -d $RPM_BUILD_ROOT%{_sysconfdir}
125 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ifup
126 #!/bin/sh
127
128 EOF
129
130 # already packaged
131 rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-{doc,tech}.html
132
133 %clean
134 rm -rf $RPM_BUILD_ROOT
135
136 %files
137 %defattr(644,root,root,755)
138 %doc README qemu-doc.html qemu-tech.html
139 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu-ifup
140 %attr(755,root,root) %{_bindir}/*
141 %{_datadir}/qemu
142 %{_mandir}/man1/qemu.1*
143 %{_mandir}/man1/qemu-img.1*
144 %{_mandir}/man8/qemu-nbd.8*
This page took 0.049136 seconds and 4 git commands to generate.