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