virtualbox-ose: Added virtualbox-3.0.2 (Open Source Edition).

slackware-14.2
Damien Goutte-Gattat 13 years ago
parent c07d0f5b4e
commit 791638a453
  1. 2
      xap/virtualbox-ose/.gitignore
  2. 15
      xap/virtualbox-ose/LocalConfig.kmk
  3. 3
      xap/virtualbox-ose/checksums
  4. 24
      xap/virtualbox-ose/doinst.sh
  5. 12
      xap/virtualbox-ose/slack-desc
  6. 168
      xap/virtualbox-ose/virtualbox-ose.SlackBuild

@ -0,0 +1,2 @@
UserManual.pdf
VBoxGuestAdditions_3.0.2.iso

@ -0,0 +1,15 @@
DEFS += RTPATH_APP_PRIVATE=\"/usr/share/virtualbox\"
VBOX_WITH_TESTCASES :=
VBOX_WITH_TESTSUITE :=
VBOX_WITHOUT_ADDITIONS := 1
KBUILD_MSG_STYLE := brief
VBOX_WITH_ORIGIN :=
VBOX_PATH_APP_PRIVATE_ARCH := /usr/lib/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)

@ -0,0 +1,3 @@
442206e7dfcf6719b7ee452f9f042563acd6f0eb VirtualBox-3.0.2-OSE.tar.bz2
4d45c10d84256fdb9baaab4bbd32c6c229a94add VBoxGuestAdditions_3.0.2.iso
0e732df478c0bbd9fb26ccdb1466328f8cdc5398 UserManual.pdf

@ -0,0 +1,24 @@
#!/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 ! grep ^vbox: /etc/group 2>&1 > /dev/null; then
/usr/sbin/groupadd vbox
fi
chown root:vbox /usr/bin/VBoxTunctl /usr/share/virtualbox/VBoxSysInfo.sh
chown -R root:vbox /usr/lib/virtualbox/
for i in VirtualBox VBoxSDL VBoxHeadless; do
chmod 4750 /usr/lib/virtualbox/$i
done

@ -0,0 +1,12 @@
|-----handy-ruler----------------------------------------------|
virtualbox-ose: virtualbox-ose (x86 virtualizer)
virtualbox-ose:
virtualbox-ose: Sun VirtualBox is a general-purpose full virtualizer for x86
virtualbox-ose: hardware.
virtualbox-ose:
virtualbox-ose: This is the Open Source Edition of VirtualBox, licensed under
virtualbox-ose: the terms of the GNU General Public License.
virtualbox-ose:
virtualbox-ose:
virtualbox-ose:
virtualbox-ose:

@ -0,0 +1,168 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2009 Damien Goutte-Gattat
#
# 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.
#
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest virtualbox-ose sourcecode is available at:
# <http://http://www.virtualbox.org/>.
#
# Depends: d/iasl
# Source package infos
NAMESRC=${NAMESRC:-VirtualBox}
VERSION=${VERSION:-3.0.2}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION-OSE.tar.bz2}
GUESTISO=${GUESTISO:-VBoxGuestAdditions_$VERSION.iso}
BASEURL=${BASEURL:-http://download.virtualbox.org/virtualbox/$VERSION}
# Build infos
NAMETGZ=${NAMETGZ:-virtualbox-ose}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-i486}
JOBS=${JOBS:-1}
# 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
# Compilation flags
case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
x86_64)
CPUOPT="-O2 -fPIC"
;;
*)
CPUOPT="-O2"
;;
esac
# Get and verify the files
if [ ! -r $ARCHIVE ]; then
wget -c -O $ARCHIVE.part "$BASEURL/$ARCHIVE"
mv $ARCHIVE.part $ARCHIVE
fi
if [ ! -r $GUESTISO ]; then
wget -c -O $GUESTISO.part "$BASEURL/$GUESTISO"
mv $GUESTISO.part $GUESTISO
fi
if [ ! -r UserManual.pdf ]; then
wget -c -O UserManual.pdf.part "$BASEURL/UserManual.pdf"
mv UserManual.pdf.part UserManual.pdf
fi
sha1sum -c checksums
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
# Compile
cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
./configure \
--disable-kmods \
--disable-pulse
. env.sh
kmk -j ${JOBS} LOCALCFG=$CWD/LocalConfig.kmk
# Create directories
mkdir -p $PKG/etc/vbox \
$PKG/lib/udev/rules.d \
$PKG/usr/bin \
$PKG/usr/lib/virtualbox \
$PKG/usr/share/applications \
$PKG/usr/share/pixmaps \
$PKG/usr/share/virtualbox \
$PKG/usr/doc/$NAMETGZ-$VERSION \
$PKG/usr/src \
$PKG/install
# Install config file and udev rule
echo 'INSTALL_DIR="/usr/lib/virtualbox"' > $PKG/etc/vbox/vbox.cfg.new
echo 'KERNEL=="vboxdrv", NAME"vboxdrv", OWNER="root", GROUP="vbox", MODE="0660"' \
> $PKG/lib/udev/rules.d/60-vboxdrv.rules
# Install main files
(
cd out/linux.x86/release/bin
mv VBox.png $PKG/usr/share/pixmaps/
mv VirtualBox.desktop $PKG/usr/share/applications
mv src $PKG/usr/src/virtualbox-kmods-$VERSION
mv sdk nls *.tar.gz $PKG/usr/share/virtualbox/
install -m 750 VBoxSysInfo.sh $PKG/usr/share/virtualbox/
install -m 750 VBoxTunctl $PKG/usr/bin
rm VBoxSysInfo.sh VBoxTunctl
mv * $PKG/usr/lib/virtualbox/
chmod -R 750 $PKG/usr/lib/virtualbox/
mv $PKG/usr/lib/virtualbox/VBox.sh $PKG/usr/lib/virtualbox/VBox
)
# Create symlinks
for i in VirtualBox VBoxManage VBoxSDL VBoxHeadless VBoxVRDP ; do
ln -s /usr/lib/virtualbox/VBox $PKG/usr/bin/$i
done
# Copy auxiliary files
cp $CWD/$GUESTISO $PKG/usr/share/virtualbox/
cp $CWD/UserManual.pdf $PKG/usr/share/virtualbox/
sed -ri 's,^DocPath=.*$,DocPath=file:///usr/share/virtualbox/UserManual.pdf,' \
$PKG/usr/share/applications/VirtualBox.desktop
# Install the documentation
mkdir -p $PKG/usr/doc/$NAMETGZ-$VERSION
install -m 644 COPYING COPYING.CDDL $PKG/usr/doc/$NAMETGZ-$VERSION
# Copy slack-desc and doinst.sh files
mkdir -p $PKG/install
install -m 644 $CWD/slack-desc $PKG/install/slack-desc
install -m 755 $CWD/doinst.sh $PKG/install/doinst.sh
# Package the tree
cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMETGZ-$VERSION-$ARCH-$BUILD.tgz
rm -rf $PKG
rm -rf $TMP/$NAME
"
if type -p fakeroot ; then
echo "$PACKAGING" | fakeroot
else
su -c "$PACKAGING"
fi
Loading…
Cancel
Save