Commit 5aa91c80 authored by Xuetian Weng's avatar Xuetian Weng

bundle vbox ext oracle

parent 97c18aef
......@@ -10,7 +10,7 @@ pkgname=('virtualbox'
'virtualbox-ext-vnc'
'virtualbox-ext-oracle')
pkgver=5.1.2
pkgrel=5
pkgrel=6
arch=('x86_64')
url='http://virtualbox.org'
license=('GPL')
......@@ -51,6 +51,7 @@ makedepends=('alsa-lib'
'xf86driproto'
'xorg-server-devel' 'gcc' 'lib32-glibc')
source=("http://download.virtualbox.org/virtualbox/$pkgver/VirtualBox-$pkgver.tar.bz2"
"http://download.virtualbox.org/virtualbox/$pkgver/Oracle_VM_VirtualBox_Extension_Pack-${pkgver}.vbox-extpack"
'virtualbox-host-dkms.conf'
'virtualbox-guest-dkms.conf'
'virtualbox.sysusers'
......@@ -69,7 +70,9 @@ source=("http://download.virtualbox.org/virtualbox/$pkgver/VirtualBox-$pkgver.ta
'007-python2-path.patch'
'cxx11.patch'
'PUEL')
noextract=("Oracle_VM_VirtualBox_Extension_Pack-${pkgver}.vbox-extpack")
sha256sums=('03c92e3000d4b905d5b18a6abed757998125a37e5efa7864e62eae2baeabe010'
'394d933be4022b2b15225670fe6e2a4486f34e5a565a719e0de5984089ccd975'
'deb03efa7ad0376aa55a087f2e882afe00935f10b0e7aa853ba9147090d341ec'
'113f9b92141b85df01f1e74d22f01d1f1aa81650eb79b89ceefc3cae20afe2e2'
'2101ebb58233bbfadf3aa74381f22f7e7e508559d2b46387114bc2d8e308554c'
......@@ -390,10 +393,10 @@ package_virtualbox-ext-oracle() {
arch=('any')
license=('custom:PUEL')
depends=("virtualbox")
options=('emptydirs')
install=${pkgname}.install
install -Dm0644 ${srcdir}/PUEL "${pkgdir}/usr/share/licenses/${pkgname}/PUEL"
install -dm755 ${pkgdir}/usr/share/virtualbox/extensions
install -Dm644 ${srcdir}/Oracle_VM_VirtualBox_Extension_Pack-*.vbox-extpack "$pkgdir/usr/share/virtualbox/extensions/Oracle_VM_VirtualBox_Extension_Pack-${pkgver}.vbox-extpack"
}
# vim:set ts=4 sw=4 et:
VBOXVER=5.1.2
SRC_URL=http://download.virtualbox.org/virtualbox/${VBOXVER}/Oracle_VM_VirtualBox_Extension_Pack-${VBOXVER}.vbox-extpack
MD5SUM=7614ce90e17297f80d6a5822252c90d9
#/bin/bash
DIR=/usr/share/virtualbox/extensions
TMP_DIR=/tmp/Oracle_VM_VirtualBox_Extension_Pack
virtualbox-ext-oracle-installer() {
[ -d $TMP_DIR ] && rm -rf $TMP_DIR
mkdir $TMP_DIR
cd $TMP_DIR
echo "$MD5SUM $DIR/Oracle_VM_VirtualBox_Extension_Pack-${VBOXVER}.vbox-extpack" > md5sums.check
if md5sum -c md5sums.check
then
echo "nothing to do, you are already using the latest VirtualBox Extension provided by Oracle"
else
wget $SRC_URL
cp -f Oracle_VM_VirtualBox_Extension_Pack-${VBOXVER}.vbox-extpack $DIR/
fi
}
post_install () {
virtualbox-ext-oracle-installer
VBoxManage extpack install "${DIR}/Oracle_VM_VirtualBox_Extension_Pack-${VBOXVER}.vbox-extpack" >/dev/null
# arg 1: the new package version
post_install() {
VBoxManage extpack install "/usr/share/virtualbox/extensions/Oracle_VM_VirtualBox_Extension_Pack-${1%%-*}.vbox-extpack" >/dev/null
}
# arg 1: the new package version
# arg 2: the old package version
pre_upgrade() {
post_remove
pre_remove "$2"
}
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
post_install
post_install "$1"
}
post_remove() {
# arg 1: the old package version
pre_remove() {
VBoxManage extpack uninstall "Oracle VM VirtualBox Extension Pack" >/dev/null
rm -rf ${DIR}/Oracle_VM_VirtualBox_Extension_Pack-${VBOXVER}.vbox-extpack >/dev/null
}
# vim:set ts=2 sw=2 ft=sh et:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment