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