Browse Source

xap/virtualbox-ose: Upgraded to virtualbox-3.0.4.

slackware-14.2
Damien Goutte-Gattat 13 years ago
parent
commit
e83e2d5b37
  1. 2
      xap/virtualbox-ose/.gitignore
  2. 6
      xap/virtualbox-ose/checksums
  3. 55
      xap/virtualbox-ose/virtualbox-ose.SlackBuild

2
xap/virtualbox-ose/.gitignore vendored

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

6
xap/virtualbox-ose/checksums

@ -1,3 +1,3 @@
442206e7dfcf6719b7ee452f9f042563acd6f0eb VirtualBox-3.0.2-OSE.tar.bz2
4d45c10d84256fdb9baaab4bbd32c6c229a94add VBoxGuestAdditions_3.0.2.iso
0e732df478c0bbd9fb26ccdb1466328f8cdc5398 UserManual.pdf
454f4fbd46a3c7bfa0f6e48eaa37bb578446aca5 VirtualBox-3.0.4-OSE.tar.bz2
cef83248ab71e1ccdcf1a5904ad66cf3b898f928 VBoxGuestAdditions_3.0.4.iso
a63a4353e3d049c0a4ed67159a20c7dab6c32668 UserManual.pdf

55
xap/virtualbox-ose/virtualbox-ose.SlackBuild

@ -26,24 +26,36 @@
# <http://http://www.virtualbox.org/>.
#
# Depends: d/iasl
#
# Notes: To build VirtualBox, you need a compiler able to generate
# 32-bit binaries and the corresponding 32-bit libraries; these
# are provided by Eric Hameleers' "multilib" packages, found at
# <http://connie.slackware.com/~alien/multilib/>.
#
# This SlackBuild does not build the kernel modules needed to run
# VirtualBox; instead, their sources are installed in
# /usr/src/virtualbox-kmods-$VERSION. It is up to the
# administrator to compile these modules against the desired
# Linux kernel and install them.
# Source package infos
NAMESRC=${NAMESRC:-VirtualBox}
VERSION=${VERSION:-3.0.2}
VERSION=${VERSION:-3.0.4}
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}
NAMEPKG=${NAMEPKG:-virtualbox-ose}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-i486}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMETGZ}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
@ -59,15 +71,20 @@ if [ ! -d $TMP ]; then
fi
# Compilation flags
LIBDIR=/usr/lib/virtualbox
case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
ARCHNAME="x86"
;;
x86_64)
CPUOPT="-O2 -fPIC"
LIBDIR=/usr/lib64/virtualbox
ARCHNAME="amd64"
;;
*)
CPUOPT="-O2"
ARCHNAME=$ARCH
;;
esac
@ -98,28 +115,29 @@ CXXFLAGS=$CPUOPT \
--disable-kmods \
--disable-pulse
. env.sh
kmk -j ${JOBS} LOCALCFG=$CWD/LocalConfig.kmk
sed -e "s,/usr/lib/virtualbox,$LIBDIR," $CWD/LocalConfig.kmk > LocalConfig.kmk
kmk -j ${JOBS} LOCALCFG=LocalConfig.kmk
# Create directories
mkdir -p $PKG/etc/vbox \
$PKG/lib/udev/rules.d \
$PKG/usr/bin \
$PKG/usr/lib/virtualbox \
$PKG$LIBDIR \
$PKG/usr/share/applications \
$PKG/usr/share/pixmaps \
$PKG/usr/share/virtualbox \
$PKG/usr/doc/$NAMETGZ-$VERSION \
$PKG/usr/doc/$NAMEPKG-$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
echo "INSTALL_DIR='$LIBDIR'" > $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
cd out/linux.$ARCHNAME/release/bin
mv VBox.png $PKG/usr/share/pixmaps/
mv VirtualBox.desktop $PKG/usr/share/applications
mv src $PKG/usr/src/virtualbox-kmods-$VERSION
@ -127,14 +145,14 @@ echo 'KERNEL=="vboxdrv", NAME"vboxdrv", OWNER="root", GROUP="vbox", MODE="0660"'
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
mv * $PKG$LIBDIR/
chmod -R 750 $PKG$LIBDIR/
mv $PKG$LIBDIR/VBox.sh $PKG$LIBDIR/VBox
)
# Create symlinks
for i in VirtualBox VBoxManage VBoxSDL VBoxHeadless VBoxVRDP ; do
ln -s /usr/lib/virtualbox/VBox $PKG/usr/bin/$i
ln -s $LIBDIR/VBox $PKG/usr/bin/$i
done
# Copy auxiliary files
@ -144,20 +162,21 @@ 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
mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION
install -m 644 COPYING COPYING.CDDL $PKG/usr/doc/$NAMEPKG-$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
sed -e "s,/usr/lib/virtualbox,$LIBDIR," $CWD/doinst.sh > $PKG/install/doinst.sh
chmod 755 $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
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"

Loading…
Cancel
Save