Annotation of /trunk/extras/virtualbox/virtualbox-2.2.4-r1.smage2
Parent Directory | Revision Log
Revision 2105 -
(hide annotations)
(download)
Mon Jun 29 18:28:35 2009 UTC (14 years, 10 months ago) by niro
File size: 5501 byte(s)
Mon Jun 29 18:28:35 2009 UTC (14 years, 10 months ago) by niro
File size: 5501 byte(s)
auto added: ver bump to 2.2.4-r1
1 | niro | 2105 | # $Id$ |
2 | |||
3 | PNAME="virtualbox" | ||
4 | PVER="2.2.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.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.5 | ||
42 | # config-tool cvs revision | ||
43 | VC_CVS_REV=1.8 | ||
44 | |||
45 | sminclude mtools xdg qt4 | ||
46 | |||
47 | SRC_URI=( | ||
48 | http://virtualbox.de/download/${PVER}/${SRCFILE} | ||
49 | http://virtualbox.de/download/${PVER}/${VBOX_ADDITIONS_ISO} | ||
50 | http://virtualbox.de/download/${PVER}/${VBOX_USER_MANUAL} | ||
51 | mirror://${PNAME}/${SRCFILE} | ||
52 | mirror://${PNAME}/${VBOX_ADDITIONS_ISO} | ||
53 | mirror://${PNAME}/${VBOX_USER_MANUAL} | ||
54 | mirror://${PNAME}/${PNAME}-wrapper.sh-${VW_CVS_REV} | ||
55 | mirror://${PNAME}/${PNAME}-config.sh-${VC_CVS_REV} | ||
56 | mirror://${PNAME}/interfaces | ||
57 | mirror://${PNAME}/${PNAME}-1.5.4-magellan.patch | ||
58 | ) | ||
59 | |||
60 | UP2DATE="" | ||
61 | |||
62 | src_prepare() | ||
63 | { | ||
64 | munpack ${SRCFILE} || die | ||
65 | cd ${SRCDIR} | ||
66 | |||
67 | # add magellan support to VBoxSysInfo.sh | ||
68 | mpatch ${PNAME}-1.5.4-magellan.patch || die | ||
69 | |||
70 | # fixes compile issues with qt on magellan | ||
71 | # create a fake qtdir to fix /usr/include/qt issue without patching | ||
72 | install -d ${SRCDIR}/qt || dir | ||
73 | ln -snf ${QTDIR}/bin ${SRCDIR}/qt || die | ||
74 | ln -snf ${QTDIR}/$(mlibdir) ${SRCDIR}/qt || die | ||
75 | ln -snf ${QTDIR}/include/qt ${SRCDIR}/qt/include || die | ||
76 | } | ||
77 | |||
78 | src_compile() | ||
79 | { | ||
80 | cd ${SRCDIR} | ||
81 | |||
82 | # use our fake qt dir and disable pulseaudio support | ||
83 | ./configure --with-qt-dir="${SRCDIR}/qt" --disable-pulse || die | ||
84 | source ./env.sh || die | ||
85 | kmk ${MAKEOPTS} || die | ||
86 | } | ||
87 | |||
88 | src_install() | ||
89 | { | ||
90 | # virtualbox installs binaries in x86 or amd64 out dir | ||
91 | local myarch | ||
92 | case ${ARCH} in | ||
93 | i*86) myarch=x86;; | ||
94 | x86_64) myarch=amd64;; | ||
95 | esac | ||
96 | |||
97 | cd ${SRCDIR}/out/linux.${myarch}/release/bin | ||
98 | |||
99 | # needed directories | ||
100 | minstalldir /etc/udev/rules.d || die | ||
101 | minstalldir /etc/vbox || die | ||
102 | minstalldir /usr/$(mlibdir)/${PNAME} || die | ||
103 | minstalldir /usr/bin || die | ||
104 | minstalldir /usr/sbin || die | ||
105 | |||
106 | # prune unneeded stuff | ||
107 | rm tst* || die | ||
108 | rm -r testcase || die | ||
109 | |||
110 | # move binaries to dest | ||
111 | mv * ${BINDIR}/usr/$(mlibdir)/${PNAME} || die | ||
112 | |||
113 | # fix permissions | ||
114 | chmod 0755 ${BINDIR}/usr/$(mlibdir)/${PNAME}/{,additions/}*.so || die | ||
115 | |||
116 | # install network interface scripts | ||
117 | minstallexec ${SRCDIR}/src/VBox/Installer/linux/VBoxAddIF.sh /usr/$(mlibdir)/${PNAME} || die | ||
118 | mchown root:virtualbox /usr/$(mlibdir)/${PNAME}/VBoxAddIF.sh || die | ||
119 | mchmod 0750 /usr/$(mlibdir)/${PNAME}/VBoxAddIF.sh || die | ||
120 | mlink VBoxAddIF.sh /usr/$(mlibdir)/${PNAME}/VBoxDeleteIF.sh || die | ||
121 | |||
122 | # install permanent interfaces configuration file | ||
123 | minstallfile -s interfaces /etc/vbox || die | ||
124 | |||
125 | # supply a additions.iso for client guest | ||
126 | minstallfile -s ${VBOX_ADDITIONS_ISO} /usr/$(mlibdir)/${PNAME}/additions/${VBOX_ADDITIONS_ISO/_${PVER}/} || die | ||
127 | |||
128 | # install a wrapper for some apps | ||
129 | minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/virtualbox || die | ||
130 | minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/vboxmanage || die | ||
131 | minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/vboxsdl || die | ||
132 | minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/vboxbfe || die | ||
133 | minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/vboxvrdp || die | ||
134 | minstallexec -s ${PNAME}-wrapper.sh-${VW_CVS_REV} /usr/bin/vboxvheadless || die | ||
135 | |||
136 | # virtualbox-config | ||
137 | minstallexec -s ${PNAME}-config.sh-${VC_CVS_REV} /usr/sbin/${PNAME}-config || die | ||
138 | |||
139 | # other needed applinks | ||
140 | mlink /usr/$(mlibdir)/${PNAME}/VBoxTunctl /usr/bin/vboxtunctl || die | ||
141 | mlink /usr/$(mlibdir)/${PNAME}/VBoxAddIF.sh /usr/bin/vboxaddif || die | ||
142 | mlink /usr/$(mlibdir)/${PNAME}/VBoxDeleteIF.sh /usr/bin/vboxdeleteif || die | ||
143 | |||
144 | # fix libdir | ||
145 | local i | ||
146 | for i in virtualbox vboxmanage vboxsdl vboxbfe vboxvrdp vboxvheadless | ||
147 | do | ||
148 | sed -i "s:^\(LIBDIR=\).*:\1/usr/$(mlibdir):" ${BINDIR}/usr/bin/${i} || die | ||
149 | done | ||
150 | sed -i "s:^\(LIBDIR=\).*:\1/usr/$(mlibdir):" ${BINDIR}/usr/sbin/${PNAME}-config || die | ||
151 | |||
152 | # install a udev rule | ||
153 | echo 'KERNEL=="vboxdrv", GROUP="virtualbox" MODE=660' > ${BINDIR}/etc/udev/rules.d/60-virtualbox.rules || die | ||
154 | |||
155 | # install a nice destop entry | ||
156 | minstallpixmap ${SRCDIR}/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_64px.png ${PNAME}.png || die | ||
157 | minstall_desktop_icon \ | ||
158 | --name VirtualBox \ | ||
159 | --file ${PNAME} \ | ||
160 | --comment "Run and manage virtual machines" \ | ||
161 | --exec ${PNAME} \ | ||
162 | --icon ${PNAME}.png \ | ||
163 | --vendor innotek \ | ||
164 | --categories System,Emulator \ | ||
165 | || die | ||
166 | |||
167 | # docs | ||
168 | cd ${SRCDIR} | ||
169 | minstalldocs ChangeLog COPYING || die | ||
170 | |||
171 | # install usermanual | ||
172 | minstallfile -s ${VBOX_USER_MANUAL} /usr/share/doc/${PNAME}-${PVER} || die | ||
173 | } | ||
174 | |||
175 | preinstall() | ||
176 | { | ||
177 | # adds virtualbox group | ||
178 | ${MLIBDIR}/mgroupadd virtualbox | ||
179 | } | ||
180 | |||
181 | postinstall() | ||
182 | { | ||
183 | echo | ||
184 | echo "Please run virtualbox-config and add your users the 'virtualbox' group." | ||
185 | echo "For more information consult the user manual found at" | ||
186 | echo " http://virtualbox.de/download/${VBOX_USER_MANUAL}" | ||
187 | echo "or /usr/share/docs/${PNAME}-${PVER}/${VBOX_USER_MANUAL}" | ||
188 | echo | ||
189 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |