Contents of /trunk/extras/virtualbox/virtualbox-3.0.0-r1.smage2
Parent Directory | Revision Log
Revision 2135 -
(show annotations)
(download)
Wed Jul 1 19:01:00 2009 UTC (15 years, 2 months ago) by niro
File size: 5738 byte(s)
Wed Jul 1 19:01:00 2009 UTC (15 years, 2 months ago) by niro
File size: 5738 byte(s)
auto added: ver bump to 3.0.0-r1
1 | # $Id$ |
2 | |
3 | PNAME="virtualbox" |
4 | PVER="3.0.0" |
5 | PBUILD="r1" |
6 | |
7 | PCATEGORIE="app-emulation" |
8 | STATE="unstable" |
9 | |
10 | DESCRIPTION="VirtualBox is a general-purpose full virtualizer for x86 hardware." |
11 | HOMEPAGE="http://www.virtualbox.de/" |
12 | |
13 | DEPEND=">= dev-libs/libidl-0.8.10 |
14 | >= dev-util/xalan-c-1.10.0 |
15 | >= dev-util/xerces-c-2.8.0 |
16 | >= media-libs/alsa-lib-1.0.19 |
17 | >= media-libs/libsdl-1.2.13 |
18 | >= x11-libs/qt4-4.5 |
19 | >= sys-apps/dbus-1.2 |
20 | >= sys-apps/hal-0.5.12 |
21 | >= x11-libs/libXcursor-1 |
22 | >= virtual/opengl |
23 | >= virtual/glut |
24 | >= dev-lang/python-2.6" |
25 | |
26 | SDEPEND=">= dev-lang/bin86-0.16 |
27 | >= dev-lang/dev86-0.16 |
28 | >= dev-util/iasl-2009 |
29 | >= dev-libs/libxml2-2.7 |
30 | >= dev-util/desktop-file-utils-0.15 |
31 | >= sys-apps/sed-4" |
32 | |
33 | SRCFILE="VirtualBox-${PVER}-OSE.tar.bz2" |
34 | SRCDIR="${BUILDDIR}/VirtualBox-${PVER}_OSE" |
35 | |
36 | # virtual box additions for guest clients |
37 | VBOX_ADDITIONS_ISO="VBoxGuestAdditions_${PVER}.iso" |
38 | VBOX_USER_MANUAL="UserManual.pdf" |
39 | |
40 | # wrapper cvs revision |
41 | VW_CVS_REV=1.7 |
42 | # config-tool cvs revision |
43 | VC_CVS_REV=1.9 |
44 | |
45 | # needed for postinstall |
46 | SPECIAL_VARS="VBOX_USER_MANUAL" |
47 | |
48 | sminclude mtools xdg qt4 |
49 | |
50 | SRC_URI=( |
51 | # http://download.virtualbox.org/${PNAME}/${PVER}/${SRCFILE} |
52 | # http://download.virtualbox.org/${PNAME}/${PVER}/${VBOX_ADDITIONS_ISO} |
53 | # http://download.virtualbox.org/${PNAME}/${PVER}/${VBOX_USER_MANUAL} |
54 | mirror://${PNAME}/${PVER}/${SRCFILE} |
55 | mirror://${PNAME}/${PVER}/${VBOX_ADDITIONS_ISO} |
56 | mirror://${PNAME}/${PVER}/${VBOX_USER_MANUAL} |
57 | mirror://${PNAME}/${PNAME}-wrapper.sh-${VW_CVS_REV} |
58 | mirror://${PNAME}/${PNAME}-config.sh-${VC_CVS_REV} |
59 | mirror://${PNAME}/interfaces |
60 | mirror://${PNAME}/${PNAME}-1.5.4-magellan.patch |
61 | ) |
62 | |
63 | UP2DATE="updatecmd http://www.virtualbox.de/wiki/Downloads | grep 'for Linux' | sed 's/.*ox\ \(.*\)\ for.*/\1/'" |
64 | |
65 | src_prepare() |
66 | { |
67 | munpack ${SRCFILE} || die |
68 | cd ${SRCDIR} |
69 | |
70 | # add magellan support to VBoxSysInfo.sh |
71 | mpatch ${PNAME}-1.5.4-magellan.patch || die |
72 | |
73 | # fixes compile issues with qt on magellan |
74 | # create a fake qtdir to fix /usr/include/qt issue without patching |
75 | install -d ${SRCDIR}/qt || die |
76 | ln -snf ${QTDIR}/bin ${SRCDIR}/qt || die |
77 | ln -snf ${QTDIR}/$(mlibdir) ${SRCDIR}/qt/lib || die |
78 | ln -snf ${QTDIR}/include/qt ${SRCDIR}/qt/include || die |
79 | |
80 | # do not build testcases to save compile time |
81 | echo 'VBOX_WITH_TESTCASES :=' > ${SRCDIR}/LocalConfig.kmk || die |
82 | echo 'VBOX_WITH_TESTSUITE :=' >> ${SRCDIR}/LocalConfig.kmk || die |
83 | } |
84 | |
85 | src_compile() |
86 | { |
87 | cd ${SRCDIR} |
88 | |
89 | # use our fake qt dir and disable pulseaudio support |
90 | ./configure --with-qt-dir="${SRCDIR}/qt" --disable-pulse || die |
91 | source ./env.sh || die |
92 | kmk ${MAKEOPTS} || die |
93 | } |
94 | |
95 | src_install() |
96 | { |
97 | # virtualbox installs binaries in x86 or amd64 out dir |
98 | local myarch |
99 | case ${ARCH} in |
100 | i*86) myarch=x86;; |
101 | x86_64) myarch=amd64;; |
102 | esac |
103 | |
104 | cd ${SRCDIR}/out/linux.${myarch}/release/bin |
105 | |
106 | # needed directories |
107 | minstalldir /etc/udev/rules.d || die |
108 | minstalldir /usr/$(mlibdir)/${PNAME} || die |
109 | minstalldir /usr/bin || die |
110 | minstalldir /usr/sbin || die |
111 | |
112 | # prune unneeded stuff |
113 | rm -v tst* || die |
114 | rm -rv testcase || die |
115 | rm -rv sdk || die |
116 | |
117 | # move binaries to dest |
118 | mv -v * ${BINDIR}/usr/$(mlibdir)/${PNAME} || die |
119 | |
120 | # fix permissions |
121 | chmod -v 0755 ${BINDIR}/usr/$(mlibdir)/${PNAME}/{,additions/}*.so || die |
122 | |
123 | # virtualbox needs now suid-bits to run |
124 | mchown root:virtualbox /usr/$(mlibdir)/${PNAME}/VirtualBox || die |
125 | mchown root:virtualbox /usr/$(mlibdir)/${PNAME}/VBoxSDL || die |
126 | mchown root:virtualbox /usr/$(mlibdir)/${PNAME}/VBoxHeadless || die |
127 | mchmod 4750 /usr/$(mlibdir)/${PNAME}/VirtualBox || die |
128 | mchmod 4750 /usr/$(mlibdir)/${PNAME}/VBoxSDL || die |
129 | mchmod 4750 /usr/$(mlibdir)/${PNAME}/VBoxHeadless || die |
130 | |
131 | # supply a additions.iso for client guest |
132 | minstallfile -s ${VBOX_ADDITIONS_ISO} /usr/$(mlibdir)/${PNAME}/additions/${VBOX_ADDITIONS_ISO/_${PVER}/} || die |
133 | |
134 | # install a wrapper for some apps |
135 | minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/virtualbox || die |
136 | minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/vboxmanage || die |
137 | minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/vboxsdl || die |
138 | minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/vboxbfe || die |
139 | minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/vboxvrdp || die |
140 | minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/vboxheadless || die |
141 | |
142 | # virtualbox-config |
143 | minstallexec -s ${PNAME}-config.sh-${VC_CVS_REV} /usr/sbin/${PNAME}-config || die |
144 | |
145 | # other needed applinks |
146 | mlink /usr/$(mlibdir)/${PNAME}/VBoxTunctl /usr/bin/vboxtunctl || die |
147 | |
148 | # fix libdir |
149 | local i |
150 | for i in virtualbox vboxmanage vboxsdl vboxbfe vboxvrdp vboxvheadless |
151 | do |
152 | sed -i "s:^\(LIBDIR=\).*:\1/usr/$(mlibdir):" ${BINDIR}/usr/bin/${i} || die |
153 | done |
154 | sed -i "s:^\(LIBDIR=\).*:\1/usr/$(mlibdir):" ${BINDIR}/usr/sbin/${PNAME}-config || die |
155 | |
156 | # install a udev rule |
157 | echo 'KERNEL=="vboxdrv", GROUP="virtualbox" MODE=660' > ${BINDIR}/etc/udev/rules.d/60-virtualbox.rules || die |
158 | |
159 | # install a nice destop entry |
160 | minstallpixmap ${SRCDIR}/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_64px.png ${PNAME}.png || die |
161 | minstall_desktop_icon \ |
162 | --name VirtualBox \ |
163 | --file ${PNAME} \ |
164 | --comment "Run and manage virtual machines" \ |
165 | --exec ${PNAME} \ |
166 | --icon ${PNAME}.png \ |
167 | --vendor innotek \ |
168 | --categories System,Emulator \ |
169 | || die |
170 | |
171 | # docs |
172 | cd ${SRCDIR} |
173 | minstalldocs ChangeLog COPYING || die |
174 | |
175 | # install usermanual |
176 | minstallfile -s ${VBOX_USER_MANUAL} /usr/share/doc/${PNAME}-${PVER} || die |
177 | } |
178 | |
179 | preinstall() |
180 | { |
181 | # adds virtualbox group |
182 | ${MLIBDIR}/mgroupadd virtualbox |
183 | } |
184 | |
185 | postinstall() |
186 | { |
187 | echo |
188 | echo "Please run virtualbox-config and add your users the 'virtualbox' group." |
189 | echo "For more information consult the user manual found at" |
190 | echo " http://virtualbox.de/download/${VBOX_USER_MANUAL}" |
191 | echo "or /usr/share/docs/${PNAME}-${PVER}/${VBOX_USER_MANUAL}" |
192 | echo |
193 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |