Contents of /branches/R11-stable/extras/qemu-kvm/qemu-kvm-1.2.0-r1.smage2
Parent Directory
|
Revision Log
Revision 15342 -
(show annotations)
(download)
Wed Jan 2 11:32:02 2013 UTC (11 years, 4 months ago) by niro
File size: 3744 byte(s)
Wed Jan 2 11:32:02 2013 UTC (11 years, 4 months ago) by niro
File size: 3744 byte(s)
-release branches/R11-stable
1 | # $Id$ |
2 | |
3 | PNAME="qemu-kvm" |
4 | PVER="1.2.0" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="app-emulation" |
8 | |
9 | DESCRIPTION="KVM QEMU is a generic processor emulator which achieves a good emulation speed by using dynamic translation." |
10 | HOMEPAGE="http://www.linux-kvm.org/" |
11 | |
12 | DEPEND=">= dev-libs/glib2-2.34 |
13 | >= dev-libs/cyrus-sasl-2.1 |
14 | >= dev-libs/nss-3.13 |
15 | >= app-crypt/gnutls-2.12 |
16 | >= media-libs/libjpeg-8 |
17 | >= media-libs/libpng-1.5 |
18 | >= media-libs/libsdl-1.2.15 |
19 | >= media-libs/alsa-lib-1.0.26 |
20 | >= media-sound/libpulse-2.1 |
21 | >= net-misc/curl-7 |
22 | >= net-wlan/bluez-libs-4.99 |
23 | >= sys-libs/ncurses-5.9 |
24 | >= sys-apps/iproute2-3.3 |
25 | >= net-misc/bridge-utils-1.5 |
26 | >= net-misc/vde2-2.3 |
27 | >= sys-apps/attr-2.4 |
28 | >= sys-apps/pciutils-3.1 |
29 | >= sys-apps/seabios-1.7 |
30 | >= sys-apps/vgabios-0.7 |
31 | >= sys-libs/libuuid-2.22 |
32 | >= virtual/opengl |
33 | >= app-emulation/qemu-networking-3" |
34 | |
35 | SDEPEND=">= dev-lang/perl-5.14 |
36 | >= dev-lang/python-2.7" |
37 | |
38 | PROVIDE="virtual/qemu" |
39 | |
40 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
41 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
42 | |
43 | sminclude mbuild mtools |
44 | |
45 | SRC_URI=( |
46 | sourceforge://${PNAME/qemu-/}/${SRCFILE} |
47 | mirror://${PNAME}/${SRCFILE} |
48 | ) |
49 | |
50 | # exclude rc versions |
51 | UP2EXCLUDE="-rc" |
52 | UP2DATE="updatecmd_sourceforge ${PNAME/qemu-/} ${PNAME} gz" |
53 | |
54 | src_compile() |
55 | { |
56 | cd ${SRCDIR} |
57 | |
58 | # non-autotools configure scripts |
59 | ./configure \ |
60 | --prefix=/usr \ |
61 | --sysconfdir=/etc \ |
62 | --disable-strip \ |
63 | --disable-werror \ |
64 | --disable-libiscsi \ |
65 | --disable-usb-redir \ |
66 | --enable-kvm \ |
67 | --enable-pie \ |
68 | --enable-nptl \ |
69 | --enable-attr \ |
70 | --enable-bluez \ |
71 | --enable-curl \ |
72 | --enable-curses \ |
73 | --enable-opengl \ |
74 | --enable-sdl \ |
75 | --enable-smartcard \ |
76 | --enable-smartcard-nss \ |
77 | --enable-tcg-interpreter \ |
78 | --enable-uuid \ |
79 | --enable-vde \ |
80 | --enable-vnc-jpeg \ |
81 | --enable-vnc-png \ |
82 | --enable-vnc-sasl \ |
83 | --enable-vnc-tls \ |
84 | --audio-drv-list=alsa,sdl,oss,pa \ |
85 | --audio-card-list=ac97,sb16,es1370,hda \ |
86 | || die |
87 | |
88 | mmake || die |
89 | } |
90 | |
91 | src_install() |
92 | { |
93 | cd ${SRCDIR} |
94 | mmake DESTDIR=${BINDIR} install || die |
95 | |
96 | # provided by seabios |
97 | rm ${BINDIR}/usr/share/qemu/bios.bin || die |
98 | mlink ../seabios/bios.bin /usr/share/qemu/bios.bin || die |
99 | |
100 | # provided by vgabios |
101 | rm ${BINDIR}/usr/share/qemu/vgabios.bin || die |
102 | rm ${BINDIR}/usr/share/qemu/vgabios-cirrus.bin || die |
103 | rm ${BINDIR}/usr/share/qemu/vgabios-qxl.bin || die |
104 | rm ${BINDIR}/usr/share/qemu/vgabios-stdvga.bin || die |
105 | rm ${BINDIR}/usr/share/qemu/vgabios-vmware.bin || die |
106 | mlink ../vgabios/vgabios.bin /usr/share/qemu/vgabios.bin || die |
107 | mlink ../vgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin || die |
108 | mlink ../vgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin || die |
109 | mlink ../vgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin || die |
110 | mlink ../vgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin || die |
111 | |
112 | # arch is always x86_64 with kvm enabled qemu |
113 | local myarch=x86_64 |
114 | # symbolic link for backwards compatibility |
115 | mlink qemu-system-${myarch} /usr/bin/qemu-kvm || die |
116 | # symbolic link for to qemu binary for emulator apps |
117 | mlink qemu-system-${myarch} /usr/bin/qemu || die |
118 | # symbolic link for to qemu binary for emulator apps |
119 | mlink qemu-system-${myarch} /usr/bin/kvm || die |
120 | |
121 | # fix man page |
122 | mv ${BINDIR}/usr/share/man/man1/qemu{,-kvm}.1 || die |
123 | |
124 | # install udev rules |
125 | echo 'KERNEL=="kvm", GROUP="kvm", MODE="0660' > ${SRCDIR}/65-qemu-kvm.rules || die |
126 | minstalludevrule ${SRCDIR}/65-qemu-kvm.rules || die |
127 | |
128 | minstalldocs Changelog CODING_STYLE COPYING* HACKING LICENSE MAINTAINERS README TODO || die |
129 | } |
130 | |
131 | preinstall() |
132 | { |
133 | mgroupadd kvm |
134 | } |
135 | |
136 | postinstall() |
137 | { |
138 | # reload udev rule |
139 | if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]] |
140 | then |
141 | [[ -x /bin/udevadm ]] && udevadm control --reload |
142 | fi |
143 | } |
144 | |
145 | postremove() |
146 | { |
147 | # reload udev rule |
148 | if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]] |
149 | then |
150 | [[ -x /bin/udevadm ]] && udevadm control --reload |
151 | fi |
152 | } |