2010-05-11 22:55:35 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# This script helps you to make the source package
|
|
|
|
# of the virtualbox host kernel module.
|
|
|
|
# IMPORTANT: The virtualbox-ose version you want to use
|
|
|
|
# must already be installed!
|
|
|
|
|
|
|
|
# Based on the ffmpeg-mksrctarball.sh from the SlackBuilds.org repository
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2010-05-12 17:46:16 +02:00
|
|
|
PRGNAM=virtualbox-kernel
|
2010-05-13 00:42:18 +02:00
|
|
|
VERSION=$(VBoxManage -v | grep -e ^[0-9].*_OSE | cut -d "_" -f 1)
|
2010-05-11 22:55:35 +02:00
|
|
|
|
|
|
|
MODULE_SRC=$(grep "MODULE_SRC=" /etc/vbox/vbox.cfg | cut -d "=" -f 2 | cut -d "\"" -f 2)
|
|
|
|
|
2010-05-13 00:42:18 +02:00
|
|
|
echo "--> Copying sourcecode from $MODULE_SRC/$PRGNAM-$VERSION"
|
2010-05-12 17:46:16 +02:00
|
|
|
cp -rf $MODULE_SRC/$PRGNAM-$VERSION $PRGNAM-$VERSION
|
2010-05-11 22:55:35 +02:00
|
|
|
|
2010-05-13 00:42:18 +02:00
|
|
|
echo "--> Making the sourcecode tarball: ./$PRGNAM-$VERSION.tar.xz"
|
|
|
|
tar -cJf $PRGNAM-$VERSION.tar.xz $PRGNAM-$VERSION
|
2010-05-11 22:55:35 +02:00
|
|
|
|
2010-05-13 00:42:18 +02:00
|
|
|
echo "--> Erasing the sourcecode directory: ./$PRGNAM-$VERSION/"
|
2010-05-12 17:46:16 +02:00
|
|
|
rm -rf $PRGNAM-$VERSION/
|
2010-05-11 22:55:35 +02:00
|
|
|
|
2010-05-13 00:42:18 +02:00
|
|
|
echo "--> Sourcecode tarball for $PRGNAM: $(pwd)/$PRGNAM-$VERSION.tar.xz"
|