wok view virtualbox-ose/receipt @ rev 11118

Up: gtkmm to 2.24.2.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Oct 26 19:30:26 2011 +0000 (2011-10-26)
parents 261ee62808da
children f816a5fbc817
line source
1 # SliTaz package receipt.
3 PACKAGE="virtualbox-ose"
4 VERSION="4.0.8"
5 CATEGORY="misc"
6 SHORT_DESC="Powerful x86 virtualization for enterprise as well as home use (Open Source Edition)"
7 MAINTAINER="slaxemulator@gmail.com"
8 SOURCE="VirtualBox"
9 TARBALL="$SOURCE-$VERSION.tar.bz2"
10 WEB_SITE="http://virtualbox.org/"
11 WGET_URL="http://download.virtualbox.org/virtualbox/$VERSION/$TARBALL"
12 PROVIDE="virtualbox"
14 DEPENDS="libxml2 xorg-libXcursor libIDL xorg-libXinerama libsdl \
15 xorg-libXmu curl libvncserver libpng jpeg mesa libglu-mesa qt4 vde2"
16 BUILD_DEPENDS="bin86 dev86 iasl libIDL libsdl-dev mesa-dev libxslt-dev \
17 Qt4-dev libsdl-ttf-dev alsa-lib-dev hal-dev xorg-libXtst-dev \
18 xorg-libXrandr-dev python python-dev xalan-c curl-dev xalan-c-dev \
19 xerces-c-dev openssl-dev zlib-dev libcap-dev glib-dev libvncserver-dev \
20 pam pam-dev bzip2 linux-module-headers pkg-config tar wget vde2-dev"
22 # Rules to configure and make the package.
23 compile_rules()
24 {
25 cd $src
26 patch -Np1 -i "$stuff/virtualbox-4-makeself-check.patch"
27 patch -Np1 -i "$stuff/virtualbox-4-mkisofs-check.patch"
28 cp $stuff/LocalConfig.kmk .
29 ./configure \
30 --disable-pulse \
31 --disable-java \
32 --disable-docs \
33 --enable-webservice \
34 --enable-vde \
35 --with-linux=/usr/src/linux
36 source ./env.sh
37 kmk all
39 # build modules. NOTE: we gor ERROR even if it build and cook will exit
40 # sed ERROR to error.
41 cd
42 KERN_DIR=/usr/src/linux make -C "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
43 # build guest additions modules
44 KERN_DIR=/usr/src/linux make -C "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src"
45 KERN_DIR=/usr/src/linux make -C \
46 "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src/vboxvideo" \
47 2>&1 | sed s'/ERROR/error/'
48 }
50 # Rules to gen a SliTaz package suitable for Tazpkg.
51 genpkg_rules()
52 {
53 fs=$WOK/$PACKAGE/taz/$PACKAGE-$VERSION/fs
55 source $src/env.sh
56 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
57 mkdir -p $fs/usr/bin $fs/usr/lib/virtualbox/components \
58 $fs/usr/share/virtualbox/nls \
59 $fs/usr/lib/virtualbox/ExtensionPacks
60 install -m 0755 VBox.sh $fs/usr/bin/VBox
61 sed -i 's/ps -U/ps | grep/' $fs/usr/bin/VBox
62 ln -sf VBox $fs/usr/bin/VBoxHeadless
63 ln -sf VBox $fs/usr/bin/vboxheadless
64 ln -sf VBox $fs/usr/bin/VBoxManage
65 ln -sf VBox $fs/usr/bin/vboxmanage
66 ln -sf VBox $fs/usr/bin/VBoxSDL
67 ln -sf VBox $fs/usr/bin/vboxsdl
68 ln -sf VBox $fs/usr/bin/VirtualBox
69 ln -sf VBox $fs/usr/bin/virtualbox
70 ln -sf VBox $fs/usr/bin/vboxwebsrv
72 install -m 0755 VBoxTunctl "$fs/usr/bin"
74 # components
75 install -D -m 0755 components/* $fs/usr/lib/virtualbox/components
77 # lib
78 install -m 0755 *.so "$fs/usr/lib/virtualbox"
79 install -m 0644 *.gc *.r0 VBoxEFI*.fd "$fs/usr/lib/virtualbox"
81 #setuid root binaries
82 install -m 4755 VBoxSDL VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetAdpCtl "$fs/usr/lib/virtualbox"
84 #other binaries
85 #install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL vboxwebsrv webtest "$fs/usr/lib/virtualbox"
86 install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL "$fs/usr/lib/virtualbox"
88 #language
89 install -m 0755 nls/*.qm "$fs/usr/share/virtualbox/nls"
91 #useless scripts
92 install -m 0755 VBoxCreateUSBNode.sh VBoxSysInfo.sh "$fs/usr/share/virtualbox"
94 #icon
95 install -D -m 0644 VBox.png "$fs/usr/share/pixmaps/VBox.png"
97 #desktop
98 install -D -m 0644 virtualbox.desktop "$fs/usr/share/applications/virtualbox.desktop"
99 install -D -m 0644 virtualbox.xml "$fs/usr/share/mime/packages/virtualbox.xml"
101 #install configuration
102 mkdir -p "$fs/etc/vbox"
103 echo 'lsmod | grep -q vboxdrv || modprobe vboxdrv' > "$fs/etc/vbox/vbox.cfg"
104 echo 'INSTALL_DIR=/usr/lib/virtualbox' >> "$fs/etc/vbox/vbox.cfg"
106 #udev
107 install -D -m 0644 "$stuff/60-virtualbox.rules" \
108 "$fs/etc/udev/rules.d/60-virtualbox.rules"
110 mkdir -p $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/
111 cd sdk/installer
112 VBOX_INSTALL_PATH="/usr/lib/virtualbox" python vboxapisetup.py install --root "$fs"
113 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
114 cd sdk/bindings/xpcom/python
115 cp -r xpcom $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/
116 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/*.py
117 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/*.py
118 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/*.py
119 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
121 # virtualbox-modules
122 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
124 cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
125 install -D -m644 vboxdrv.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxdrv.ko"
126 install -D -m644 vboxnetflt.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxnetflt.ko"
127 install -D -m644 vboxnetadp.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxnetadp.ko"
129 # virtualbox-ose-additions
131 cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions"
132 mkdir -p $fs/usr/bin
133 mkdir -p $fs/sbin
134 mkdir -p $fs/etc/X11/xorg.conf.d
136 install -m755 VBoxClient VBoxControl VBoxService "$fs/usr/bin"
137 install -m755 mount.vboxsf "$fs/sbin"
139 install -m644 $src/src/VBox/Additions/x11/Installer/50-vboxmouse.conf \
140 $fs/etc/X11/xorg.conf.d/50-vboxmouse.conf
142 install -m755 -D $src/src/VBox/Additions/x11/Installer/98vboxadd-xclient \
143 $fs/usr/bin/VBoxClient-all
144 install -m755 -D $src/src/VBox/Additions/x11/Installer/vboxclient.desktop \
145 $fs/etc/xdg/autostart/vboxclient.desktop
147 install -D vboxmouse_drv_19.so \
148 "$fs/usr/lib/X11/modules/input/vboxmouse.so"
149 install -D vboxvideo_drv_19.so \
150 "$fs/usr/lib/X11/modules/drivers/vboxvideo.so"
151 install -d "$fs/usr/lib/dri"
152 install -m755 VBoxOGL*.so "$fs/usr/lib"
153 ln -s /usr/lib/VBoxOGL.so "$fs/usr/lib/dri/vboxvideo_dri.so"
154 install -m755 -D pam_vbox.so "$fs/lib/security/pam_vbox.so"
156 # virtualbox-ose-additions-modules
157 cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src"
159 cd vboxguest
160 install -D -m644 vboxguest.ko \
161 "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxguest.ko"
163 cd ../vboxsf
164 install -D -m644 vboxsf.ko \
165 "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxsf.ko"
167 cd ../vboxvideo
168 install -D -m644 vboxvideo.ko \
169 "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxvideo.ko"
171 install -D -m 0644 "$stuff/60-vboxguest.rules" \
172 "$fs/etc/udev/rules.d/60-vboxguest.rules"
173 }
175 pre_remove()
176 {
177 sed -i "s/vboxdrv vboxnetadp vboxnetflt //" $1/etc/rcS.conf
178 }
180 post_install()
181 {
182 KERNEL_VERSION=`grep ^VERSION= $1/var/lib/tazpkg/installed/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
184 chroot "$1/" depmod -a $KERNEL_VERSION-slitaz
185 grep -qs vboxdrv $1/etc/rcS.conf ||
186 sed -i 's/LOAD_MODULES="/&vboxdrv vboxnetadp vboxnetflt /' $1/etc/rcS.conf
187 }