Magellan Linux

Contents of /trunk/extras/virtualbox/virtualbox-3.1.4-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

Name Value
svn:keywords Id