summaryrefslogtreecommitdiff
path: root/community/virtualbox-modules
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-06-30 01:17:13 -0700
committerroot <root@rshg054.dnsready.net>2013-06-30 01:17:13 -0700
commit7a8005609048a38bb6b7538effb4236b49385cd5 (patch)
treee1c35bdece7832f3cfafb52d79ff70a57e1023b7 /community/virtualbox-modules
parent904e95f187c6f547dfa804cd58feeba306962031 (diff)
Sun Jun 30 01:15:30 PDT 2013
Diffstat (limited to 'community/virtualbox-modules')
-rw-r--r--community/virtualbox-modules/PKGBUILD34
-rw-r--r--community/virtualbox-modules/virtualbox-guest-modules.install13
-rw-r--r--community/virtualbox-modules/virtualbox-host-modules.install13
3 files changed, 32 insertions, 28 deletions
diff --git a/community/virtualbox-modules/PKGBUILD b/community/virtualbox-modules/PKGBUILD
index e3862c973..cc9ce02bf 100644
--- a/community/virtualbox-modules/PKGBUILD
+++ b/community/virtualbox-modules/PKGBUILD
@@ -1,25 +1,27 @@
-# $Id: PKGBUILD 93064 2013-06-23 17:40:06Z seblu $
+# $Id: PKGBUILD 93232 2013-06-29 10:08:01Z foutrelis $
# Maintainer: Ionut Biru <ibiru@archlinux.org>
# Maintainer: Sébastien Luttringer
pkgbase=virtualbox-modules
pkgname=('virtualbox-host-modules' 'virtualbox-guest-modules')
pkgver=4.2.14
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
url='http://virtualbox.org'
license=('GPL')
-makedepends=('linux'
- 'linux-headers'
+makedepends=('linux>=3.9' 'linux<3.10'
+ 'linux-headers>=3.9' 'linux-headers<3.10'
"virtualbox-host-dkms>=$pkgver"
"virtualbox-guest-dkms>=$pkgver"
'expac'
'sed'
'bc')
+# remember to also adjust the .install files and the package deps below
+_extramodules=extramodules-3.9-ARCH
+
build() {
- _kernmaj=$(expac -Q '%v' linux|sed -r 's/([[:digit:]]+\.[[:digit:]]+).*/\1/')
- _kernver=$(< /usr/lib/modules/extramodules-$_kernmaj-ARCH/version)
+ _kernver="$(cat /usr/lib/modules/$_extramodules/version)"
# dkms need modification to be run as user
cp -r /var/lib/dkms .
echo "dkms_tree='$srcdir/dkms'" > dkms.conf
@@ -32,36 +34,32 @@ build() {
}
package_virtualbox-host-modules(){
- _kernmaj=$(expac -Q '%v' linux|sed -r 's/([[:digit:]]+\.[[:digit:]]+).*/\1/')
- _kernver=$(< /usr/lib/modules/extramodules-$_kernmaj-ARCH/version)
+ _kernver="$(cat /usr/lib/modules/$_extramodules/version)"
pkgdesc='Host kernel modules for VirtualBox'
- depends=("linux>=$_kernmaj" "linux<$(echo "$_kernmaj+0.1"|bc)")
+ depends=('linux>=3.9' 'linux<3.10')
replaces=('virtualbox-modules')
conflicts=('virtualbox-modules')
install=virtualbox-host-modules.install
cd "dkms/vboxhost/$pkgver/$_kernver/$CARCH/module"
- install -dm755 "$pkgdir/usr/lib/modules/extramodules-$_kernmaj-ARCH/"
- install -m644 * "$pkgdir/usr/lib/modules/extramodules-$_kernmaj-ARCH/"
+ install -dm755 "$pkgdir/usr/lib/modules/$_extramodules/"
+ install -m644 * "$pkgdir/usr/lib/modules/$_extramodules/"
find "$pkgdir" -name '*.ko' -exec gzip -9 {} +
- sed -ie "s/VERSION='.*'/VERSION='$_kernver'/" "$startdir/virtualbox-host-modules.install"
}
package_virtualbox-guest-modules(){
- _kernmaj=$(expac -Q '%v' linux|sed -r 's/([[:digit:]]+\.[[:digit:]]+).*/\1/')
- _kernver=$(< /usr/lib/modules/extramodules-$_kernmaj-ARCH/version)
+ _kernver="$(cat /usr/lib/modules/$_extramodules/version)"
pkgdesc='Guest kernel modules for VirtualBox'
license=('GPL')
- depends=("linux>=$_kernmaj" "linux<$(echo "$_kernmaj+0.1"|bc)")
+ depends=('linux>=3.9' 'linux<3.10')
replaces=('virtualbox-archlinux-modules')
conflicts=('virtualbox-archlinux-modules')
install=virtualbox-guest-modules.install
cd "dkms/vboxguest/$pkgver/$_kernver/$CARCH/module"
- install -dm755 "$pkgdir/usr/lib/modules/extramodules-$_kernmaj-ARCH/"
- install -m644 * "$pkgdir/usr/lib/modules/extramodules-$_kernmaj-ARCH/"
+ install -dm755 "$pkgdir/usr/lib/modules/$_extramodules/"
+ install -m644 * "$pkgdir/usr/lib/modules/$_extramodules/"
find "$pkgdir" -name '*.ko' -exec gzip -9 {} +
- sed -ie "s/VERSION='.*'/VERSION='$_kernver'/" "$startdir/virtualbox-guest-modules.install"
}
# vim:set ts=2 sw=2 et:
diff --git a/community/virtualbox-modules/virtualbox-guest-modules.install b/community/virtualbox-modules/virtualbox-guest-modules.install
index 73eddf0fd..169dd9a35 100644
--- a/community/virtualbox-modules/virtualbox-guest-modules.install
+++ b/community/virtualbox-modules/virtualbox-guest-modules.install
@@ -1,18 +1,21 @@
-VERSION='3.9.7-1-ARCH'
+_depmod() {
+ EXTRAMODULES='extramodules-3.9-ARCH'
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
post_install() {
-cat << EOF
+ cat << EOF
===> You may want to load vboxguest, vboxsf and vboxvideo
EOF
- depmod $VERSION
+ _depmod
}
post_upgrade() {
- depmod $VERSION
+ _depmod
}
post_remove() {
- depmod $VERSION
+ _depmod
}
# vim:set ts=2 sw=2 et:
diff --git a/community/virtualbox-modules/virtualbox-host-modules.install b/community/virtualbox-modules/virtualbox-host-modules.install
index 4741f26bf..b1c7a68c6 100644
--- a/community/virtualbox-modules/virtualbox-host-modules.install
+++ b/community/virtualbox-modules/virtualbox-host-modules.install
@@ -1,20 +1,23 @@
-VERSION='3.9.7-1-ARCH'
+_depmod() {
+ EXTRAMODULES='extramodules-3.9-ARCH'
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
post_install() {
-cat << EOF
+ cat << EOF
===> You must load vboxdrv module before starting VirtualBox:
===> # modprobe vboxdrv
EOF
- depmod $VERSION
+ _depmod
}
post_upgrade() {
- depmod $VERSION
+ _depmod
echo 'In order to use the new version, reload all virtualbox modules manually.'
}
post_remove() {
- depmod $VERSION
+ _depmod
}
# vim:set ts=2 sw=2 et: