summaryrefslogtreecommitdiff
path: root/community/virtualbox-modules
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-05-28 01:10:44 -0700
committerroot <root@rshg054.dnsready.net>2013-05-28 01:10:44 -0700
commit72a09de07cab5e8ad5c3ec7c36814663a3f7a33b (patch)
tree9c774a29dfc7d56aaca8e91b4a00a1c9b24f303d /community/virtualbox-modules
parent39c27ccb8162e4ef41de8f2c354e598aa23bfa29 (diff)
Tue May 28 01:10:44 PDT 2013
Diffstat (limited to 'community/virtualbox-modules')
-rw-r--r--community/virtualbox-modules/PKGBUILD39
-rw-r--r--community/virtualbox-modules/virtualbox-guest-modules.install13
-rw-r--r--community/virtualbox-modules/virtualbox-host-modules.install15
3 files changed, 34 insertions, 33 deletions
diff --git a/community/virtualbox-modules/PKGBUILD b/community/virtualbox-modules/PKGBUILD
index 838f836fd..b03e92a2d 100644
--- a/community/virtualbox-modules/PKGBUILD
+++ b/community/virtualbox-modules/PKGBUILD
@@ -1,23 +1,25 @@
-# $Id: PKGBUILD 90419 2013-05-12 09:09:05Z thomas $
+# $Id: PKGBUILD 91789 2013-05-27 20:00:36Z tpowa $
# Maintainer: Ionut Biru <ibiru@archlinux.org>
# Maintainer: Sébastien Luttringer
pkgbase=virtualbox-modules
pkgname=('virtualbox-host-modules' 'virtualbox-guest-modules')
pkgver=4.2.12
-pkgrel=5
+pkgrel=6
arch=('i686' 'x86_64')
url='http://virtualbox.org'
license=('GPL')
-makedepends=('linux-headers'
+makedepends=('linux'
+ 'linux-headers'
"virtualbox-host-dkms>=$pkgver"
"virtualbox-guest-dkms>=$pkgver"
'expac'
+ 'sed'
'bc')
build() {
- _kernver=$(expac -Q '%v' linux-headers)-ARCH
- #_kernver=3.9.0-1-ARCH
+ _kernmaj=$(expac -Q '%v' linux|sed -r 's/([[:digit:]]+\.[[:digit:]]+).*/\1/')
+ _kernver=$(< /usr/lib/modules/extramodules-$_kernmaj-ARCH/version)
# dkms need modification to be run as user
cp -r /var/lib/dkms .
echo "dkms_tree='$srcdir/dkms'" > dkms.conf
@@ -30,39 +32,36 @@ build() {
}
package_virtualbox-host-modules(){
- _kernver=$(expac -Q '%v' linux-headers)-ARCH
- #_kernver=3.9.0-1-ARCH
- _extraver=extramodules-${_kernver%.*}-ARCH
+ _kernmaj=$(expac -Q '%v' linux|sed -r 's/([[:digit:]]+\.[[:digit:]]+).*/\1/')
+ _kernver=$(< /usr/lib/modules/extramodules-$_kernmaj-ARCH/version)
pkgdesc='Host kernel modules for VirtualBox'
- depends=("linux>=${_kernver%.*}" "linux<$(echo "${_kernver%.*}+0.1"|bc)")
+ depends=("linux>=$_kernmaj" "linux<$(echo "$_kernmaj+0.1"|bc)")
replaces=('virtualbox-modules')
conflicts=('virtualbox-modules')
install=virtualbox-host-modules.install
- install -dm755 "$pkgdir/usr/lib/modules/$_extraver"
cd "dkms/vboxhost/$pkgver/$_kernver/$CARCH/module"
- install -m644 * "$pkgdir/usr/lib/modules/$_extraver"
+ install -dm755 "$pkgdir/usr/lib/modules/extramodules-$_kernmaj-ARCH/"
+ install -m644 * "$pkgdir/usr/lib/modules/extramodules-$_kernmaj-ARCH/"
find "$pkgdir" -name '*.ko' -exec gzip -9 {} +
- sed -ie "s/EXTRAMODULES='.*'/EXTRAMODULES='$_extraver'/" "$startdir/virtualbox-host-modules.install"
+ sed -ie "s/VERSION='.*'/VERSION='$_kernver'/" "$startdir/virtualbox-host-modules.install"
}
package_virtualbox-guest-modules(){
- _kernver=$(expac -Q '%v' linux-headers)-ARCH
- #_kernver=3.9.0-1-ARCH
- _extraver=extramodules-${_kernver%.*}-ARCH
-
+ _kernmaj=$(expac -Q '%v' linux|sed -r 's/([[:digit:]]+\.[[:digit:]]+).*/\1/')
+ _kernver=$(< /usr/lib/modules/extramodules-$_kernmaj-ARCH/version)
pkgdesc='Guest kernel modules for VirtualBox'
license=('GPL')
- depends=("linux>=${_kernver%.*}" "linux<$(echo "${_kernver%.*}+0.1"|bc)")
+ depends=("linux>=$_kernmaj" "linux<$(echo "$_kernmaj+0.1"|bc)")
replaces=('virtualbox-archlinux-modules')
conflicts=('virtualbox-archlinux-modules')
install=virtualbox-guest-modules.install
- install -dm755 "$pkgdir/usr/lib/modules/$_extraver"
cd "dkms/vboxguest/$pkgver/$_kernver/$CARCH/module"
- install -m644 * "$pkgdir/usr/lib/modules/$_extraver"
+ install -dm755 "$pkgdir/usr/lib/modules/extramodules-$_kernmaj-ARCH/"
+ install -m644 * "$pkgdir/usr/lib/modules/extramodules-$_kernmaj-ARCH/"
find "$pkgdir" -name '*.ko' -exec gzip -9 {} +
- sed -ie "s/EXTRAMODULES='.*'/EXTRAMODULES='$_extraver'/" "$startdir/virtualbox-guest-modules.install"
+ 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 9084c05fd..8706a7205 100644
--- a/community/virtualbox-modules/virtualbox-guest-modules.install
+++ b/community/virtualbox-modules/virtualbox-guest-modules.install
@@ -1,17 +1,18 @@
+VERSION='3.9.4-1-ARCH'
+
post_install() {
cat << EOF
===> You may want to load vboxguest, vboxsf and vboxvideo
EOF
- EXTRAMODULES='extramodules-3.9-ARCH'
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+ depmod $VERSION
}
post_upgrade() {
- EXTRAMODULES='extramodules-3.9-ARCH'
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+ depmod $VERSION
}
post_remove() {
- EXTRAMODULES='extramodules-3.9-ARCH'
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+ depmod $VERSION
}
+
+# 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 78791f71d..c75dd089c 100644
--- a/community/virtualbox-modules/virtualbox-host-modules.install
+++ b/community/virtualbox-modules/virtualbox-host-modules.install
@@ -1,19 +1,20 @@
+VERSION='3.9.4-1-ARCH'
+
post_install() {
cat << EOF
===> You must load vboxdrv module before starting VirtualBox:
===> # modprobe vboxdrv
EOF
- EXTRAMODULES='extramodules-3.9-ARCH'
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+ depmod $VERSION
}
post_upgrade() {
- EXTRAMODULES='extramodules-3.9-ARCH'
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
- echo 'In order to use the new version, reload all virtualbox modules manually.'
+ depmod $VERSION
+ echo 'In order to use the new version, reload all virtualbox modules manually.'
}
post_remove() {
- EXTRAMODULES='extramodules-3.9-ARCH'
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+ depmod $VERSION
}
+
+# vim:set ts=2 sw=2 et: