wok-current view virtualbox-ose/receipt @ rev 14900
Add firmware-mod-kit
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Jul 31 11:20:11 2013 +0200 (2013-07-31) |
parents | 309205710b88 |
children | 7896f0694ef6 |
line source
1 # SliTaz package receipt.
3 PACKAGE="virtualbox-ose"
4 VERSION="4.2.6"
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="https://www.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 libglu-mesa-dev 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 gsoap-dev libdevmapper-dev makeself"
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 cd $src
27 cp $stuff/LocalConfig.kmk .
28 ./configure \
29 --disable-pulse \
30 --disable-java \
31 --disable-docs \
32 --enable-webservice \
33 --enable-vde \
34 --with-linux=/usr/src/linux
35 source ./env.sh
36 kmk all 2>&1 | grep -v 'kmk: No such'
38 # build modules.
39 KERN_DIR=/usr/src/linux make -C "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
40 # build guest additions modules
41 KERN_DIR=/usr/src/linux make -C "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src"
42 }
44 # Rules to gen a SliTaz package suitable for Tazpkg.
45 genpkg_rules()
46 {
47 source $src/env.sh
48 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
49 mkdir -p $fs/usr/bin $fs/usr/lib/virtualbox/components \
50 $fs/usr/share/virtualbox/nls \
51 $fs/usr/lib/virtualbox/ExtensionPacks
52 install -m 0755 VBox.sh $fs/usr/bin/VBox
53 sed -i 's/ps -U/ps | grep/' $fs/usr/bin/VBox
54 ln -sf VBox $fs/usr/bin/VBoxHeadless
55 ln -sf VBox $fs/usr/bin/vboxheadless
56 ln -sf VBox $fs/usr/bin/VBoxManage
57 ln -sf VBox $fs/usr/bin/vboxmanage
58 ln -sf VBox $fs/usr/bin/VBoxSDL
59 ln -sf VBox $fs/usr/bin/vboxsdl
60 ln -sf VBox $fs/usr/bin/VirtualBox
61 ln -sf VBox $fs/usr/bin/virtualbox
62 ln -sf VBox $fs/usr/bin/vboxwebsrv
64 install -m 0755 VBoxTunctl "$fs/usr/bin"
66 # components
67 install -D -m 0755 components/* $fs/usr/lib/virtualbox/components
69 # lib
70 install -m 0755 *.so "$fs/usr/lib/virtualbox"
71 install -m 0644 *.gc *.r0 VBoxEFI*.fd "$fs/usr/lib/virtualbox"
73 #setuid root binaries
74 install -m 4755 VBoxSDL VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetAdpCtl "$fs/usr/lib/virtualbox"
76 #other binaries
77 #install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL vboxwebsrv webtest "$fs/usr/lib/virtualbox"
78 install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL "$fs/usr/lib/virtualbox"
80 #language
81 install -m 0755 nls/*.qm "$fs/usr/share/virtualbox/nls"
83 #useless scripts
84 install -m 0755 VBoxCreateUSBNode.sh VBoxSysInfo.sh "$fs/usr/share/virtualbox"
86 #icon
87 install -D -m 0644 VBox.png "$fs/usr/share/pixmaps/virtualbox.png"
89 #desktop
90 install -D -m 0644 virtualbox.desktop "$fs/usr/share/applications/virtualbox.desktop"
91 sed -i "s|VBox.png|virtualbox|" \
92 $fs/usr/share/applications/virtualbox.desktop
93 install -D -m 0644 virtualbox.xml "$fs/usr/share/mime/packages/virtualbox.xml"
95 #install configuration
96 mkdir -p "$fs/etc/vbox"
97 echo 'lsmod | grep -q vboxdrv || modprobe vboxdrv' > "$fs/etc/vbox/vbox.cfg"
98 echo 'INSTALL_DIR=/usr/lib/virtualbox' >> "$fs/etc/vbox/vbox.cfg"
100 #udev
101 install -D -m 0644 "$stuff/10-vboxdrv.rules" \
102 "$fs/etc/udev/rules.d/10-vboxdrv.rules"
104 mkdir -p $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/
105 cd sdk/installer
106 VBOX_INSTALL_PATH="/usr/lib/virtualbox" python vboxapisetup.py install --root "$fs"
107 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
108 cd sdk/bindings/xpcom/python
109 cp -r xpcom $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/
110 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/*.py
111 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/*.py
112 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/*.py
113 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
115 KERNEL_VERSION=$(grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g')
116 #cooking installs modules in linux major version dir
117 KBASEVER="${KERNEL_VERSION:0:3}"
119 cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
120 install -D -m644 vboxdrv.ko "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxdrv.ko"
121 install -D -m644 vboxnetflt.ko "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxnetflt.ko"
122 install -D -m644 vboxnetadp.ko "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxnetadp.ko"
123 }
125 pre_remove()
126 {
127 sed -i "s/vboxdrv vboxnetadp vboxnetflt //" $1/etc/rcS.conf
128 chroot $1/ delgroup vboxusers
129 }
131 post_install()
132 {
133 #chroot $1/ udevadm control --reload
134 KERNEL_VERSION=$( chroot $1/ uname -r)
135 chroot $1/ depmod -a $KERNEL_VERSION
136 chroot $1/ modprobe -a vboxdrv vboxnetadp vboxnetflt
137 grep -qs vboxdrv $1/etc/rcS.conf ||
138 sed -i 's/LOAD_MODULES="/&vboxdrv vboxnetadp vboxnetflt /' $1/etc/rcS.conf
139 grep -qs vboxuser $1/etc/group || chroot $1/ addgroup -g 199 vboxusers
140 echo "add yourself to vboxusers group if you want to access"
141 echo "host usb devices: addgroup $USER vboxusers"
142 #i can't get udev to do its work
143 #echo "then logout and login again"
144 echo "then reboot"
145 }