kvm: qemu: add qemu command line option description for -no-kvm-irqchip
[kvm-userspace.git] / kvm.spec
blobe200537ca3bd192185e6390505c431fe6c05baca
1 Name: kvm
2 Version: 0.0
3 Release: 0
4 Summary: Kernel Virtual Machine virtualization environment
6 Group: System Environment/Kernel
7 License: GPL
8 URL: http://www.qumranet.com
9 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
11 ExclusiveArch: i386 x86_64
13 Requires: kvm-kmod bridge-utils
15 %define Distribution %(cat /etc/redhat-release | awk '{ print $1}' | tr [A-Z] [a-z])
16 %define os_release %(rpm -q --qf '%%{version}' %{Distribution}-release)
18 %if %{Distribution} == "fedora" && %{os_release} == 5 || %{Distribution} == "centos" && %{os_release} == 4
19 BuildRequires: compat-gcc-32
20 %else
21 BuildRequires: compat-gcc-34
22 %endif
24 BuildRequires: SDL-devel zlib-devel alsa-lib-devel
26 %define _prebuilt %{?prebuilt:1}%{!?prebuilt:0}
28 %if !%{_prebuilt}
29 Source0: kvm.tar.gz
30 Source1: user.tar.gz
31 Source2: kernel.tar.gz
32 Source3: scripts.tar.gz
33 Source4: Makefile
34 Source5: configure
35 Source5: kvm_stat
36 %endif
38 %description
39 The Kernel Virtual Machine provides a virtualization enviroment for processors
40 with hardware support for virtualization: Intel's VT and AMD's AMD-V.
42 %prep
44 %if !%{_prebuilt}
45 %setup -T -b 0 -n qemu
46 %setup -T -b 1 -n user -D
47 %setup -T -b 2 -n kernel -D
48 %setup -T -b 3 -n scripts -D
49 cd ..
50 cp %{_sourcedir}/Makefile %{_sourcedir}/configure %{_sourcedir}/kvm_stat .
51 %endif
53 %build
55 rm -rf %{buildroot}
57 %if !%{_prebuilt}
58 cd ..
59 ./configure --prefix=/usr/kvm
60 make -C user
61 #(cd qemu;
62 # ./co
63 # kpath="$(readlink -f ../kernel/include)"
64 # upath="$(readlink -f ../user)"
65 # ./configure --target-list=$(uname -i)-softmmu \
66 # --extra-cflags="-I$kpath -I$upath" \
67 # --extra-ldflags="-L$upath" \
68 # --disable-kqemu --enable-kvm --prefix=/usr/kvm
70 make -C qemu
71 %endif
73 %install
75 %if !%{_prebuilt}
76 cd ..
77 %else
78 cd %{objdir}
79 %endif
81 make DESTDIR=%{buildroot} install-rpm
83 %define bindir /usr/bin
84 %define bin %{bindir}/kvm
85 %define initdir /etc/init.d
86 %define confdir /etc/kvm
87 %define utilsdir /etc/kvm/utils
89 %post
90 /sbin/chkconfig --level 2345 kvm on
91 /sbin/chkconfig --level 16 kvm off
92 /usr/sbin/groupadd -fg 444 kvm
94 %postun
96 %clean
97 %{__rm} -rf %{buildroot}
99 %files
100 /usr/bin/kvm
101 /usr/bin/kvm_stat
102 %{confdir}/qemu-ifup
103 %{initdir}/kvm
104 /etc/udev/rules.d/*kvm*.rules
105 /usr/kvm
106 %changelog