wok-6.x view virtualbox-ose/receipt @ rev 7522
Add mdk3. WLAN penetration tool.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sun Dec 05 10:34:34 2010 +0000 (2010-12-05) |
parents | 4d423809efb5 |
children | 35354c2b87b9 |
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"
14 MODULE_LIST="vboxdrv vboxnetadp vboxnetflt"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 src=$WOK/$PACKAGE/$SOURCE-${VERSION}_OSE
20 cd $src
22 patch -Np1 -i ../stuff/VirtualBox-3.2.0-gcc-4.5-warning-workaround.patch
23 patch -Np1 -i ../stuff/fix_build.patch
24 cp ../stuff/LocalConfig.kmk .
25 ./configure \
26 --disable-pulse \
27 --with-linux=/usr/src/linux
28 source ./env.sh
29 kmk all
31 # build modules
32 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src
33 KERN_DIR=/usr/src/linux make
34 # build guest additions modules
35 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src
36 KERN_DIR=/usr/src/linux make
37 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src/vboxvideo
38 KERN_DIR=/usr/src/linux make
39 }
41 # Rules to gen a SliTaz package suitable for Tazpkg.
42 genpkg_rules()
43 {
44 src=$WOK/$PACKAGE/$SOURCE-${VERSION}_OSE
45 fs=$WOK/$PACKAGE/taz/$PACKAGE-$VERSION/fs
46 stuff=$WOK/$PACKAGE/stuff
48 source $src/env.sh
49 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
50 mkdir -p "$fs"/usr/{bin,lib/virtualbox/components,share/virtualbox/nls}
51 cp -a VBox.sh $fs/usr/bin/VBox
52 sed -i 's/ps -U/ps | grep/' $fs/usr/bin/VBox
53 ln -sf VBox $fs/usr/bin/VBoxHeadless
54 ln -sf VBox $fs/usr/bin/VBoxManage
55 ln -sf VBox $fs/usr/bin/VBoxSDL
56 ln -sf VBox $fs/usr/bin/VirtualBox
58 install -m 0755 VBoxTunctl "$fs/usr/bin"
60 # components
61 cp -a components/* $fs/usr/lib/virtualbox/components
63 # lib
64 install -m 0755 *.so "$fs/usr/lib/virtualbox"
65 install -m 0644 *.gc *.r0 VBoxEFI*.fd "$fs/usr/lib/virtualbox"
67 #setuid root binaries
68 install -m 4755 VBoxHeadless VBoxSDL VBoxNetDHCP VBoxNetAdpCtl VirtualBox VBoxBFE "$fs/usr/lib/virtualbox"
70 #other binaries
71 install -m 0755 VBoxManage VBoxSVC VBoxXPCOMIPCD VBoxSysInfo.sh xpidl \
72 VBoxTestOGL EfiThunk "$fs/usr/lib/virtualbox"
74 #language
75 install -m 0755 nls/*.qm "$fs/usr/share/virtualbox/nls"
77 #icon
78 install -D -m 0644 VBox.png "$fs/usr/share/pixmaps/VBox.png"
80 #desktop
81 install -D -m 0644 virtualbox.desktop "$fs/usr/share/applications/virtualbox.desktop"
83 #install configuration
84 mkdir -p "$fs/etc/vbox"
85 echo 'lsmod | grep -q vboxdrv || modprobe vboxdrv' > "$fs/etc/vbox/vbox.cfg"
86 echo 'INSTALL_DIR=/usr/lib/virtualbox' >> "$fs/etc/vbox/vbox.cfg"
88 #udev
89 install -D -m 0644 "$stuff/60-virtualbox.rules" \
90 "$fs/etc/udev/rules.d/60-virtualbox.rules"
92 mkdir -p $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/
93 pushd sdk/installer
94 VBOX_INSTALL_PATH="/usr/lib/virtualbox" python vboxapisetup.py install --root "$fs"
95 popd
96 pushd sdk/bindings/xpcom/python
97 cp -r xpcom $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/
98 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/*.py
99 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/*.py
100 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/*.py
101 popd
103 # virtualbox-modules
104 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
106 cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
107 install -D -m644 vboxdrv.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxdrv.ko"
108 install -D -m644 vboxnetflt.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxnetflt.ko"
109 install -D -m644 vboxnetadp.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxnetadp.ko"
111 # virtualbox-ose-additions
113 cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions"
114 mkdir -p $fs/usr/bin
115 mkdir -p $fs/sbin
116 mkdir -p $fs/etc/X11/xorg.conf.d
118 install -m755 VBoxClient VBoxControl VBoxService "$fs/usr/bin"
119 install -m755 mount.vboxsf "$fs/sbin"
121 install -m644 $src/src/VBox/Additions/x11/Installer/50-vboxmouse.conf \
122 $fs/etc/X11/xorg.conf.d/50-vboxmouse.conf
124 install -m755 -D $src/src/VBox/Additions/x11/Installer/98vboxadd-xclient \
125 $fs/usr/bin/VBoxClient-all
126 install -m755 -D $src/src/VBox/Additions/x11/Installer/vboxclient.desktop \
127 $fs/etc/xdg/autostart/vboxclient.desktop
129 install -D vboxmouse_drv_19.so \
130 "$fs/usr/lib/X11/modules/input/vboxmouse.so"
131 install -D vboxvideo_drv_19.so \
132 "$fs/usr/lib/X11/modules/drivers/vboxvideo.so"
133 install -d "$fs/usr/lib/dri"
134 install -m755 VBoxOGL*.so "$fs/usr/lib"
135 ln -s /usr/lib/VBoxOGL.so "$fs/usr/lib/dri/vboxvideo_dri.so"
136 install -m755 -D pam_vbox.so "$fs/lib/security/pam_vbox.so"
138 # virtualbox-ose-additions-modules
139 cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src"
141 cd vboxguest
142 install -D -m644 vboxguest.ko \
143 "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxguest.ko"
145 cd ../vboxsf
146 install -D -m644 vboxsf.ko \
147 "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxsf.ko"
149 cd ../vboxvideo
150 install -D -m644 vboxvideo.ko \
151 "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxvideo.ko"
153 install -D -m 0644 "$stuff/60-vboxguest.rules" \
154 "$fs/etc/udev/rules.d/60-vboxguest.rules"
155 }
157 pre_remove()
158 {
159 sed -i 's/$MODULE_LIST //' $1/etc/rcS.conf
160 }
162 post_install()
163 {
164 KERNEL_VERSION=`grep ^VERSION= $1/var/lib/tazpkg/installed/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
166 chroot "$1/" depmod -a $KERNEL_VERSION-slitaz
167 [ -n "$1" ] || for i in $MODULE_LIST; do modprobe $i ; done
168 grep -qs vboxdrv $1/etc/rcS.conf ||
169 sed -i 's/LOAD_MODULES="/&$MODULE_LIST /' $1/etc/rcS.conf
170 }