summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PKGBUILD29
-rw-r--r--install16
2 files changed, 9 insertions, 36 deletions
diff --git a/PKGBUILD b/PKGBUILD
index e42137a45d5..59163c65cd0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=virtualbox-bin
pkgver=5.0.16
_build=105871
-pkgrel=2
+pkgrel=3
pkgdesc='Oracle VM VirtualBox Binary Edition (Oracle branded non-OSE version)'
arch=('i686' 'x86_64')
url='http://virtualbox.org/'
@@ -118,10 +118,6 @@ package() {
install -d -m 0755 "$pkgdir/usr/share/doc/$pkgname"
ln -s "$_installdir/VirtualBox.chm" "$pkgdir/usr/share/doc/$pkgname/virtualbox.chm"
- # Symlink module sources in /usr/src
- install -d -m 0755 "$pkgdir/usr/src"
- ln -s "$_installdir/src/vboxhost" "$pkgdir/usr/src/vboxhost-$pkgver"
-
# Symlink icons
pushd icons
for _dir in *; do
@@ -138,6 +134,10 @@ package() {
done
popd
+ # module sources in /usr/src
+ install -d -m 0755 "${pkgdir}/usr/src"
+ mv "${pkgdir}/${_installdir}/src/vboxhost" "${pkgdir}/usr/src/vboxhost-${pkgver}"
+
# Write the configuration file
install -D -m 0644 /dev/null "$pkgdir/etc/vbox/vbox.cfg"
cat > "$pkgdir/etc/vbox/vbox.cfg" <<EOF
@@ -150,21 +150,10 @@ INSTALL_REV='$_build'
EOF
# Write modules-load.d configuration to ensure that modules are loaded at boot
- install -D -m 0644 /dev/null "$pkgdir/etc/modules-load.d/virtualbox.conf"
- cat > "$pkgdir/etc/modules-load.d/virtualbox.conf" <<EOF
-# Load virtualbox kernel modules at boot.
-# This file was installed by the virtualbox-bin AUR package
-
-# Base module
-vboxdrv
-
-# Host-based network
-vboxnetadp
-EOF
-
- # Register into DKMS
- install -dm 755 "$pkgdir/var/lib/dkms/vboxhost/$pkgver"
- ln -s '/opt/VirtualBox/src/vboxhost' "$pkgdir/var/lib/dkms/vboxhost/$pkgver/source"
+ install -Dm644 /dev/null "${pkgdir}/usr/lib/modules-load.d/${pkgname}.conf"
+ printf \
+ "# Load virtualbox kernel modules at boot.\n# This file was installed by the ${pkgname} AUR package\n\nvboxdrv\nvboxpci\nvboxnetadp\nvboxnetflt" > \
+ "${pkgdir}/usr/lib/modules-load.d/${pkgname}.conf"
}
diff --git a/install b/install
index 480a3fbabd2..ce993b60826 100644
--- a/install
+++ b/install
@@ -30,19 +30,12 @@ post_install() {
==> Remember to add allowed users to the vboxusers group:
==> # gpasswd -a USERNAME vboxusers
-==
-==> To compile/load virtualbox modules automatically at startup you can add dkms in your DAEMONS
-==
-==> To build and install your modules run dkms autoinstall
EOF
}
# arg 1: the new package version
# arg 2: the old package version
pre_upgrade() {
- # should be $2... pacman is bugged FS#29371.
- pre_remove "$2"
-
# Remove any stuff remaining from the module compilation
rm -Rf "/opt/VirtualBox"
}
@@ -61,15 +54,6 @@ EOF
}
# arg 1: the old package version
-pre_remove() {
- # Stop running services
- #[[ -x /etc/rc.d/vboxweb ]] && /etc/rc.d/vboxweb stop >/dev/null
-
- # Remove modules
- [[ -n $1 ]] && dkms remove vboxhost/${1%-*} --all >/dev/null || true
-}
-
-# arg 1: the old package version
post_remove() {
# Remove any stuff remaining from the module compilation
rm -Rf "/opt/VirtualBox"