Magellan Linux

Annotation of /trunk/extras/virtualbox/virtualbox-3.1.4-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5153 - (hide annotations) (download)
Sun Apr 4 16:49:44 2010 UTC (14 years, 1 month ago) by niro
File size: 6990 byte(s)
auto added: ver bump to 3.1.4-r3
1 niro 5153 # $Id$
2    
3     PNAME="virtualbox"
4     PVER="3.1.4"
5     PBUILD="r3"
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.12
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-2.patch
66     mirror://${PNAME}/${PNAME}-${PVER}-additions-magellan.patch
67     mirror://${PNAME}/${PNAME}-${PVER}-vboxdrv-magellan.patch
68     )
69    
70     UP2DATE="updatecmd http://www.virtualbox.de/wiki/Downloads | grep 'for Linux' | sed 's/.*ox\ \(.*\)\ for.*/\1/'"
71    
72     src_prepare()
73     {
74     munpack ${SRCFILE} || die
75     cd ${SRCDIR}
76    
77     # add magellan support to VBoxSysInfo.sh
78     mpatch ${PNAME}-1.5.4-magellan.patch || die
79    
80     # magellan-branding, enables "magellan" guest-definitions
81     mpatch ${PNAME}-${PVER}-magellan-branding-2.patch || die
82    
83     # add magellan support to additions installers
84     mpatch ${PNAME}-${PVER}-additions-magellan.patch || die
85    
86     # add magellan support to vboxdrv installer
87     mpatch ${PNAME}-${PVER}-vboxdrv-magellan.patch || die
88    
89     # fixes compile issues with qt on magellan
90     # create a fake qtdir to fix /usr/include/qt issue without patching
91     install -d ${SRCDIR}/qt || die
92     ln -snf ${QTDIR}/bin ${SRCDIR}/qt || die
93     ln -snf ${QTDIR}/$(mlibdir) ${SRCDIR}/qt/lib || die
94     ln -snf ${QTDIR}/include/qt ${SRCDIR}/qt/include || die
95    
96     # do not build testcases to save compile time
97     echo 'VBOX_WITH_TESTCASES :=' > ${SRCDIR}/LocalConfig.kmk || die
98     echo 'VBOX_WITH_TESTSUITE :=' >> ${SRCDIR}/LocalConfig.kmk || die
99     }
100    
101     src_compile()
102     {
103     cd ${SRCDIR}
104    
105     # use our fake qt dir and disable pulseaudio support
106     ./configure --with-qt-dir="${SRCDIR}/qt" --disable-pulse || die
107     source ./env.sh || die
108     kmk ${MAKEOPTS} || die
109     }
110    
111     src_install()
112     {
113     # virtualbox installs binaries in x86 or amd64 out dir
114     local myarch
115     case ${ARCH} in
116     i*86) myarch=x86;;
117     x86_64) myarch=amd64;;
118     esac
119    
120     cd ${SRCDIR}/out/linux.${myarch}/release/bin
121    
122     # needed directories
123     minstalldir /etc/udev/rules.d || die
124     minstalldir /usr/$(mlibdir)/${PNAME} || die
125     minstalldir /usr/bin || die
126     minstalldir /usr/sbin || die
127    
128     # prune unneeded stuff
129     rm -v tst* || die
130     rm -rv testcase || die
131     rm -rv sdk || die
132    
133     # move binaries to dest
134     mv -v * ${BINDIR}/usr/$(mlibdir)/${PNAME} || die
135    
136     # fix permissions
137     chmod -v 0755 ${BINDIR}/usr/$(mlibdir)/${PNAME}/{,additions/}*.so || die
138    
139     # fix permissions
140     mchown root:virtualbox /usr/$(mlibdir)/${PNAME}/VirtualBox || die
141     mchown root:virtualbox /usr/$(mlibdir)/${PNAME}/VBoxSDL || die
142     mchown root:virtualbox /usr/$(mlibdir)/${PNAME}/VBoxHeadless || die
143     mchown root:virtualbox /usr/$(mlibdir)/${PNAME}/VBoxManage || die
144     mchown root:virtualbox /usr/$(mlibdir)/${PNAME}/VBoxSVC || die
145     mchown root:virtualbox /usr/$(mlibdir)/${PNAME}/VBoxXPCOMIPCD || die
146     mchown root:virtualbox /usr/$(mlibdir)/${PNAME}/VBoxTunctl || die
147     mchown root:virtualbox /usr/$(mlibdir)/${PNAME}/VBoxNetAdpCtl || die
148     mchown root:virtualbox /usr/$(mlibdir)/${PNAME}/VBoxNetDHCP || die
149     mchown root:virtualbox /usr/$(mlibdir)/${PNAME}/VBoxNetAdpCtl || die
150     mchown root:virtualbox /usr/$(mlibdir)/${PNAME}/VBoxTestOGL || die
151    
152     # virtualbox needs now suid-bits to run
153     mchmod 4750 /usr/$(mlibdir)/${PNAME}/VirtualBox || die
154     mchmod 4750 /usr/$(mlibdir)/${PNAME}/VBoxSDL || die
155     mchmod 4750 /usr/$(mlibdir)/${PNAME}/VBoxHeadless || die
156     mchmod 4750 /usr/$(mlibdir)/${PNAME}/VBoxNetAdpCtl || die
157    
158     # supply a additions.iso for client guest
159     minstallfile -s ${VBOX_ADDITIONS_ISO} /usr/$(mlibdir)/${PNAME}/additions/${VBOX_ADDITIONS_ISO/_${PVER}/} || die
160    
161     # install a wrapper for some apps
162     minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/virtualbox || die
163     minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/vboxmanage || die
164     minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/vboxsdl || die
165     minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/vboxbfe || die
166     minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/vboxvrdp || die
167     minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/vboxheadless || die
168    
169     # virtualbox-config
170     minstallexec -s ${PNAME}-config.sh-${VC_CVS_REV} /usr/sbin/${PNAME}-config || die
171    
172     # other needed applinks
173     mlink /usr/$(mlibdir)/${PNAME}/VBoxTunctl /usr/bin/vboxtunctl || die
174    
175     # fix libdir
176     local i
177     for i in virtualbox vboxmanage vboxsdl vboxbfe vboxvrdp vboxheadless
178     do
179     sed -i "s:^\(LIBDIR=\).*:\1/usr/$(mlibdir):" ${BINDIR}/usr/bin/${i} || die
180     done
181     sed -i "s:^\(LIBDIR=\).*:\1/usr/$(mlibdir):" ${BINDIR}/usr/sbin/${PNAME}-config || die
182    
183     # install a udev rule
184     echo 'KERNEL=="vboxdrv", GROUP="virtualbox" MODE=660' > ${BINDIR}/etc/udev/rules.d/60-virtualbox.rules || die
185    
186     # install a nice destop entry
187     minstallpixmap ${SRCDIR}/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_64px.png ${PNAME}.png || die
188     minstall_desktop_icon \
189     --name VirtualBox \
190     --file ${PNAME} \
191     --comment "Run and manage virtual machines" \
192     --exec ${PNAME} \
193     --icon ${PNAME}.png \
194     --vendor innotek \
195     --categories System,Emulator \
196     || die
197    
198     # docs
199     cd ${SRCDIR}
200     minstalldocs ChangeLog COPYING || die
201    
202     # install usermanual
203     minstallfile -s ${VBOX_USER_MANUAL} /usr/share/doc/${PNAME}-${PVER} || die
204     }
205    
206     preinstall()
207     {
208     # adds virtualbox group
209     ${MLIBDIR}/mgroupadd virtualbox
210     }
211    
212     postinstall()
213     {
214     echo
215     echo "Please run virtualbox-config and add your users the 'virtualbox' group."
216     echo "For more information consult the user manual found at"
217     echo " http://virtualbox.de/download/${VBOX_USER_MANUAL}"
218     echo "or /usr/share/docs/${PNAME}-${PVER}/${VBOX_USER_MANUAL}"
219     echo
220     }

Properties

Name Value
svn:keywords Id