Browse Source

xap/virtualbox: Added.

slackware-14.2
Damien Goutte-Gattat 13 years ago
parent
commit
6e1e030b61
  1. 1
      xap/virtualbox/60-vboxdrv.rules
  2. 1
      xap/virtualbox/VirtualBox-2.1.0-41146-Linux_x86.run.sha1
  3. 16
      xap/virtualbox/doinst.sh
  4. 12
      xap/virtualbox/slack-desc
  5. 1
      xap/virtualbox/vbox.cfg
  6. 141
      xap/virtualbox/virtualbox.SlackBuild

1
xap/virtualbox/60-vboxdrv.rules

@ -0,0 +1 @@
KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"

1
xap/virtualbox/VirtualBox-2.1.0-41146-Linux_x86.run.sha1

@ -0,0 +1 @@
855cf362a95fcb122b565f0445a77cce2376fb59 VirtualBox-2.1.0-41146-Linux_x86.run

16
xap/virtualbox/doinst.sh

@ -0,0 +1,16 @@
#!/bin/sh
config()
{
NEW="$1"
OLD="`dirname $NEW`/`basename $NEW .new`"
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then
rm $NEW
fi
}
config /etc/vbox/vbox.cfg.new
if [ -x usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications
fi

12
xap/virtualbox/slack-desc

@ -0,0 +1,12 @@
|-----handy-ruler------------------------------------------------------|
virtualbox: virtualbox (a general-purpose ful virtualizer for x86 hardware)
virtualbox:
virtualbox: InnoTek VirtualBox is a family of powerful x86 virtualization
virtualbox: products for enterprise as well as home use. Presently, VirtualBox
virtualbox: runs on Windows and Linux 32-bits hosts and supports a large number
virtualbox: of guest operating systems including but not limited to Windows (NT
virtualbox: 4.0, 2000, XP, Server 2003, Vista), DOS/Windows 3.x, Linux (2.4 and
virtualbox: 2.6), and OpenBSD.
virtualbox:
virtualbox: This isn't the GPL version but a repackaging of the PUEL one.
virtualbox: See http://www.virtualbox.org/wiki/VirtualBox_PUL

1
xap/virtualbox/vbox.cfg

@ -0,0 +1 @@
INSTALL_DIR=/opt/VirtualBox-2.1.0

141
xap/virtualbox/virtualbox.SlackBuild

@ -0,0 +1,141 @@
#!/bin/bash
# Build script for Slackware
# Damien Goutte-Gattat "gouttegd" <Damien.Goutte-Gattat at e.ujf-grenoble.fr>
#
# Redistribution and use of this script, with or without modifications, 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.
#
# Latest virtualbox sourcecode is available at:
# http://virtualbox.org/
# Source package infos
NAMESRC=${NAMESRC:-VirtualBox}
VERSION=${VERSION:-2.1.0}
REVISION=${REVISION:-41146}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION-$REVISION-Linux_x86.run}
WGET=${WGET:-http://download.virtualbox.org/virtualbox/$VERSION/$ARCHIVE}
# Built package infos
NAMETGZ=${NAMETGZ:-virtualbox}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-i486}
TARGET=${TARGET:-i486}
KERNELSRC=${KERNELSRC:-/usr/src/linux} # Set to anything else than a
# directory to not build the
# kernel modules
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMETGZ}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
# Sanity checks
if [ $UID -eq 0 ]; then
echo "You should NOT run this script as ROOT!"
exit 1
fi
if [ ! -d $TMP ]; then
echo "$TMP does not exist or is not a directory!"
exit 1
fi
if [ -d "$KERNELSRC" ]; then
if [ ! -f $KERNELSRC/include/config/kernel.release ]; then
echo "No kernel.release found! Please configure your kernel"
echo "sources before attempting to build the VBox modules."
exit 1
fi
fi
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
wget "$WGET" -O "$ARCHIVE"
fi
sha1sum -c $ARCHIVE.sha1
# Extract the archive
cd $TMP
echo "Building $ARCHIVE..."
set +e
sh $CWD/$NAMESRC-$VERSION-$REVISION-Linux_x86.run --target VirtualBoxBuild
set -e
cd VirtualBoxBuild
mkdir -p virtualbox
tar xf $NAMESRC.tar.bz2 --directory=virtualbox
# Build the kernel modules (if asked to do so)
if [ -d "$KERNELSRC" ]; then
KERNELVER=$(< $KERNELSRC/include/config/kernel.release)
cd virtualbox/src
make -j 3 KERN_DIR=$KERNELSRC
mkdir -p $PKG/lib/modules/$KERNELVER/kernel/misc
install -m 0644 vbox{drv,netflt}.ko $PKG/lib/modules/$KERNELVER/kernel/misc
fi
# Install user-space files
cd $TMP/VirtualBoxBuild
rm -rf virtualbox/src
mkdir -p $PKG/opt
cp -r virtualbox $PKG/opt/VirtualBox-$VERSION
# Create symbolic links
mkdir -p $PKG/usr/bin $PKG/usr/share/{pixmaps,applications}
ln -sf /opt/VirtualBox-$VERSION/VBoxVMM.so $PKG/opt/VirtualBox-$VERSION/components/VBoxVMM.so
ln -sf /opt/VirtualBox-$VERSION/VBoxREM.so $PKG/opt/VirtualBox-$VERSION/components/VBoxREM.so
ln -sf /opt/VirtualBox-$VERSION/VBoxRT.so $PKG/opt/VirtualBox-$VERSION/components/VBoxRT.so
ln -sf /opt/VirtualBox-$VERSION/VBoxDDU.so $PKG/opt/VirtualBox-$VERSION/components/VBoxDDU.so
ln -sf /opt/VirtualBox-$VERSION/VBoxXPCOM.so $PKG/opt/VirtualBox-$VERSION/components/VBoxXPCOM.so
ln -sf /opt/VirtualBox-$VERSION/VBox.sh $PKG/usr/bin/VirtualBox
ln -sf /opt/VirtualBox-$VERSION/VBox.sh $PKG/usr/bin/VBoxManage
ln -sf /opt/VirtualBox-$VERSION/VBox.sh $PKG/usr/bin/VBoxSDL
ln -sf /opt/VirtualBox-$VERSION/VBox.sh $PKG/usr/bin/VBoxVRDP
ln -sf /opt/VirtualBox-$VERSION/VBox.sh $PKG/usr/bin/VBoxHeadless
ln -sf /opt/VirtualBox-$VERSION/VBox.sh $PKG/usr/bin/vboxwebsrv
ln -sf /opt/VirtualBox-$VERSION/VBox.png $PKG/usr/share/pixmaps/VBox.png
ln -sf /opt/VirtualBox-$VERSION/VirtualBox.desktop $PKG/usr/share/applications/VirtualBox.desktop
ln -sf /opt/VirtualBox-$VERSION/rdesktop-vrdp $PKG/usr/bin/rdesktop-vrdp
# Install udev rules and config file
install -D -m 644 $CWD/60-vboxdrv.rules $PKG/etc/udev/rules.d/60-vboxdrv.rules
install -D -m 644 $CWD/vbox.cfg $PKG/etc/vbox/vbox.cfg.new
# Install slack-desc and doinst.sh files
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
install -m 755 $CWD/doinst.sh $PKG/install/doinst.sh
find $(find $PKG -type d -name man -o -name info) -type f | \
xargs gzip -9 2> /dev/null
# Package the tree
cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
chmod 4511 $PKG/opt/VirtualBox-$VERSION/VirtualBox
chmod 4511 $PKG/opt/VirtualBox-$VERSION/VBoxSDL
chmod 4511 $PKG/opt/VirtualBox-$VERSION/VBoxHeadless
/sbin/makepkg -l y -c n $OUT/$NAMETGZ-$VERSION-$ARCH-$BUILD.tgz
rm -rf $PKG
rm -rf $TMP/VirtualBoxBuild
"
if type -p fakeroot ; then
echo "$PACKAGING" | fakeroot
else
su -c "$PACKAGING"
fi
Loading…
Cancel
Save