wok-6.x annotate virtualbox-ose/receipt @ rev 14150

syslinux: add isohybrid.exe
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 04 09:52:12 2013 +0100 (2013-03-04)
parents 309205710b88
children 7896f0694ef6
rev   line source
slaxemulator@7064 1 # SliTaz package receipt.
slaxemulator@7064 2
slaxemulator@7064 3 PACKAGE="virtualbox-ose"
monghitri@14001 4 VERSION="4.2.6"
slaxemulator@7064 5 CATEGORY="misc"
slaxemulator@7064 6 SHORT_DESC="Powerful x86 virtualization for enterprise as well as home use (Open Source Edition)"
slaxemulator@7064 7 MAINTAINER="slaxemulator@gmail.com"
slaxemulator@7064 8 SOURCE="VirtualBox"
slaxemulator@7814 9 TARBALL="$SOURCE-$VERSION.tar.bz2"
monghitri@14054 10 WEB_SITE="https://www.virtualbox.org/"
slaxemulator@7064 11 WGET_URL="http://download.virtualbox.org/virtualbox/$VERSION/$TARBALL"
pascal@8969 12 PROVIDE="virtualbox"
slaxemulator@7064 13
slaxemulator@9841 14 DEPENDS="libxml2 xorg-libXcursor libIDL xorg-libXinerama libsdl \
slaxemulator@9841 15 xorg-libXmu curl libvncserver libpng jpeg mesa libglu-mesa qt4 vde2"
pascal@10693 16 BUILD_DEPENDS="bin86 dev86 iasl libIDL libsdl-dev mesa-dev libxslt-dev \
pascal@13796 17 libglu-mesa-dev Qt4-dev libsdl-ttf-dev alsa-lib-dev hal-dev xorg-libXtst-dev \
slaxemulator@10578 18 xorg-libXrandr-dev python python-dev xalan-c curl-dev xalan-c-dev \
pascal@10693 19 xerces-c-dev openssl-dev zlib-dev libcap-dev glib-dev libvncserver-dev \
pascal@12446 20 pam pam-dev bzip2 linux-module-headers pkg-config tar wget vde2-dev \
monghitri@14004 21 libpng-dev gsoap-dev libdevmapper-dev makeself"
slaxemulator@9841 22
slaxemulator@7064 23 # Rules to configure and make the package.
slaxemulator@7064 24 compile_rules()
slaxemulator@7064 25 {
slaxemulator@7064 26 cd $src
slaxemulator@8715 27 cp $stuff/LocalConfig.kmk .
slaxemulator@7064 28 ./configure \
slaxemulator@7064 29 --disable-pulse \
slaxemulator@7814 30 --disable-java \
slaxemulator@7814 31 --disable-docs \
slaxemulator@8484 32 --enable-webservice \
slaxemulator@8715 33 --enable-vde \
slaxemulator@7064 34 --with-linux=/usr/src/linux
slaxemulator@7064 35 source ./env.sh
pascal@14073 36 kmk all 2>&1 | grep -v 'kmk: No such'
slaxemulator@7064 37
monghitri@14071 38 # build modules.
slaxemulator@7814 39 KERN_DIR=/usr/src/linux make -C "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
slaxemulator@7064 40 # build guest additions modules
slaxemulator@7814 41 KERN_DIR=/usr/src/linux make -C "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src"
slaxemulator@7064 42 }
slaxemulator@7064 43
slaxemulator@7064 44 # Rules to gen a SliTaz package suitable for Tazpkg.
slaxemulator@7064 45 genpkg_rules()
slaxemulator@7064 46 {
slaxemulator@7064 47 source $src/env.sh
slaxemulator@7064 48 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
slaxemulator@8005 49 mkdir -p $fs/usr/bin $fs/usr/lib/virtualbox/components \
slaxemulator@8715 50 $fs/usr/share/virtualbox/nls \
slaxemulator@8715 51 $fs/usr/lib/virtualbox/ExtensionPacks
slaxemulator@8715 52 install -m 0755 VBox.sh $fs/usr/bin/VBox
slaxemulator@7064 53 sed -i 's/ps -U/ps | grep/' $fs/usr/bin/VBox
slaxemulator@7064 54 ln -sf VBox $fs/usr/bin/VBoxHeadless
slaxemulator@8715 55 ln -sf VBox $fs/usr/bin/vboxheadless
slaxemulator@7064 56 ln -sf VBox $fs/usr/bin/VBoxManage
slaxemulator@8715 57 ln -sf VBox $fs/usr/bin/vboxmanage
slaxemulator@7064 58 ln -sf VBox $fs/usr/bin/VBoxSDL
slaxemulator@8715 59 ln -sf VBox $fs/usr/bin/vboxsdl
slaxemulator@7064 60 ln -sf VBox $fs/usr/bin/VirtualBox
slaxemulator@8715 61 ln -sf VBox $fs/usr/bin/virtualbox
slaxemulator@8715 62 ln -sf VBox $fs/usr/bin/vboxwebsrv
slaxemulator@7064 63
slaxemulator@7064 64 install -m 0755 VBoxTunctl "$fs/usr/bin"
slaxemulator@7064 65
slaxemulator@7064 66 # components
slaxemulator@8715 67 install -D -m 0755 components/* $fs/usr/lib/virtualbox/components
slaxemulator@7064 68
slaxemulator@7064 69 # lib
slaxemulator@7064 70 install -m 0755 *.so "$fs/usr/lib/virtualbox"
slaxemulator@7064 71 install -m 0644 *.gc *.r0 VBoxEFI*.fd "$fs/usr/lib/virtualbox"
slaxemulator@7064 72
slaxemulator@7064 73 #setuid root binaries
slaxemulator@8715 74 install -m 4755 VBoxSDL VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetAdpCtl "$fs/usr/lib/virtualbox"
slaxemulator@7064 75
slaxemulator@7064 76 #other binaries
pascal@9071 77 #install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL vboxwebsrv webtest "$fs/usr/lib/virtualbox"
pascal@9071 78 install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL "$fs/usr/lib/virtualbox"
slaxemulator@7064 79
slaxemulator@7064 80 #language
slaxemulator@7064 81 install -m 0755 nls/*.qm "$fs/usr/share/virtualbox/nls"
slaxemulator@8715 82
slaxemulator@8715 83 #useless scripts
slaxemulator@8715 84 install -m 0755 VBoxCreateUSBNode.sh VBoxSysInfo.sh "$fs/usr/share/virtualbox"
slaxemulator@7064 85
slaxemulator@7064 86 #icon
samuel_trassare@11755 87 install -D -m 0644 VBox.png "$fs/usr/share/pixmaps/virtualbox.png"
slaxemulator@7064 88
slaxemulator@7064 89 #desktop
slaxemulator@7064 90 install -D -m 0644 virtualbox.desktop "$fs/usr/share/applications/virtualbox.desktop"
samuel_trassare@11755 91 sed -i "s|VBox.png|virtualbox|" \
samuel_trassare@11755 92 $fs/usr/share/applications/virtualbox.desktop
slaxemulator@8715 93 install -D -m 0644 virtualbox.xml "$fs/usr/share/mime/packages/virtualbox.xml"
slaxemulator@7064 94
slaxemulator@7064 95 #install configuration
slaxemulator@7064 96 mkdir -p "$fs/etc/vbox"
slaxemulator@7064 97 echo 'lsmod | grep -q vboxdrv || modprobe vboxdrv' > "$fs/etc/vbox/vbox.cfg"
slaxemulator@7064 98 echo 'INSTALL_DIR=/usr/lib/virtualbox' >> "$fs/etc/vbox/vbox.cfg"
slaxemulator@7064 99
slaxemulator@7064 100 #udev
monghitri@14004 101 install -D -m 0644 "$stuff/10-vboxdrv.rules" \
monghitri@14004 102 "$fs/etc/udev/rules.d/10-vboxdrv.rules"
slaxemulator@7064 103
slaxemulator@7064 104 mkdir -p $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/
slaxemulator@8005 105 cd sdk/installer
slaxemulator@7064 106 VBOX_INSTALL_PATH="/usr/lib/virtualbox" python vboxapisetup.py install --root "$fs"
slaxemulator@8010 107 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
slaxemulator@8005 108 cd sdk/bindings/xpcom/python
slaxemulator@7064 109 cp -r xpcom $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/
slaxemulator@7064 110 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/*.py
slaxemulator@7064 111 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/*.py
slaxemulator@7064 112 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/*.py
slaxemulator@8010 113 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
slaxemulator@7064 114
monghitri@14004 115 KERNEL_VERSION=$(grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g')
monghitri@14004 116 #cooking installs modules in linux major version dir
monghitri@14004 117 KBASEVER="${KERNEL_VERSION:0:3}"
monghitri@14004 118
slaxemulator@7064 119 cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
monghitri@14004 120 install -D -m644 vboxdrv.ko "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxdrv.ko"
monghitri@14004 121 install -D -m644 vboxnetflt.ko "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxnetflt.ko"
monghitri@14004 122 install -D -m644 vboxnetadp.ko "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxnetadp.ko"
slaxemulator@7064 123 }
slaxemulator@7064 124
slaxemulator@7154 125 pre_remove()
slaxemulator@7154 126 {
monghitri@14005 127 sed -i "s/vboxdrv vboxnetadp vboxnetflt //" $1/etc/rcS.conf
monghitri@14054 128 chroot $1/ delgroup vboxusers
slaxemulator@7154 129 }
slaxemulator@7154 130
slaxemulator@7154 131 post_install()
slaxemulator@7154 132 {
monghitri@14071 133 #chroot $1/ udevadm control --reload
monghitri@14054 134 KERNEL_VERSION=$( chroot $1/ uname -r)
monghitri@14054 135 chroot $1/ depmod -a $KERNEL_VERSION
monghitri@14054 136 chroot $1/ modprobe -a vboxdrv vboxnetadp vboxnetflt
monghitri@14054 137 grep -qs vboxdrv $1/etc/rcS.conf ||
monghitri@14054 138 sed -i 's/LOAD_MODULES="/&vboxdrv vboxnetadp vboxnetflt /' $1/etc/rcS.conf
monghitri@14054 139 grep -qs vboxuser $1/etc/group || chroot $1/ addgroup -g 199 vboxusers
monghitri@14054 140 echo "add yourself to vboxusers group if you want to access"
monghitri@14054 141 echo "host usb devices: addgroup $USER vboxusers"
monghitri@14054 142 #i can't get udev to do its work
monghitri@14004 143 #echo "then logout and login again"
monghitri@14071 144 echo "then reboot"
slaxemulator@7154 145 }