wok view virtualbox-ose/receipt @ rev 12628
firefox: update bdeps
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Apr 29 12:46:24 2012 +0200 (2012-04-29) |
parents | f816a5fbc817 |
children | 6b09507225ec |
line source
1 # SliTaz package receipt.
3 PACKAGE="virtualbox-ose"
4 VERSION="4.1.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 \
21 libpng-dev"
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 cd $src
27 patch -Np1 -i "$stuff/virtualbox-4-makeself-check.patch"
28 patch -Np1 -i "$stuff/virtualbox-4-mkisofs-check.patch"
29 cp $stuff/LocalConfig.kmk .
30 ./configure \
31 --disable-pulse \
32 --disable-java \
33 --disable-docs \
34 --enable-webservice \
35 --enable-vde \
36 --with-linux=/usr/src/linux
37 source ./env.sh
38 kmk all
40 # build modules. NOTE: we gor ERROR even if it build and cook will exit
41 # sed ERROR to error.
42 cd
43 KERN_DIR=/usr/src/linux make -C "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
44 # build guest additions modules
45 KERN_DIR=/usr/src/linux make -C "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src"
46 KERN_DIR=/usr/src/linux make -C \
47 "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src/vboxvideo" \
48 2>&1 | sed s'/ERROR/error/'
49 }
51 # Rules to gen a SliTaz package suitable for Tazpkg.
52 genpkg_rules()
53 {
54 fs=$WOK/$PACKAGE/taz/$PACKAGE-$VERSION/fs
56 source $src/env.sh
57 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
58 mkdir -p $fs/usr/bin $fs/usr/lib/virtualbox/components \
59 $fs/usr/share/virtualbox/nls \
60 $fs/usr/lib/virtualbox/ExtensionPacks
61 install -m 0755 VBox.sh $fs/usr/bin/VBox
62 sed -i 's/ps -U/ps | grep/' $fs/usr/bin/VBox
63 ln -sf VBox $fs/usr/bin/VBoxHeadless
64 ln -sf VBox $fs/usr/bin/vboxheadless
65 ln -sf VBox $fs/usr/bin/VBoxManage
66 ln -sf VBox $fs/usr/bin/vboxmanage
67 ln -sf VBox $fs/usr/bin/VBoxSDL
68 ln -sf VBox $fs/usr/bin/vboxsdl
69 ln -sf VBox $fs/usr/bin/VirtualBox
70 ln -sf VBox $fs/usr/bin/virtualbox
71 ln -sf VBox $fs/usr/bin/vboxwebsrv
73 install -m 0755 VBoxTunctl "$fs/usr/bin"
75 # components
76 install -D -m 0755 components/* $fs/usr/lib/virtualbox/components
78 # lib
79 install -m 0755 *.so "$fs/usr/lib/virtualbox"
80 install -m 0644 *.gc *.r0 VBoxEFI*.fd "$fs/usr/lib/virtualbox"
82 #setuid root binaries
83 install -m 4755 VBoxSDL VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetAdpCtl "$fs/usr/lib/virtualbox"
85 #other binaries
86 #install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL vboxwebsrv webtest "$fs/usr/lib/virtualbox"
87 install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL "$fs/usr/lib/virtualbox"
89 #language
90 install -m 0755 nls/*.qm "$fs/usr/share/virtualbox/nls"
92 #useless scripts
93 install -m 0755 VBoxCreateUSBNode.sh VBoxSysInfo.sh "$fs/usr/share/virtualbox"
95 #icon
96 install -D -m 0644 VBox.png "$fs/usr/share/pixmaps/virtualbox.png"
98 #desktop
99 install -D -m 0644 virtualbox.desktop "$fs/usr/share/applications/virtualbox.desktop"
100 sed -i "s|VBox.png|virtualbox|" \
101 $fs/usr/share/applications/virtualbox.desktop
102 install -D -m 0644 virtualbox.xml "$fs/usr/share/mime/packages/virtualbox.xml"
104 #install configuration
105 mkdir -p "$fs/etc/vbox"
106 echo 'lsmod | grep -q vboxdrv || modprobe vboxdrv' > "$fs/etc/vbox/vbox.cfg"
107 echo 'INSTALL_DIR=/usr/lib/virtualbox' >> "$fs/etc/vbox/vbox.cfg"
109 #udev
110 install -D -m 0644 "$stuff/60-virtualbox.rules" \
111 "$fs/etc/udev/rules.d/60-virtualbox.rules"
113 mkdir -p $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/
114 cd sdk/installer
115 VBOX_INSTALL_PATH="/usr/lib/virtualbox" python vboxapisetup.py install --root "$fs"
116 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
117 cd sdk/bindings/xpcom/python
118 cp -r xpcom $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/
119 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/*.py
120 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/*.py
121 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/*.py
122 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
124 # virtualbox-modules
125 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
127 cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
128 install -D -m644 vboxdrv.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxdrv.ko"
129 install -D -m644 vboxnetflt.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxnetflt.ko"
130 install -D -m644 vboxnetadp.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxnetadp.ko"
132 # virtualbox-ose-additions
134 cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions"
135 mkdir -p $fs/usr/bin
136 mkdir -p $fs/sbin
137 mkdir -p $fs/etc/X11/xorg.conf.d
139 install -m755 VBoxClient VBoxControl VBoxService "$fs/usr/bin"
140 install -m755 mount.vboxsf "$fs/sbin"
142 install -m644 $src/src/VBox/Additions/x11/Installer/50-vboxmouse.conf \
143 $fs/etc/X11/xorg.conf.d/50-vboxmouse.conf
145 install -m755 -D $src/src/VBox/Additions/x11/Installer/98vboxadd-xclient \
146 $fs/usr/bin/VBoxClient-all
147 install -m755 -D $src/src/VBox/Additions/x11/Installer/vboxclient.desktop \
148 $fs/etc/xdg/autostart/vboxclient.desktop
150 install -D vboxmouse_drv_19.so \
151 "$fs/usr/lib/X11/modules/input/vboxmouse.so"
152 install -D vboxvideo_drv_19.so \
153 "$fs/usr/lib/X11/modules/drivers/vboxvideo.so"
154 install -d "$fs/usr/lib/dri"
155 install -m755 VBoxOGL*.so "$fs/usr/lib"
156 ln -s /usr/lib/VBoxOGL.so "$fs/usr/lib/dri/vboxvideo_dri.so"
157 install -m755 -D pam_vbox.so "$fs/lib/security/pam_vbox.so"
159 # virtualbox-ose-additions-modules
160 cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src"
162 cd vboxguest
163 install -D -m644 vboxguest.ko \
164 "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxguest.ko"
166 cd ../vboxsf
167 install -D -m644 vboxsf.ko \
168 "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxsf.ko"
170 cd ../vboxvideo
171 install -D -m644 vboxvideo.ko \
172 "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxvideo.ko"
174 install -D -m 0644 "$stuff/60-vboxguest.rules" \
175 "$fs/etc/udev/rules.d/60-vboxguest.rules"
176 }
178 pre_remove()
179 {
180 sed -i "s/vboxdrv vboxnetadp vboxnetflt //" $1/etc/rcS.conf
181 }
183 post_install()
184 {
185 KERNEL_VERSION=`grep ^VERSION= $1/var/lib/tazpkg/installed/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
187 chroot "$1/" depmod -a $KERNEL_VERSION-slitaz
188 grep -qs vboxdrv $1/etc/rcS.conf ||
189 sed -i 's/LOAD_MODULES="/&vboxdrv vboxnetadp vboxnetflt /' $1/etc/rcS.conf
190 }