wok-current view virtualbox-ose/receipt @ rev 7702
Up: bluez to 4.81.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sat Dec 18 15:53:38 2010 +0000 (2010-12-18) |
parents | e00276474e4f |
children | 02baca3bf691 |
line source
1 # SliTaz package receipt.
3 PACKAGE="virtualbox-ose"
4 VERSION="3.2.12"
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 DEPENDS="libxml2 xorg-libXcursor libIDL xorg-libXinerama libsdl xorg-libXmu curl libvncserver libpng jpeg mesa libglu-mesa qt4"
9 BUILD_DEPENDS="bin86 dev86 iasl libxslt-dev libxml2-dev xorg-libXcursor-dev Qt4-dev libIDL libsdl-ttf-dev libsdl-dev alsa-lib-dev hal-dev xorg-libXtst-dev xorg-libXinerama-dev xorg-libXrandr-dev xorg-libXmu-dev curl-dev python python-dev mesa-dev libglu-mesa xalan-c xalan-c-dev xerces-c-dev openssl-dev libpng-dev jpeg-dev zlib-dev libvncserver-dev libcap-dev glib-dev pam pam-dev linux-module-headers pkg-config"
10 SOURCE="VirtualBox"
11 TARBALL="$SOURCE-$VERSION-OSE.tar.bz2"
12 WEB_SITE="http://virtualbox.org/"
13 WGET_URL="http://download.virtualbox.org/virtualbox/$VERSION/$TARBALL"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 src=$WOK/$PACKAGE/$SOURCE-${VERSION}_OSE
19 cd $src
21 patch -Np1 -i ../stuff/VirtualBox-3.2.0-gcc-4.5-warning-workaround.patch
22 patch -Np1 -i ../stuff/fix_build.patch
23 cp ../stuff/LocalConfig.kmk .
24 ./configure \
25 --disable-pulse \
26 --with-linux=/usr/src/linux
27 source ./env.sh
28 kmk all
30 # build modules
31 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src
32 KERN_DIR=/usr/src/linux make
33 # build guest additions modules
34 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src
35 KERN_DIR=/usr/src/linux make
36 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src/vboxvideo
37 KERN_DIR=/usr/src/linux make
38 }
40 # Rules to gen a SliTaz package suitable for Tazpkg.
41 genpkg_rules()
42 {
43 src=$WOK/$PACKAGE/$SOURCE-${VERSION}_OSE
44 fs=$WOK/$PACKAGE/taz/$PACKAGE-$VERSION/fs
45 stuff=$WOK/$PACKAGE/stuff
47 source $src/env.sh
48 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
49 mkdir -p "$fs"/usr/{bin,lib/virtualbox/components,share/virtualbox/nls}
50 cp -a VBox.sh $fs/usr/bin/VBox
51 sed -i 's/ps -U/ps | grep/' $fs/usr/bin/VBox
52 ln -sf VBox $fs/usr/bin/VBoxHeadless
53 ln -sf VBox $fs/usr/bin/VBoxManage
54 ln -sf VBox $fs/usr/bin/VBoxSDL
55 ln -sf VBox $fs/usr/bin/VirtualBox
57 install -m 0755 VBoxTunctl "$fs/usr/bin"
59 # components
60 cp -a components/* $fs/usr/lib/virtualbox/components
62 # lib
63 install -m 0755 *.so "$fs/usr/lib/virtualbox"
64 install -m 0644 *.gc *.r0 VBoxEFI*.fd "$fs/usr/lib/virtualbox"
66 #setuid root binaries
67 install -m 4755 VBoxHeadless VBoxSDL VBoxNetDHCP VBoxNetAdpCtl VirtualBox VBoxBFE "$fs/usr/lib/virtualbox"
69 #other binaries
70 install -m 0755 VBoxManage VBoxSVC VBoxXPCOMIPCD VBoxSysInfo.sh xpidl \
71 VBoxTestOGL EfiThunk "$fs/usr/lib/virtualbox"
73 #language
74 install -m 0755 nls/*.qm "$fs/usr/share/virtualbox/nls"
76 #icon
77 install -D -m 0644 VBox.png "$fs/usr/share/pixmaps/VBox.png"
79 #desktop
80 install -D -m 0644 virtualbox.desktop "$fs/usr/share/applications/virtualbox.desktop"
82 #install configuration
83 mkdir -p "$fs/etc/vbox"
84 echo 'lsmod | grep -q vboxdrv || modprobe vboxdrv' > "$fs/etc/vbox/vbox.cfg"
85 echo 'INSTALL_DIR=/usr/lib/virtualbox' >> "$fs/etc/vbox/vbox.cfg"
87 #udev
88 install -D -m 0644 "$stuff/60-virtualbox.rules" \
89 "$fs/etc/udev/rules.d/60-virtualbox.rules"
91 mkdir -p $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/
92 pushd sdk/installer
93 VBOX_INSTALL_PATH="/usr/lib/virtualbox" python vboxapisetup.py install --root "$fs"
94 popd
95 pushd sdk/bindings/xpcom/python
96 cp -r xpcom $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/
97 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/*.py
98 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/*.py
99 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/*.py
100 popd
102 # virtualbox-modules
103 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
105 cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
106 install -D -m644 vboxdrv.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxdrv.ko"
107 install -D -m644 vboxnetflt.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxnetflt.ko"
108 install -D -m644 vboxnetadp.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxnetadp.ko"
110 # virtualbox-ose-additions
112 cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions"
113 mkdir -p $fs/usr/bin
114 mkdir -p $fs/sbin
115 mkdir -p $fs/etc/X11/xorg.conf.d
117 install -m755 VBoxClient VBoxControl VBoxService "$fs/usr/bin"
118 install -m755 mount.vboxsf "$fs/sbin"
120 install -m644 $src/src/VBox/Additions/x11/Installer/50-vboxmouse.conf \
121 $fs/etc/X11/xorg.conf.d/50-vboxmouse.conf
123 install -m755 -D $src/src/VBox/Additions/x11/Installer/98vboxadd-xclient \
124 $fs/usr/bin/VBoxClient-all
125 install -m755 -D $src/src/VBox/Additions/x11/Installer/vboxclient.desktop \
126 $fs/etc/xdg/autostart/vboxclient.desktop
128 install -D vboxmouse_drv_19.so \
129 "$fs/usr/lib/X11/modules/input/vboxmouse.so"
130 install -D vboxvideo_drv_19.so \
131 "$fs/usr/lib/X11/modules/drivers/vboxvideo.so"
132 install -d "$fs/usr/lib/dri"
133 install -m755 VBoxOGL*.so "$fs/usr/lib"
134 ln -s /usr/lib/VBoxOGL.so "$fs/usr/lib/dri/vboxvideo_dri.so"
135 install -m755 -D pam_vbox.so "$fs/lib/security/pam_vbox.so"
137 # virtualbox-ose-additions-modules
138 cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src"
140 cd vboxguest
141 install -D -m644 vboxguest.ko \
142 "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxguest.ko"
144 cd ../vboxsf
145 install -D -m644 vboxsf.ko \
146 "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxsf.ko"
148 cd ../vboxvideo
149 install -D -m644 vboxvideo.ko \
150 "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxvideo.ko"
152 install -D -m 0644 "$stuff/60-vboxguest.rules" \
153 "$fs/etc/udev/rules.d/60-vboxguest.rules"
154 }
156 pre_remove()
157 {
158 sed -i "s/vboxdrv vboxnetadp vboxnetflt //" $1/etc/rcS.conf
159 }
161 post_install()
162 {
163 KERNEL_VERSION=`grep ^VERSION= $1/var/lib/tazpkg/installed/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
165 chroot "$1/" depmod -a $KERNEL_VERSION-slitaz
166 grep -qs vboxdrv $1/etc/rcS.conf ||
167 sed -i 's/LOAD_MODULES="/&vboxdrv vboxnetadp vboxnetflt /' $1/etc/rcS.conf
168 }