aboutsummaryrefslogtreecommitdiff
path: root/system/virtualbox
diff options
context:
space:
mode:
Diffstat (limited to 'system/virtualbox')
-rw-r--r--system/virtualbox/LocalConfig.kmk37
-rw-r--r--system/virtualbox/README22
-rw-r--r--system/virtualbox/README.SLACKWARE21
-rw-r--r--system/virtualbox/doinst.sh43
-rw-r--r--system/virtualbox/slack-desc19
-rw-r--r--system/virtualbox/vbox.cfg5
-rw-r--r--system/virtualbox/vboxdrv.sh-setup.diff69
-rw-r--r--system/virtualbox/virtualbox-4-makeself-check.patch10
-rw-r--r--system/virtualbox/virtualbox.SlackBuild266
-rw-r--r--system/virtualbox/virtualbox.default25
-rw-r--r--system/virtualbox/virtualbox.info16
11 files changed, 533 insertions, 0 deletions
diff --git a/system/virtualbox/LocalConfig.kmk b/system/virtualbox/LocalConfig.kmk
new file mode 100644
index 0000000000000..acf37c059e220
--- /dev/null
+++ b/system/virtualbox/LocalConfig.kmk
@@ -0,0 +1,37 @@
+# Modify building of VirtualBox to get a cleaner system
+
+DEFS += RTPATH_APP_PRIVATE=\"/usr/share/virtualbox\"
+
+# don't build testcases to save time, they are not needed for the package
+VBOX_WITH_TESTCASES :=
+VBOX_WITH_TESTSUITE :=
+
+# don't build guest-additions, they will come in a separate build
+VBOX_WITHOUT_ADDITIONS := 1
+
+KBUILD_MSG_STYLE := brief
+
+VBOX_WITH_ORIGIN :=
+VBOX_PATH_APP_PRIVATE_ARCH := /usr/LIBDIR/virtualbox
+VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH)
+VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH)
+VBOX_PATH_APP_PRIVATE := /usr/share/virtualbox
+VBOX_PATH_APP_DOCS = $(VBOX_PATH_PACKAGE_DOCS)
+
+# Build with VNC server support
+VBOX_WITH_VNC = 1
+
+# Disable showing registration window on startup
+VBOX_WITH_REGISTRATION =
+
+# gcc 4.5 fix
+VBOX_WITH_WARNINGS_AS_ERRORS :=
+
+# Do not require pam
+VBOX_WITH_PAM :=
+
+# Correct path to java
+VBOX_JAVA_HOME := /usr/LIBDIR/java
+
+# Do not build docs from source. Depends on texlive...
+VBOX_WITHOUT_DOCS := 1
diff --git a/system/virtualbox/README b/system/virtualbox/README
new file mode 100644
index 0000000000000..4fa5f09819db9
--- /dev/null
+++ b/system/virtualbox/README
@@ -0,0 +1,22 @@
+VirtualBox Open Source Edition (OSE) is a general-purpose full
+virtualizer for x86 hardware.
+
+By default VirtualBox will be compiled with hardening enabled. That
+means all binaries will be run suid root, which is the default
+behaviour of upstream packages. However, you are still able
+to disable this by passing HARDENING=no to the script.
+
+You have to create a vboxusers group, e.g. "groupadd -g 215 vboxusers"
+and make your user a member of that group.
+
+To compile virtualbox without the Qt4 GUI pass QT4=no to the script.
+
+To enable the webservice pass WEBSERVICE=yes to the script. This adds gsoap
+to the list of required dependencies.
+
+If you want to attach VirtualBox to a VDE network you will need vde2.
+
+VirtualBox requires acpica, and the virtualbox-kernel package is needed at
+runtime. See README.SLACKWARE for some setup notes.
+
+NOTE: This will not build on a stock x86_64 system.
diff --git a/system/virtualbox/README.SLACKWARE b/system/virtualbox/README.SLACKWARE
new file mode 100644
index 0000000000000..9068a0bd374c3
--- /dev/null
+++ b/system/virtualbox/README.SLACKWARE
@@ -0,0 +1,21 @@
+You'll need to add the following lines to /etc/rc.d/rc.local:
+
+ # Start vboxdrv
+ if [ -x /etc/rc.d/rc.vboxdrv ]; then
+ /etc/rc.d/rc.vboxdrv start
+ fi
+
+This will load the support kernel module for VirtualBox.
+
+
+You'll then need to add the following lines to /etc/rc.d/rc.local_shutdown:
+
+ # Stop vboxdrv
+ if [ -x /etc/rc.d/rc.vboxdrv ]; then
+ /etc/rc.d/rc.vboxdrv stop
+ fi
+
+
+Any user accounts that plan to use virtualbox will need to be members
+of the "vboxusers" group.
+
diff --git a/system/virtualbox/doinst.sh b/system/virtualbox/doinst.sh
new file mode 100644
index 0000000000000..a5d2e8eae609a
--- /dev/null
+++ b/system/virtualbox/doinst.sh
@@ -0,0 +1,43 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -x /usr/bin/update-mime-database ]; then
+ /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
+
+# Prepare the new configuration files
+config etc/vbox/vbox.cfg.new
+config etc/default/virtualbox.new
+preserve_perms etc/rc.d/rc.vboxdrv.new
+
diff --git a/system/virtualbox/slack-desc b/system/virtualbox/slack-desc
new file mode 100644
index 0000000000000..bc28f01128f05
--- /dev/null
+++ b/system/virtualbox/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler-------------------------------------------------------|
+virtualbox: virtualbox (x86 Virtualizer)
+virtualbox:
+virtualbox: VirtualBox is a powerful PC virtualization solution allowingyou to run
+virtualbox: a wide range of PC operating systems on your Linux system. This
+virtualbox: includes Windows, Linux, FreeBSD, DOS, OpenBSD and others. VirtualBox
+virtualbox: comes with a broad feature set and excellent performance, making it
+virtualbox: the premier virtualization software solution on the market.
+virtualbox:
+virtualbox: Homepage: http://www.virtualbox.org
+virtualbox:
+virtualbox:
diff --git a/system/virtualbox/vbox.cfg b/system/virtualbox/vbox.cfg
new file mode 100644
index 0000000000000..f54062227355f
--- /dev/null
+++ b/system/virtualbox/vbox.cfg
@@ -0,0 +1,5 @@
+# VirtualBox installation directory
+INSTALL_DIR="/usr/LIBDIR/virtualbox"
+
+# vboxdrv source location
+MODULE_SRC="/usr/src" \ No newline at end of file
diff --git a/system/virtualbox/vboxdrv.sh-setup.diff b/system/virtualbox/vboxdrv.sh-setup.diff
new file mode 100644
index 0000000000000..56f0e61b35ec5
--- /dev/null
+++ b/system/virtualbox/vboxdrv.sh-setup.diff
@@ -0,0 +1,69 @@
+--- mnt/progs/slack/test/VirtualBox-3.2.10_OSE/src/VBox/Installer/linux/vboxdrv.sh.in 2010-10-08 22:10:25.000000000 +0200
++++ tmp/vboxdrv.sh.in 2010-10-14 17:43:18.545000084 +0200
+@@ -43,16 +43,8 @@
+
+ if [ -n "$INSTALL_DIR" ]; then
+ VBOXMANAGE="$INSTALL_DIR/VBoxManage"
+- DODKMS="$INSTALL_DIR/src/vboxhost/do_dkms"
+- BUILDVBOXDRV="$INSTALL_DIR/src/vboxhost/vboxdrv/build_in_tmp"
+- BUILDVBOXNETFLT="$INSTALL_DIR/src/vboxhost/vboxnetflt/build_in_tmp"
+- BUILDVBOXNETADP="$INSTALL_DIR/src/vboxhost/vboxnetadp/build_in_tmp"
+ else
+ VBOXMANAGE="/usr/lib/%PACKAGE%/VBoxManage"
+- DODKMS="/usr/share/%PACKAGE%/src/vboxhost/do_dkms"
+- BUILDVBOXDRV="/usr/share/%PACKAGE%/src/vboxhost/vboxdrv/build_in_tmp"
+- BUILDVBOXNETFLT="/usr/share/%PACKAGE%/src/vboxhost/vboxnetflt/build_in_tmp"
+- BUILDVBOXNETADP="/usr/share/%PACKAGE%/src/vboxhost/vboxnetadp/build_in_tmp"
+ fi
+
+ # silently exit if the package was uninstalled but not purged,
+@@ -284,48 +276,7 @@
+ # setup_script
+ setup()
+ {
+- stop
+- begin_msg "Uninstalling old VirtualBox DKMS kernel modules"
+- $DODKMS uninstall > $LOG
+- succ_msg
+- if find /lib/modules/`uname -r` -name "vboxnetadp\.*" 2>/dev/null|grep -q vboxnetadp; then
+- begin_msg "Removing old VirtualBox netadp kernel module"
+- find /lib/modules/`uname -r` -name "vboxnetadp\.*" 2>/dev/null|xargs rm -f 2>/dev/null
+- succ_msg
+- fi
+- if find /lib/modules/`uname -r` -name "vboxnetflt\.*" 2>/dev/null|grep -q vboxnetflt; then
+- begin_msg "Removing old VirtualBox netflt kernel module"
+- find /lib/modules/`uname -r` -name "vboxnetflt\.*" 2>/dev/null|xargs rm -f 2>/dev/null
+- succ_msg
+- fi
+- if find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then
+- begin_msg "Removing old VirtualBox kernel module"
+- find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2>/dev/null
+- succ_msg
+- fi
+- begin_msg "Trying to register the VirtualBox kernel modules using DKMS"
+- if ! $DODKMS install >> $LOG; then
+- fail_msg "Failed, trying without DKMS"
+- begin_msg "Recompiling VirtualBox kernel modules"
+- if ! $BUILDVBOXDRV \
+- --save-module-symvers /tmp/vboxdrv-Module.symvers \
+- --no-print-directory install >> $LOG 2>&1; then
+- failure "Look at $LOG to find out what went wrong"
+- fi
+- if ! $BUILDVBOXNETFLT \
+- --use-module-symvers /tmp/vboxdrv-Module.symvers \
+- --no-print-directory install >> $LOG 2>&1; then
+- failure "Look at $LOG to find out what went wrong"
+- fi
+- if ! $BUILDVBOXNETADP \
+- --use-module-symvers /tmp/vboxdrv-Module.symvers \
+- --no-print-directory install >> $LOG 2>&1; then
+- failure "Look at $LOG to find out what went wrong"
+- fi
+- fi
+- rm -f /etc/vbox/module_not_compiled
+- succ_msg
+- start
++ echo "Not implemented! Please use the virtualbox-kernel.SlackBuild available at SlackBuilds.org instead."
+ }
+
+ dmnstatus()
diff --git a/system/virtualbox/virtualbox-4-makeself-check.patch b/system/virtualbox/virtualbox-4-makeself-check.patch
new file mode 100644
index 0000000000000..e1fcb8c2f471c
--- /dev/null
+++ b/system/virtualbox/virtualbox-4-makeself-check.patch
@@ -0,0 +1,10 @@
+--- VirtualBox-4.0.0_OSE/configure
++++ VirtualBox-4.0.0_OSE/configure
+@@ -2527,7 +2527,6 @@
+ check_compiler_h
+ [ "$BUILD_MACHINE" = "amd64" -a $WITH_VMMRAW -eq 1 ] && check_32bit
+ # tools/common/makeself*
+- [ $OSE -ge 1 ] && check_makeself
+ fi
+
+ [ -n "$SETUP_WINE" ] && setup_wine
diff --git a/system/virtualbox/virtualbox.SlackBuild b/system/virtualbox/virtualbox.SlackBuild
new file mode 100644
index 0000000000000..1d09bbdcc8e5d
--- /dev/null
+++ b/system/virtualbox/virtualbox.SlackBuild
@@ -0,0 +1,266 @@
+#!/bin/sh
+
+# Slackware build script for virtualbox-ose
+
+# Copyright 2008-2011 Heinz Wiesinger, Amsterdam, The Netherlands
+# Copyright 2008 Mauro Giachero <mauro.giachero@gmail.com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=virtualbox
+SRCNAM=VirtualBox
+VERSION=4.0.4
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+# kmk doesn't support MAKEFLAGS, so we use JOBS here
+JOBS=${JOBS:-3}
+
+# Define Variable Names
+qtgui=""
+
+# Check for vboxusers group here
+if ! grep ^vboxusers: /etc/group 2>&1 > /dev/null; then
+ echo " You must have a vboxusers group to run this script."
+ echo " # groupadd -g 215 vboxusers"
+ exit 1
+fi
+
+# Enable Hardening - Defaulting to yes as requested by upstream
+if [ "${HARDENING:-yes}" = "yes" ]; then
+ harden="--enable-hardening"
+else
+ harden="--disable-hardening"
+fi
+
+if [ "${WEBSERVICE:-no}" = "no" ]; then
+ web_service=""
+ vboxwebsrv=""
+else
+ web_service="--enable-webservice"
+ vboxwebsrv="vboxwebsrv"
+ if ! grep ^vboxweb: /etc/passwd 2>&1 > /dev/null; then
+ echo " You must have a vboxweb user to run this script."
+ echo " # useradd -u 240 -g 215 -d /var/lib/vboxweb vboxweb"
+ exit 1
+ fi
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ BUILDDIR="x86"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+ BUILDDIR="x86"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ BUILDDIR="amd64"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-${VERSION}_OSE
+tar xvf $CWD/$SRCNAM-${VERSION}.tar.bz2
+cd $SRCNAM-${VERSION}_OSE
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+GROUP="vboxusers"
+MODE="755"
+mkdir -p $PKG/lib/udev/rules.d
+echo 'KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="vboxusers", MODE="0660"' \
+ > $PKG/lib/udev/rules.d/60-vboxdrv.rules
+
+# We don't want a init-script building kernel modules.
+# Use virtualbox-kernel.SlackBuild for this.
+patch -d src/VBox/Installer/linux -i $CWD/vboxdrv.sh-setup.diff
+
+# Support for the qt4-frontend
+if [ "${QT4:-yes}" = "yes" ]; then
+ mkdir -p $PKG/usr/share/applications
+ guiapp="VirtualBox"
+else
+ qtgui+=" --disable-qt4"
+ guiapp=""
+fi
+
+# Do not require makeself. We don't plan on building an automatic installer
+# Patch taken from gentoo
+patch -p1 -i $CWD/virtualbox-4-makeself-check.patch
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --ose \
+ --disable-kmods \
+ --disable-pulse \
+ --enable-vde \
+ $web_service \
+ $harden \
+ $qtgui
+
+. ./env.sh
+
+cp $CWD/LocalConfig.kmk .
+sed -i "s|LIBDIR|lib$LIBDIRSUFFIX|" ./LocalConfig.kmk
+
+kmk -j ${JOBS} LOCALCFG=./LocalConfig.kmk
+
+mkdir -p $PKG/usr/{lib$LIBDIRSUFFIX,share,include}/virtualbox \
+ $PKG/usr/{bin,src} \
+ $PKG/usr/share/{pixmaps,mime/packages} \
+ $PKG/etc/{default,rc.d,vbox}
+
+cp -f src/VBox/Installer/linux/vboxdrv.sh.in $PKG/etc/rc.d/rc.vboxdrv.new
+sed -i "s/%PACKAGE%/virtualbox/g" $PKG/etc/rc.d/rc.vboxdrv.new
+sed -i "s/%NOLSB%/yes/" $PKG/etc/rc.d/rc.vboxdrv.new
+sed -i "s/%DEBIAN%/no/" $PKG/etc/rc.d/rc.vboxdrv.new
+sed -i "s/%GROUP%/vboxusers/" $PKG/etc/rc.d/rc.vboxdrv.new
+sed -i "s/\[ -z \"\$DEBIAN\"/#\[ -z \"\$DEBIAN\"/" $PKG/etc/rc.d/rc.vboxdrv.new
+
+cp -f $CWD/vbox.cfg $PKG/etc/vbox/vbox.cfg.new
+sed -i "s|LIBDIR|lib$LIBDIRSUFFIX|" $PKG/etc/vbox/vbox.cfg.new
+cp -f $CWD/virtualbox.default $PKG/etc/default/virtualbox.new
+
+cd out/linux.$BUILDDIR/release/bin/
+ rm -f vboxdrv.ko
+ mv src $PKG/usr/src/virtualbox-kernel-$VERSION
+
+ if [ "${QT4:-yes}" = "yes" ]; then
+ mv virtualbox.desktop $PKG/usr/share/applications/
+ sed -i "s|\$VBOX_DOC_PATH|/usr/share/virtualbox|" \
+ $PKG/usr/share/applications/virtualbox.desktop
+ fi
+ mv VBox.png $PKG/usr/share/pixmaps/
+
+ cd icons
+ for i in *; do
+ install -d $PKG/usr/share/icons/hicolor/$i/mimetypes
+ mv $i/* $PKG/usr/share/icons/hicolor/$i/mimetypes
+ done
+ cd -
+ rm -rf icons
+
+ mv virtualbox.xml $PKG/usr/share/mime/packages
+
+ export VBOX_INSTALL_PATH=/usr/lib$LIBDIRSUFFIX/virtualbox
+ cd sdk/installer
+ python ./vboxapisetup.py install --prefix "/usr" --root $PKG
+ cd -
+ rm -rf sdk/installer
+
+ mv sdk $PKG/usr/share/virtualbox/
+ if [ "${QT4:-yes}" = "yes" ]; then
+ mv nls* *.tar.bz2 $PKG/usr/share/virtualbox/
+ fi
+ install -m $MODE -g $GROUP VBoxSysInfo.sh $PKG/usr/share/virtualbox/
+ install -m $MODE -g $GROUP VBoxCreateUSBNode.sh $PKG/usr/share/virtualbox/
+ install -m $MODE -g $GROUP VBoxTunctl $PKG/usr/bin/
+ rm -f VBoxSysInfo.sh VBoxCreateUSBNode.sh VBoxTunctl
+ mv * $PKG/usr/lib$LIBDIRSUFFIX/virtualbox/
+ chown -R root:$GROUP $PKG/usr/lib$LIBDIRSUFFIX/virtualbox/
+ chmod -R $MODE $PKG/usr/lib$LIBDIRSUFFIX/virtualbox/
+ mv $PKG/usr/lib$LIBDIRSUFFIX/virtualbox/VBox.sh $PKG/usr/lib$LIBDIRSUFFIX/virtualbox/VBox
+cd $TMP/$SRCNAM-${VERSION}_OSE
+
+for i in VBoxManage vboxmanage VBoxSDL vboxsdl VBoxHeadless vboxheadless VBoxVRDP $guiapp $vboxwebsrv; do
+ ln -s /usr/lib$LIBDIRSUFFIX/virtualbox/VBox $PKG/usr/bin/$i
+done
+
+if [ "$guiapp" = "VirtualBox" ]; then
+ ln -s /usr/lib$LIBDIRSUFFIX/virtualbox/VBox $PKG/usr/bin/virtualbox
+fi
+
+if [ "$vboxwebsrv" = "vboxwebsrv" ]; then
+ mkdir -p $PKG/var/{lib,log}/vboxweb
+ chown vboxweb:vboxusers $PKG/var/{lib,log}/vboxweb
+ cp -f src/VBox/Installer/linux/vboxweb-service.sh.in $PKG/etc/rc.d/rc.vboxweb-service.new
+ sed -i "s/%PACKAGE%/virtualbox/g" $PKG/etc/rc.d/rc.vboxweb-service.new
+ sed -i "s/%NOLSB%/yes/" $PKG/etc/rc.d/rc.vboxweb-service.new
+ sed -i "s/%DEBIAN%/no/" $PKG/etc/rc.d/rc.vboxweb-service.new
+ sed -i "s/\[ -z \"\$DEBIAN\"/#\[ -z \"\$DEBIAN\"/" $PKG/etc/rc.d/rc.vboxweb-service.new
+fi
+
+if [ "$harden" = "--enable-hardening" ]; then
+ for i in VBoxSDL VBoxHeadless $guiapp VBoxNetDHCP VBoxNetAdpCtl; do
+ chmod 4711 $PKG/usr/lib$LIBDIRSUFFIX/virtualbox/$i
+ done
+fi
+
+# install headers. Needed by some third party tools
+cp -rf include/* $PKG/usr/include/virtualbox/
+rm -f $PKG/usr/include/virtualbox/Makefile.kmk
+
+cp -f $CWD/VBoxGuestAdditions_$VERSION.iso \
+ $PKG/usr/share/virtualbox/VBoxGuestAdditions.iso
+
+cp -f $CWD/UserManual.pdf \
+ $PKG/usr/share/virtualbox/UserManual.pdf
+
+cp -f $CWD/SDKRef.pdf \
+ $PKG/usr/share/virtualbox/SDKRef.pdf
+
+# install profile.d scripts for 3rd party apps
+mkdir -p $PKG/etc/profile.d/
+cat << EOF > $PKG/etc/profile.d/vbox.csh
+#!/bin/csh
+setenv VBOX_PROGRAM_PATH /usr/lib${LIBDIRSUFFIX}/virtualbox/
+setenv VBOX_SDK_PATH /usr/share/virtualbox/sdk/
+EOF
+cat << EOF > $PKG/etc/profile.d/vbox.sh
+#!/bin/sh
+export VBOX_PROGRAM_PATH=/usr/lib${LIBDIRSUFFIX}/virtualbox/
+export VBOX_SDK_PATH=/usr/share/virtualbox/sdk/
+EOF
+chmod 0755 $PKG/etc/profile.d/*
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -f COPYING COPYING.CDDL $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+if [ "$vboxwebsrv" = "vboxwebsrv" ]; then
+ echo "preserve_perms etc/rc.d/rc.vboxweb-service.new" >> $PKG/install/doinst.sh
+fi
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/virtualbox/virtualbox.default b/system/virtualbox/virtualbox.default
new file mode 100644
index 0000000000000..bcc3c08e162b6
--- /dev/null
+++ b/system/virtualbox/virtualbox.default
@@ -0,0 +1,25 @@
+# /etc/default/virtualbox - Version 1.0 2009-07-11 by Heinz Wiesinger
+#
+# "/etc/rc.d/rc.vboxdrv stop_vms" will try to stop running vms of the users
+# defined here.
+SHUTDOWN_USERS=""
+
+# The default shutdown method "/etc/rc.d/rc.vboxdrv stop_vms" should use
+SHUTDOWN="savestate"
+#SHUTDOWN="acpibutton"
+#SHUTDOWN="savestate"
+
+## vboxwebsrv options
+
+# user to run vboxwebsrv (required)
+VBOXWEB_USER="vboxweb"
+
+#VBOXWEB_HOST=
+#VBOXWEB_PORT=
+#VBOXWEB_TIMEOUT=
+#VBOXWEB_CHECK_INTERVAL=
+#VBOXWEB_THREADS=
+#VBOXWEB_KEEPALIVE=
+
+# Logfile location
+VBOXWEB_LOGFILE="/var/log/vboxweb/vboxweb.log"
diff --git a/system/virtualbox/virtualbox.info b/system/virtualbox/virtualbox.info
new file mode 100644
index 0000000000000..a3124045f11cc
--- /dev/null
+++ b/system/virtualbox/virtualbox.info
@@ -0,0 +1,16 @@
+PRGNAM="virtualbox"
+VERSION="4.0.4"
+HOMEPAGE="http://www.virtualbox.org"
+DOWNLOAD="http://download.virtualbox.org/virtualbox/4.0.4/VirtualBox-4.0.4.tar.bz2 \
+ http://download.virtualbox.org/virtualbox/4.0.4/VBoxGuestAdditions_4.0.4.iso \
+ http://download.virtualbox.org/virtualbox/4.0.4/UserManual.pdf \
+ http://download.virtualbox.org/virtualbox/4.0.4/SDKRef.pdf"
+MD5SUM="b4770ca14d1a8cbad9b3eb0e0028ff4b \
+ 88604a0e94bf1b8c0d0f18fe4314cfdf \
+ bf8007eea0042f745b3c252bbe7586c2 \
+ 3248ffc8e3193cb86474fcb530be4efd"
+DOWNLOAD_x86_64="UNTESTED"
+MD5SUM_x86_64=""
+MAINTAINER="Heinz Wiesinger"
+EMAIL="pprkut@liwjatan.at"
+APPROVED="rworkman"