summaryrefslogtreecommitdiffstats
path: root/system/virtualbox-addons
diff options
context:
space:
mode:
author Heinz Wiesinger2011-04-03 20:53:35 +0200
committer Robby Workman2011-04-06 01:54:18 +0200
commit04e8c0f66a171c8f4dd25303f1bcc0b22c5099be (patch)
treeb2adb8b2f26272ebd45cca7129087c9d3df46938 /system/virtualbox-addons
parent55e35b855ca231957b814320d2328656358b56a1 (diff)
downloadslackbuilds-04e8c0f66a171c8f4dd25303f1bcc0b22c5099be.tar.gz
system/virtualbox-addons: Renamed from virtualbox-ose-addons and updated for version 4.0.4
Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
Diffstat (limited to 'system/virtualbox-addons')
-rw-r--r--system/virtualbox-addons/LocalConfig.kmk10
-rw-r--r--system/virtualbox-addons/README10
-rw-r--r--system/virtualbox-addons/README.SLACKWARE35
-rw-r--r--system/virtualbox-addons/doinst.sh32
-rw-r--r--system/virtualbox-addons/rc.vboxadd.diff36
-rw-r--r--system/virtualbox-addons/slack-desc19
-rw-r--r--system/virtualbox-addons/virtualbox-addons.SlackBuild165
-rw-r--r--system/virtualbox-addons/virtualbox-addons.info10
8 files changed, 317 insertions, 0 deletions
diff --git a/system/virtualbox-addons/LocalConfig.kmk b/system/virtualbox-addons/LocalConfig.kmk
new file mode 100644
index 0000000000..2051b44755
--- /dev/null
+++ b/system/virtualbox-addons/LocalConfig.kmk
@@ -0,0 +1,10 @@
+# Modify building of VirtualBox to get a cleaner system
+
+# build only guest-additions
+VBOX_ONLY_ADDITIONS := 1
+
+KBUILD_MSG_STYLE := brief
+
+VBOX_OSE := 1
+
+VBOX_WITH_PAM =
diff --git a/system/virtualbox-addons/README b/system/virtualbox-addons/README
new file mode 100644
index 0000000000..dc61b13938
--- /dev/null
+++ b/system/virtualbox-addons/README
@@ -0,0 +1,10 @@
+This is the userspace part of the VirtualBox Guest Additions.
+Together with virtualbox-kernel-addons they enable shared folders,
+shared clipboard, etcetera, inside your Slackware guest machines.
+
+See README.SLACKWARE for setup information.
+
+NOTE: This will not build on x86_64
+
+This package is intended to be used on GUEST / VIRTUAL MACHINES running
+Slackware, NOT the host system.
diff --git a/system/virtualbox-addons/README.SLACKWARE b/system/virtualbox-addons/README.SLACKWARE
new file mode 100644
index 0000000000..da28c0fd41
--- /dev/null
+++ b/system/virtualbox-addons/README.SLACKWARE
@@ -0,0 +1,35 @@
+You'll need to add the following lines to /etc/rc.d/rc.local:
+
+ # Start vboxadd
+ if [ -x /etc/rc.d/rc.vboxadd ]; then
+ /etc/rc.d/rc.vboxadd start
+ fi
+
+ # Start vboxadd-service
+ if [ -x /etc/rc.d/rc.vboxadd-service ]; then
+ /etc/rc.d/rc.vboxadd-service start
+ fi
+
+This will load the support kernel module and will setup the network
+configuration for VirtualBox.
+
+You should then add the following to /etc/rc.d/rc.local_shutdown:
+
+ # Stop vboxadd
+ if [ -x /etc/rc.d/rc.vboxadd ]; then
+ /etc/rc.d/rc.vboxadd stop
+ fi
+
+ # Stop vboxadd-service
+ if [ -x /etc/rc.d/rc.vboxadd-service ]; then
+ /etc/rc.d/rc.vboxadd-service stop
+ fi
+
+You might want to add "/usr/bin/VBoxClient"
+to your xinitrc file if you use a desktop environment that doesn't
+respect /etc/xdg/autostart or /usr/share/autostart
+
+To use the vboxvideo xorg driver, you have to create an xorg.conf
+and specifiy to use that driver in there. Xorg will NOT pick that
+driver by default.
+
diff --git a/system/virtualbox-addons/doinst.sh b/system/virtualbox-addons/doinst.sh
new file mode 100644
index 0000000000..58fdc15a9a
--- /dev/null
+++ b/system/virtualbox-addons/doinst.sh
@@ -0,0 +1,32 @@
+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
+}
+
+preserve_perms etc/rc.d/rc.vboxadd.new
+preserve_perms etc/rc.d/rc.vboxadd-service.new
+
+# remove existing fdi cache to recognize newly installed fdi files
+# and restart hal to regenerate the cache
+rm -f var/cache/hald/fdi-cache
+chroot . /etc/rc.d/rc.hald restart
+
diff --git a/system/virtualbox-addons/rc.vboxadd.diff b/system/virtualbox-addons/rc.vboxadd.diff
new file mode 100644
index 0000000000..138defbb71
--- /dev/null
+++ b/system/virtualbox-addons/rc.vboxadd.diff
@@ -0,0 +1,36 @@
+--- vboxadd.sh 2011-02-17 17:31:03.000000000 +0100
++++ vboxadd.sh.new 2011-04-03 13:50:51.367000031 +0200
+@@ -465,31 +465,13 @@
+ # setup_script
+ setup()
+ {
+- setup_modules
+- mod_succ="$?"
+- extra_setup
+- if [ "$mod_succ" -eq "0" ]; then
+- if running_vboxguest || running_vboxadd; then
+- printf "You should restart your guest to make sure the new modules are actually used\n\n"
+- else
+- start
+- fi
+- fi
++ echo "Not implemented! Please use the virtualbox-kernel-addons.SlackBuild available at SlackBuilds.org instead."
+ }
+
+ # cleanup_script
+ cleanup()
+ {
+- # Delete old versions of VBox modules.
+- cleanup_modules
+- depmod
+-
+- # Remove old module sources
+- rm -rf /usr/src/vboxadd-* /usr/src/vboxguest-* /usr/src/vboxvfs-* /usr/src/vboxsf-* /usr/src/vboxvideo-*
+-
+- # Remove other files
+- rm /sbin/mount.vboxsf 2>/dev/null
+- rm /etc/udev/rules.d/60-vboxadd.rules 2>/dev/null
++ echo "Not implemented! Please use removepkg or pkgtool to remove virtualbox-addons and/or virtualbox-kernel-addons instead."
+ }
+
+ dmnstatus()
diff --git a/system/virtualbox-addons/slack-desc b/system/virtualbox-addons/slack-desc
new file mode 100644
index 0000000000..c872ae93c1
--- /dev/null
+++ b/system/virtualbox-addons/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-addons: virtualbox-addons (VirtualBox Guest Additions)
+virtualbox-addons:
+virtualbox-addons: This is the userspace part of the VirtualBox Guest Additions.
+virtualbox-addons: Together with virtualbox-kernel-addons, they enable shared folders,
+virtualbox-addons: folders, shared clipboard, etcetera usage inside guest machines.
+virtualbox-addons:
+virtualbox-addons: Homepage: http://www.virtualbox.org
+virtualbox-addons:
+virtualbox-addons:
+virtualbox-addons:
+virtualbox-addons:
diff --git a/system/virtualbox-addons/virtualbox-addons.SlackBuild b/system/virtualbox-addons/virtualbox-addons.SlackBuild
new file mode 100644
index 0000000000..6dbf9d155c
--- /dev/null
+++ b/system/virtualbox-addons/virtualbox-addons.SlackBuild
@@ -0,0 +1,165 @@
+#!/bin/sh
+
+# Slackware build script for virtualbox-ose-addons
+
+# Copyright 2008-2011 Heinz Wiesinger, Amsterdam, The Netherlands
+# 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-addons
+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}
+
+if ! grep ^vboxadd: /etc/passwd 2>&1 > /dev/null; then
+ echo " You must have a vboxadd user to run this script."
+ echo " # useradd -u 215 -d /var/run/vboxadd -g 1 -s /bin/sh vboxadd"
+ exit 1
+fi
+
+# kmk doesn't support MAKEFLAGS, so we use JOBS here
+JOBS=${JOBS:-3}
+
+# set xorg-server version
+XSERVER=$(X -version 2>&1 | grep Server | cut -d " " -f 4 | sed "s/\.//" | cut -d "." -f 1)
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ TARGET="x86"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+ TARGET="x86"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ TARGET="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 .
+
+# We set the environment variables manually to avoid dependency on acpica
+export BUILD_PLATFORM="linux"
+export BUILD_PLATFORM_ARCH="$TARGET"
+export BUILD_TARGET="linux"
+export BUILD_TARGET_ARCH="$TARGET"
+export BUILD_TARGET_CPU="$ARCH"
+export BUILD_TYPE="release"
+export PATH_KBUILD="$TMP/$SRCNAM-${VERSION}_OSE/kBuild"
+export PATH_DEVTOOLS="$TMP/$SRCNAM-${VERSION}_OSE/tools"
+path_kbuild_bin="$PATH_KBUILD/bin/$BUILD_TARGET.$BUILD_PLATFORM_ARCH"
+export PATH_KBUILD_BIN="$path_kbuild_bin"
+path_dev_bin="$PATH_DEVTOOLS/$BUILD_TARGET.$BUILD_PLATFORM_ARCH"/bin
+echo "$PATH" | grep -q "$path_kbuild_bin" || PATH="$path_kbuild_bin:$PATH"
+echo "$PATH" | grep -q "$path_dev_bin" || PATH="$path_dev_bin:$PATH"
+export PATH
+unset path_kbuild_bin path_dev_bin
+
+kmk -j ${JOBS} LOCALCFG=$CWD/LocalConfig.kmk
+
+mkdir -p $PKG/lib/udev/rules.d $PKG/sbin \
+ $PKG/etc/{xdg/autostart,rc.d,X11/xorg.conf.d} \
+ $PKG/usr/{src,bin,sbin,share/autostart} \
+ $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/{drivers,input}
+
+patch -d src/VBox/Additions/linux/installer/ -i $CWD/rc.vboxadd.diff
+cp -f src/VBox/Additions/linux/installer/vboxadd.sh \
+ $PKG/etc/rc.d/rc.vboxadd.new
+cp -f src/VBox/Additions/linux/installer/vboxadd-service.sh \
+ $PKG/etc/rc.d/rc.vboxadd-service.new
+
+cp -f src/VBox/Additions/x11/Installer/vboxclient.desktop \
+ $PKG/etc/xdg/autostart/
+cp -f src/VBox/Additions/x11/Installer/vboxclient.desktop \
+ $PKG/usr/share/autostart/
+install -m 755 src/VBox/Additions/x11/Installer/98vboxadd-xclient \
+ $PKG/usr/bin/VBoxClient-all
+
+echo "KERNEL==\"vboxguest\", NAME=\"vboxguest\", OWNER=\"vboxadd\", MODE=\"0660\"" \
+ > $PKG/lib/udev/rules.d/60-vboxadd.rules
+echo "KERNEL==\"vboxuser\", NAME=\"vboxuser\", OWNER=\"vboxadd\", MODE=\"0666\"" \
+ >> $PKG/lib/udev/rules.d/60-vboxadd.rules
+
+install -m 644 src/VBox/Additions/linux/installer/70-xorg-vboxmouse.rules \
+ $PKG/lib/udev/rules.d/
+
+install -m 644 src/VBox/Additions/x11/Installer/50-vboxmouse.conf \
+ $PKG/etc/X11/xorg.conf.d/
+
+cd out/linux.$TARGET/release/bin/additions
+ cp -rf src/vboxguest $PKG/usr/src/vboxguest-$VERSION
+ cp -rf src/vboxsf $PKG/usr/src/vboxsf-$VERSION
+ cp -rf src/vboxvideo $PKG/usr/src/vboxvideo-$VERSION
+ install -m 755 VBoxControl $PKG/usr/bin/
+ install -m 755 VBoxClient $PKG/usr/bin/
+ install -m 755 VBoxService $PKG/usr/sbin/
+ install -m 4755 mount.vboxsf $PKG/sbin/mount.vboxsf
+ install -m 644 vboxvideo_drv_$XSERVER.so \
+ $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/drivers/vboxvideo_drv.so
+ install -m 644 vboxmouse_drv_$XSERVER.so \
+ $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/input/vboxmouse_drv.so
+
+ install -m 644 VBoxOGLcrutil.so $PKG/usr/lib$LIBDIRSUFFIX
+ install -m 644 VBoxOGLerrorspu.so $PKG/usr/lib$LIBDIRSUFFIX
+ install -m 644 VBoxOGLarrayspu.so $PKG/usr/lib$LIBDIRSUFFIX
+ install -m 644 VBoxOGLfeedbackspu.so $PKG/usr/lib$LIBDIRSUFFIX
+ install -m 644 VBoxOGLpackspu.so $PKG/usr/lib$LIBDIRSUFFIX
+ install -m 644 VBoxOGLpassthroughspu.so $PKG/usr/lib$LIBDIRSUFFIX
+ install -m 644 VBoxOGL.so $PKG/usr/lib$LIBDIRSUFFIX
+
+ mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/dri
+ ln -s /usr/lib$LIBDIRSUFFIX/VBoxOGL.so \
+ $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/dri/vboxvideo_dri.so
+cd -
+
+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
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/virtualbox-addons/virtualbox-addons.info b/system/virtualbox-addons/virtualbox-addons.info
new file mode 100644
index 0000000000..14b07d3b19
--- /dev/null
+++ b/system/virtualbox-addons/virtualbox-addons.info
@@ -0,0 +1,10 @@
+PRGNAM="virtualbox-ose-addons"
+VERSION="4.0.4"
+HOMEPAGE="http://www.virtualbox.org"
+DOWNLOAD="http://download.virtualbox.org/virtualbox/4.0.4/VirtualBox-4.0.4.tar.bz2"
+MD5SUM="b4770ca14d1a8cbad9b3eb0e0028ff4b"
+DOWNLOAD_x86_64="UNTESTED"
+MD5SUM_x86_64=""
+MAINTAINER="Heinz Wiesinger"
+EMAIL="pprkut@liwjatan.at"
+APPROVED="rworkman"