summaryrefslogtreecommitdiff
path: root/system/virtualbox-kernel/virtualbox-kernel-mksrctarball.sh
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@liwjatan.at>2010-05-11 22:55:35 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-11 22:55:35 +0200
commite016deb2ea4af04c6a180c6fcaaf14e91c63af88 (patch)
tree32b56336fa02265d2e5a650bbc7872d14f6aff37 /system/virtualbox-kernel/virtualbox-kernel-mksrctarball.sh
parentfbf95fdee481ac31ec62ab8cd2a9d87f738485b4 (diff)
downloadslackbuilds-e016deb2ea4af04c6a180c6fcaaf14e91c63af88.tar.gz
system/virtualbox-kernel: Added to 12.1 repository
Diffstat (limited to 'system/virtualbox-kernel/virtualbox-kernel-mksrctarball.sh')
-rw-r--r--system/virtualbox-kernel/virtualbox-kernel-mksrctarball.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/system/virtualbox-kernel/virtualbox-kernel-mksrctarball.sh b/system/virtualbox-kernel/virtualbox-kernel-mksrctarball.sh
new file mode 100644
index 0000000000..ed462db9bc
--- /dev/null
+++ b/system/virtualbox-kernel/virtualbox-kernel-mksrctarball.sh
@@ -0,0 +1,27 @@
+#!/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
+
+PRGNAM=vbox-kernel-module
+SRCNAM=vboxdrv
+VBOX_VERSION=$(VBoxManage -v | grep -e ^[0-9].*_OSE)
+VERSION=${VBOX_VERSION:0:5}
+
+MODULE_SRC=$(grep "MODULE_SRC=" /etc/vbox/vbox.cfg | cut -d "=" -f 2 | cut -d "\"" -f 2)
+
+echo "--> Copying sourcecode from $INSTALL_DIR/src"
+cp -rf $MODULE_SRC/$SRCNAM-$VERSION $SRCNAM
+
+echo "--> Making the sourcecode tarball: $PRGNAM-src-$VERSION.tar.bz2 "
+tar -c $SRCNAM/ | bzip2 > $PRGNAM-src-$VERSION.tar.bz2
+
+echo "--> Erasing the sourcecode directory: $SRCNAM/"
+rm -rf $SRCNAM/
+
+echo "--> Sourcecode tarball for $PRGNAM: $PRGNAM-src-$VERSION.tar.bz2"