Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations) (download)
Fri Oct 10 13:29:42 2008 UTC (15 years, 7 months ago) by niro
File size: 5372 byte(s)
import repo
1 # $Header: /magellan-cvs/smage/virtualbox/virtualbox-1.6.2-r1.smage2,v 1.6 2008/06/10 18:41:20 niro Exp $
2
3 PNAME="virtualbox"
4 PVER="1.6.2"
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.16
17 >= media-libs/libsdl-1.2.13
18 >= x11-libs/qt-3.3.8
19 >= sys-apps/dbus-1.1
20 >= dev-libs/dbus-qt3-0.70
21 >= sys-apps/hal-0.5.10
22 >= x11-libs/libXcursor-1"
23
24 SDEPEND=">= dev-lang/bin86-0.16
25 >= dev-lang/dev86-0.16
26 >= dev-util/iasl-2006
27 >= dev-libs/libxml2-2
28 >= dev-util/desktop-file-utils-0.15
29 >= sys-apps/sed-4"
30
31 SRCFILE="VirtualBox-${PVER}-OSE.tar.bz2"
32 SRCDIR="${BUILDDIR}/VirtualBox-${PVER}"
33
34 # virtual box additions for guest clients
35 VBOX_ADDITIONS_ISO="VBoxGuestAdditions_${PVER}.iso"
36 VBOX_USER_MANUAL="UserManual.pdf"
37
38 # wrapper cvs revision
39 VW_CVS_REV=1.5
40 # config-tool cvs revision
41 VC_CVS_REV=1.8
42
43 sminclude mtools xdg
44
45 SRC_URI=(
46 http://virtualbox.de/download/${PVER}/${SRCFILE}
47 http://virtualbox.de/download/${PVER}/${VBOX_ADDITIONS_ISO}
48 http://virtualbox.de/download/${VBOX_USER_MANUAL}
49 mirror://${PNAME}/${SRCFILE}
50 mirror://${PNAME}/${VBOX_ADDITIONS_ISO}
51 mirror://${PNAME}/${VBOX_USER_MANUAL}
52 mirror://${PNAME}/${PNAME}-wrapper.sh-${VW_CVS_REV}
53 mirror://${PNAME}/${PNAME}-config.sh-${VC_CVS_REV}
54 mirror://${PNAME}/interfaces
55 mirror://${PNAME}/${PNAME}-1.5.4-magellan.patch
56 )
57
58 src_prepare()
59 {
60 munpack ${SRCFILE} || die
61 cd ${SRCDIR}
62
63 # add magellan support to VBoxSysInfo.sh
64 mpatch ${PNAME}-1.5.4-magellan.patch || die
65
66 # fixes compile issues with qt on magellan
67 # create a fake qtdir to fix /usr/include/qt issue without patching
68 install -d ${SRCDIR}/qt || dir
69 ln -snf ${QTDIR}/bin ${SRCDIR}/qt || die
70 ln -snf ${QTDIR}/$(mlibdir) ${SRCDIR}/qt || die
71 ln -snf ${QTDIR}/include/qt ${SRCDIR}/qt/include || die
72 }
73
74 src_compile()
75 {
76 cd ${SRCDIR}
77
78 # use our fake qt dir and disable pulseaudio support
79 ./configure --with-qt-dir="${SRCDIR}/qt" --disable-pulse --disable-qt4 || die
80 source ./env.sh || die
81 kmk ${MAKEOPTS} || die
82 }
83
84 src_install()
85 {
86 # virtualbox installs binaries in x86 or amd64 out dir
87 local myarch
88 case ${ARCH} in
89 i*86) myarch=x86;;
90 x86_64) myarch=amd64;;
91 esac
92
93 cd ${SRCDIR}/out/linux.${myarch}/release/bin
94
95 # needed directories
96 minstalldir /etc/udev/rules.d || die
97 minstalldir /etc/vbox || die
98 minstalldir /usr/$(mlibdir)/${PNAME} || die
99 minstalldir /usr/bin || die
100 minstalldir /usr/sbin || die
101
102 # prune unneeded stuff
103 rm tst* || die
104 rm -r testcase || die
105
106 # move binaries to dest
107 mv * ${BINDIR}/usr/$(mlibdir)/${PNAME} || die
108
109 # fix permissions
110 chmod 0755 ${BINDIR}/usr/$(mlibdir)/${PNAME}/{,additions/}*.so || die
111
112 # install network interface scripts
113 minstallexec ${SRCDIR}/src/VBox/Installer/linux/VBoxAddIF.sh /usr/$(mlibdir)/${PNAME} || die
114 mchown root:virtualbox /usr/$(mlibdir)/${PNAME}/VBoxAddIF.sh || die
115 mchmod 0750 /usr/$(mlibdir)/${PNAME}/VBoxAddIF.sh || die
116 mlink VBoxAddIF.sh /usr/$(mlibdir)/${PNAME}/VBoxDeleteIF.sh || die
117
118 # install permanent interfaces configuration file
119 minstallfile -s interfaces /etc/vbox || die
120
121 # supply a additions.iso for client guest
122 minstallfile -s ${VBOX_ADDITIONS_ISO} /usr/$(mlibdir)/${PNAME}/additions/${VBOX_ADDITIONS_ISO/_${PVER}/} || die
123
124 # install a wrapper for some apps
125 minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/virtualbox || die
126 minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/vboxmanage || die
127 minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/vboxsdl || die
128 minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/vboxbfe || die
129
130 # virtualbox-config
131 minstallexec -s ${PNAME}-config.sh-${VC_CVS_REV} /usr/sbin/${PNAME}-config || die
132
133 # other needed applinks
134 mlink /usr/$(mlibdir)/${PNAME}/VBoxTunctl /usr/bin/vboxtunctl || die
135 mlink /usr/$(mlibdir)/${PNAME}/VBoxAddIF.sh /usr/bin/vboxaddif || die
136 mlink /usr/$(mlibdir)/${PNAME}/VBoxDeleteIF.sh /usr/bin/vboxdeleteif || die
137
138 # fix libdir
139 local i
140 for i in virtualbox vboxmanage vboxsdl vboxbfe
141 do
142 sed -i "s:^\(LIBDIR=\).*:\1/usr/$(mlibdir):" ${BINDIR}/usr/bin/${i} || die
143 done
144 sed -i "s:^\(LIBDIR=\).*:\1/usr/$(mlibdir):" ${BINDIR}/usr/sbin/${PNAME}-config || die
145
146 # install a udev rule
147 echo 'KERNEL=="vboxdrv", GROUP="virtualbox" MODE=660' > ${BINDIR}/etc/udev/rules.d/60-virtualbox.rules || die
148
149 # install a nice destop entry
150 minstallpixmap ${SRCDIR}/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_64px.png ${PNAME}.png || die
151 minstall_desktop_icon \
152 --name VirtualBox \
153 --file ${PNAME} \
154 --comment "Run and manage virtual machines" \
155 --exec ${PNAME} \
156 --icon ${PNAME}.png \
157 --vendor innotek \
158 --categories System,Emulator \
159 || die
160
161 # docs
162 cd ${SRCDIR}
163 minstalldocs ChangeLog COPYING || die
164
165 # install usermanual
166 minstallfile -s ${VBOX_USER_MANUAL} /usr/share/doc/${PNAME}-${PVER} || die
167 }
168
169 preinstall()
170 {
171 # adds virtualbox group
172 ${MLIBDIR}/mgroupadd virtualbox
173 }
174
175 postinstall()
176 {
177 echo
178 echo "Please run virtualbox-config and add your users the 'virtualbox' group."
179 echo "For more information consult the user manual found at"
180 echo " http://virtualbox.de/download/${VBOX_USER_MANUAL}"
181 echo "or /usr/share/docs/${PNAME}-${PVER}/${VBOX_USER_MANUAL}"
182 echo
183 }

Properties

Name Value
svn:keywords Id