Magellan Linux

Annotation of /trunk/extras/virtualbox/virtualbox-3.0.12-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

Name Value
svn:keywords Id