wok-next rev 7064

Added virtualbox-ose.
author Christopher Rogers <slaxemulator@gmail.com>
date Mon Nov 01 22:42:11 2010 +0000 (2010-11-01)
parents ac18972f39ba
children 77f1970e448d
files virtualbox-ose/receipt virtualbox-ose/stuff/60-vboxguest.rules virtualbox-ose/stuff/60-virtualbox.rules virtualbox-ose/stuff/LocalConfig.kmk virtualbox-ose/stuff/VirtualBox-3.2.0-gcc-4.5-warning-workaround.patch
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/virtualbox-ose/receipt	Mon Nov 01 22:42:11 2010 +0000
     1.3 @@ -0,0 +1,154 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="virtualbox-ose"
     1.7 +VERSION="3.2.10"
     1.8 +CATEGORY="misc"
     1.9 +SHORT_DESC="Powerful x86 virtualization for enterprise as well as home use (Open Source Edition)"
    1.10 +MAINTAINER="slaxemulator@gmail.com"
    1.11 +DEPENDS="libxml2 xorg-libXcursor libIDL xorg-libXinerama libsdl xorg-libXmu curl libvncserver libpng jpeg mesa libglu-mesa qt4"
    1.12 +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"
    1.13 +SOURCE="VirtualBox"
    1.14 +TARBALL="$SOURCE-$VERSION-OSE.tar.bz2"
    1.15 +WEB_SITE="http://virtualbox.org/"
    1.16 +WGET_URL="http://download.virtualbox.org/virtualbox/$VERSION/$TARBALL"
    1.17 +
    1.18 +# Rules to configure and make the package.
    1.19 +compile_rules()
    1.20 +{
    1.21 +	src=$WOK/$PACKAGE/$SOURCE-${VERSION}_OSE
    1.22 +	cd $src
    1.23 +
    1.24 +	patch -Np1 -i ../stuff/VirtualBox-3.2.0-gcc-4.5-warning-workaround.patch
    1.25 +	cp ../stuff/LocalConfig.kmk .
    1.26 +	./configure \
    1.27 +		--disable-pulse \
    1.28 +		--with-linux=/usr/src/linux
    1.29 +	source ./env.sh
    1.30 +	kmk all
    1.31 +
    1.32 +	# build modules
    1.33 +	cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src
    1.34 +	KERN_DIR=/usr/src/linux make
    1.35 +	# build guest additions modules
    1.36 +	cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src
    1.37 +	KERN_DIR=/usr/src/linux make
    1.38 +	cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src/vboxvideo
    1.39 +	KERN_DIR=/usr/src/linux make
    1.40 +}
    1.41 +
    1.42 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.43 +genpkg_rules()
    1.44 +{
    1.45 +	src=$WOK/$PACKAGE/$SOURCE-${VERSION}_OSE
    1.46 +	fs=$WOK/$PACKAGE/taz/$PACKAGE-$VERSION/fs
    1.47 +	stuff=$WOK/$PACKAGE/stuff
    1.48 +
    1.49 +	source $src/env.sh
    1.50 +	cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
    1.51 +	mkdir -p "$fs"/usr/{bin,lib/virtualbox/components,share/virtualbox/nls}
    1.52 +	cp -a VBox.sh $fs/usr/bin/VBox
    1.53 +	sed -i 's/ps -U/ps | grep/' $fs/usr/bin/VBox
    1.54 +	ln -sf VBox $fs/usr/bin/VBoxHeadless
    1.55 +	ln -sf VBox $fs/usr/bin/VBoxManage
    1.56 +	ln -sf VBox $fs/usr/bin/VBoxSDL
    1.57 +	ln -sf VBox $fs/usr/bin/VirtualBox
    1.58 +
    1.59 +	install -m 0755 VBoxTunctl "$fs/usr/bin"
    1.60 +
    1.61 +	# components
    1.62 +	cp -a components/* $fs/usr/lib/virtualbox/components
    1.63 +
    1.64 +	# lib
    1.65 +	install -m 0755 *.so "$fs/usr/lib/virtualbox"
    1.66 +	install -m 0644 *.gc *.r0  VBoxEFI*.fd "$fs/usr/lib/virtualbox"
    1.67 +	
    1.68 +	#setuid root binaries
    1.69 +	install -m 4755 VBoxHeadless VBoxSDL VBoxNetDHCP VBoxNetAdpCtl VirtualBox VBoxBFE "$fs/usr/lib/virtualbox"
    1.70 +	
    1.71 +	#other binaries
    1.72 +	install -m 0755 VBoxManage VBoxSVC VBoxXPCOMIPCD VBoxSysInfo.sh xpidl \
    1.73 +                    VBoxTestOGL EfiThunk "$fs/usr/lib/virtualbox"
    1.74 +
    1.75 +	#language
    1.76 +	install -m 0755 nls/*.qm "$fs/usr/share/virtualbox/nls"
    1.77 +
    1.78 +	#icon
    1.79 +	install -D -m 0644 VBox.png "$fs/usr/share/pixmaps/VBox.png"
    1.80 +
    1.81 +	#desktop
    1.82 +	install -D -m 0644 virtualbox.desktop "$fs/usr/share/applications/virtualbox.desktop"
    1.83 +
    1.84 +	#install configuration
    1.85 +	mkdir -p "$fs/etc/vbox"
    1.86 +	echo 'lsmod | grep -q vboxdrv || modprobe vboxdrv' > "$fs/etc/vbox/vbox.cfg"
    1.87 +	echo 'INSTALL_DIR=/usr/lib/virtualbox' >> "$fs/etc/vbox/vbox.cfg"
    1.88 +
    1.89 +	#udev
    1.90 +	install -D -m 0644 "$stuff/60-virtualbox.rules" \
    1.91 +	"$fs/etc/udev/rules.d/60-virtualbox.rules"
    1.92 +
    1.93 +	mkdir -p $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/
    1.94 +	pushd sdk/installer
    1.95 +	VBOX_INSTALL_PATH="/usr/lib/virtualbox" python vboxapisetup.py install --root "$fs"
    1.96 +	popd
    1.97 +	pushd sdk/bindings/xpcom/python
    1.98 +	cp -r xpcom $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/
    1.99 +	chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/*.py
   1.100 +	chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/*.py
   1.101 +	chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/*.py
   1.102 +	popd
   1.103 +
   1.104 +	# virtualbox-modules
   1.105 +	KERNEL_VERSION=`grep  ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
   1.106 +
   1.107 +	cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
   1.108 +	install -D -m644 vboxdrv.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxdrv.ko"
   1.109 +	install -D -m644 vboxnetflt.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxnetflt.ko"
   1.110 +	install -D -m644 vboxnetadp.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxnetadp.ko"
   1.111 +
   1.112 +	# virtualbox-ose-additions
   1.113 +
   1.114 +	cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions"
   1.115 +	mkdir -p $fs/usr/bin
   1.116 +	mkdir -p $fs/sbin
   1.117 +	mkdir -p $fs/etc/X11/xorg.conf.d
   1.118 +
   1.119 +	install -m755 VBoxClient VBoxControl VBoxService "$fs/usr/bin"
   1.120 +	install -m755 mount.vboxsf "$fs/sbin"
   1.121 +
   1.122 +	install -m644 $src/src/VBox/Additions/x11/Installer/50-vboxmouse.conf \
   1.123 +		$fs/etc/X11/xorg.conf.d/50-vboxmouse.conf
   1.124 +
   1.125 +	install -m755 -D $src/src/VBox/Additions/x11/Installer/98vboxadd-xclient \
   1.126 +		$fs/usr/bin/VBoxClient-all
   1.127 +	install -m755 -D $src/src/VBox/Additions/x11/Installer/vboxclient.desktop \
   1.128 +		$fs/etc/xdg/autostart/vboxclient.desktop
   1.129 +
   1.130 +	install -D vboxmouse_drv_19.so \
   1.131 +		"$fs/usr/lib/xorg/modules/input/vboxmouse.so"
   1.132 +	install -D vboxvideo_drv_19.so \
   1.133 +		"$fs/usr/lib/xorg/modules/drivers/vboxvideo.so"
   1.134 +	install -d "$fs/usr/lib/dri"
   1.135 +	install -m755 VBoxOGL*.so "$fs/usr/lib"
   1.136 +	ln -s /usr/lib/VBoxOGL.so "$fs/usr/lib/dri/vboxvideo_dri.so"
   1.137 +	install -m755 -D pam_vbox.so "$fs/lib/security/pam_vbox.so"
   1.138 +
   1.139 +	# virtualbox-ose-additions-modules
   1.140 +	cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src"
   1.141 +
   1.142 +	cd vboxguest
   1.143 +	install -D -m644 vboxguest.ko \
   1.144 +		"$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxguest.ko"
   1.145 +
   1.146 +	cd ../vboxsf
   1.147 +	install -D -m644 vboxsf.ko \
   1.148 +		"$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxsf.ko"
   1.149 +
   1.150 +	cd ../vboxvideo
   1.151 +	install -D -m644 vboxvideo.ko \
   1.152 +		"$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxvideo.ko"
   1.153 +
   1.154 +	install -D -m 0644 "$stuff/60-vboxguest.rules" \
   1.155 +		"$fs/etc/udev/rules.d/60-vboxguest.rules"
   1.156 +}
   1.157 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/virtualbox-ose/stuff/60-vboxguest.rules	Mon Nov 01 22:42:11 2010 +0000
     2.3 @@ -0,0 +1,2 @@
     2.4 +ACTION=="add", KERNEL=="vboxguest", SUBSYSTEM=="misc", OWNER="root", MODE="0600"
     2.5 +ACTION=="add", KERNEL=="vboxuser", SUBSYSTEM=="misc", OWNER="root", MODE="0666"
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/virtualbox-ose/stuff/60-virtualbox.rules	Mon Nov 01 22:42:11 2010 +0000
     3.3 @@ -0,0 +1,1 @@
     3.4 +KERNEL=="vboxdrv", GROUP="vboxusers", ENV{ACL_MANAGE}="1"
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/virtualbox-ose/stuff/LocalConfig.kmk	Mon Nov 01 22:42:11 2010 +0000
     4.3 @@ -0,0 +1,15 @@
     4.4 +VBOX_WITH_ADDITION_DRIVERS =
     4.5 +VBOX_WITH_INSTALLER = 1
     4.6 +VBOX_WITH_LINUX_ADDITIONS = 1
     4.7 +VBOX_WITH_X11_ADDITIONS = 1
     4.8 +VBOX_WITH_TESTCASES =
     4.9 +VBOX_WITH_TESTSUITE =
    4.10 +VBOX_WITH_ORIGIN :=
    4.11 +VBOX_PATH_APP_PRIVATE_ARCH := /usr/lib/virtualbox
    4.12 +VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH)
    4.13 +VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH)
    4.14 +VBOX_PATH_APP_PRIVATE := /usr/share/virtualbox
    4.15 +VBOX_PATH_APP_DOCS = $(VBOX_PATH_PACKAGE_DOCS)
    4.16 +VBOX_WITH_REGISTRATION_REQUEST =
    4.17 +VBOX_WITH_UPDATE_REQUEST =
    4.18 +VBOX_WITH_VNC := 1
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/virtualbox-ose/stuff/VirtualBox-3.2.0-gcc-4.5-warning-workaround.patch	Mon Nov 01 22:42:11 2010 +0000
     5.3 @@ -0,0 +1,14 @@
     5.4 +--- VirtualBox-3.2.0_OSE/src/VBox/VMM/VMMAll/PGMAllGst.h.ark	2010-05-19 14:01:59.307802654 +0200
     5.5 ++++ VirtualBox-3.2.0_OSE/src/VBox/VMM/VMMAll/PGMAllGst.h	2010-05-19 14:07:31.690925013 +0200
     5.6 +@@ -28,6 +28,11 @@ RT_C_DECLS_END
     5.7 + 
     5.8 + 
     5.9 + 
    5.10 ++#if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 5
    5.11 ++    // Work around gcc 4.5 producing warnings when a X86PDPE is constructed
    5.12 ++    // while the Makefiles use -Werror
    5.13 ++#pragma GCC diagnostic warning "-Wuninitialized"
    5.14 ++#endif
    5.15 + /**
    5.16 +  * Gets effective Guest OS page information.
    5.17 +  *