]> git.pld-linux.org Git - packages/qemu.git/blob - qemu.spec
- build kernel modules, now is broken without kqemu, NFY
[packages/qemu.git] / qemu.spec
1 #
2 # Conditional build:
3 %bcond_with     kqemu                   # with QEMU accelerator module
4 #
5 Summary:        QEMU CPU Emulator
6 Summary(pl):    QEMU - emulator procesora
7 Name:           qemu
8 Version:        0.7.0
9 Release:        1.1
10 License:        GPL
11 Group:          Applications/Emulators
12 #Source0Download: http://fabrice.bellard.free.fr/qemu/download.html
13 Source0:        http://fabrice.bellard.free.fr/qemu/%{name}-%{version}.tar.gz
14 # Source0-md5:  234e9ace03b00259bb57dc5a9c633056
15 %if %{with kqemu}
16 Source1:        http://fabrice.bellard.free.fr/qemu/kqemu-0.6.2-1.tar.gz
17 # NoSource1-md5:        c6bb3b40fb3d526d731eb0f1f9dee7ee
18 NoSource:       1
19 %endif
20 Patch0:         %{name}-nostatic.patch
21 Patch1:         %{name}-DESTDIR.patch
22 Patch2:         %{name}-longjmp.patch
23 Patch3:         %{name}-dot.patch
24 URL:            http://fabrice.bellard.free.fr/qemu/
25 BuildRequires:  SDL-devel >= 1.2.1
26 BuildRequires:  sed >= 4.0
27 ExclusiveArch:  %{ix86} %{x8664} ppc
28 # sparc is currently unsupported (missing cpu_get_real_ticks() impl in vl.c)
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 # some SPARC boot image in ELF format
32 %define         _noautostrip    .*%{_datadir}/qemu/proll.elf
33
34 %description
35 QEMU is a FAST! processor emulator. By using dynamic translation it
36 achieves a reasonnable speed while being easy to port on new host
37 CPUs. QEMU has two operating modes:
38
39 - User mode emulation. In this mode, QEMU can launch Linux processes
40   compiled for one CPU on another CPU. Linux system calls are converted
41   because of endianness and 32/64 bit mismatches. Wine (Windows
42   emulation) and DOSEMU (DOS emulation) are the main targets for QEMU.
43
44 - Full system emulation. In this mode, QEMU emulates a full system,
45   including a processor and various peripherials. 
46   It can also be used to provide virtual hosting of several 
47   virtual PC on a single server.
48
49 %description -l pl
50 QEMU to szybki(!) emulator procesora. Poprzez u¿ycie dynamicznego
51 t³umaczenia osi±ga rozs±dn± szybko¶æ i jest ³atwy do przeportowania,
52 aby dzia³a³ na kolejnych procesorach. QEMU ma dwa tryby pracy:
53
54 - Emulacja trybu u¿ytkownika. W tym trybie QEMU mo¿e uruchamiaæ
55   procesy linuksowe skompilowane dla jednego procesora na innym
56   procesorze. Linuksowe wywo³ania systemowe s± t³umaczone ze wzglêdu
57   na niezgodno¶æ kolejno¶ci bajtów w s³owie i 32/64-bitowego rozmiaru
58   s³owa. Wine (emulacja Windows) i DOSEMU (emulacja DOS-a) to g³ówne
59   cele QEMU.
60
61 - Pe³na emulacja systemu. W tym trybie QEMU emuluje ca³y system,
62   w³±czaj±c w to procesor i ró¿ne urz±dzenia peryferyjne.
63   Mo¿e byæ tak¿e u¿ywane do wirtualnego hostowania kilku wirtualnych 
64   pecetów na pojedynczym serwerze.
65
66 %prep
67 %setup -q %{?with_kqemu:-a1}
68 %patch0 -p1
69 %patch1 -p1
70 %patch2 -p1
71 %patch3 -p1
72
73 sed -i -e 's/sdl_static=yes/sdl_static=no/' configure
74 # cannot use optflags on x86 - they cause "no register to spill" errors
75 #sed -i -e 's/-Wall -O2 -g/-Wall %{rpmcflags}/' Makefile Makefile.target
76
77 %{?with_kqemu:echo -n > kqemu/install.sh}
78
79 %build
80
81 cp -rdp %{_kernelsrcdir}/ .
82 rm linux/.config
83 cp -f linux/config-smp linux/.config
84 make -C linux modules_prepare
85
86 # --extra-cflags don't work (overridden by CFLAGS in Makefile*)
87 ./configure \
88         --prefix=%{_prefix} \
89         --cc="%{__cc}" \
90         --make="%{__make}" \
91         --enable-kqemu \
92         --kernel-path=`pwd`/linux
93
94 %{__make} 
95 mv kqemu/kqemu.ko kqemu/kqemu.smp
96 cp -f linux/config-up linux/.config
97 make -C linux modules_prepare
98
99 %install
100 rm -rf $RPM_BUILD_ROOT
101
102 %{__make} install \
103         DESTDIR=$RPM_BUILD_ROOT
104
105 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
106 install kqemu/kqemu.smp $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/kqemu.ko
107 install kqemu/kqemu.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %files
113 %defattr(644,root,root,755)
114 %doc README qemu-doc.html qemu-tech.html
115 %attr(755,root,root) %{_bindir}/*
116 %{_datadir}/qemu
117 %{_mandir}/man1/qemu.1*
118 %{_mandir}/man1/qemu-img.1*
119 /lib/*
This page took 0.032071 seconds and 3 git commands to generate.