summaryrefslogtreecommitdiff
path: root/libre/virtualbox-libre-modules
diff options
context:
space:
mode:
Diffstat (limited to 'libre/virtualbox-libre-modules')
-rw-r--r--libre/virtualbox-libre-modules/PKGBUILD39
-rwxr-xr-xlibre/virtualbox-libre-modules/virtualbox-libre-guest-modules.install13
-rwxr-xr-xlibre/virtualbox-libre-modules/virtualbox-libre-host-modules.install15
3 files changed, 36 insertions, 31 deletions
diff --git a/libre/virtualbox-libre-modules/PKGBUILD b/libre/virtualbox-libre-modules/PKGBUILD
index 713c61158..9077a0ac4 100644
--- a/libre/virtualbox-libre-modules/PKGBUILD
+++ b/libre/virtualbox-libre-modules/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id$
+# $Id: PKGBUILD 90212 2013-05-09 00:26:24Z seblu $
# Maintainer: Ionut Biru <ibiru@archlinux.org>
# Maintainer: Sébastien Luttringer <seblu@archlinux.org>
# Maintainer (Parabola): Jorge López <jorginho@lavabit.com>
@@ -7,20 +7,21 @@
pkgbase=virtualbox-libre-modules
pkgname=('virtualbox-libre-host-modules' 'virtualbox-libre-guest-modules')
pkgver=4.2.12
-_extramodules=extramodules-3.8-LIBRE
-pkgrel=3
+pkgrel=5
arch=('i686' 'x86_64')
url='http://virtualbox.org'
license=('GPL')
-makedepends=('linux-libre-headers'
+makedepends=('linux-libre'
+ 'linux-libre-headers'
"virtualbox-libre-host-dkms>=$pkgver"
"virtualbox-libre-guest-dkms>=$pkgver"
'expac'
+ 'sed'
'bc')
build() {
- _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
-
+ _kernmaj=$(expac -Q '%v' linux-libre|sed -r 's/([[:digit:]]+\.[[:digit:]]+).*/\1/')
+ _kernver=$(< /usr/lib/modules/extramodules-$_kernmaj-LIBRE/version)
# dkms need modification to be run as user
cp -r /var/lib/dkms .
echo "dkms_tree='$srcdir/dkms'" > dkms.conf
@@ -33,38 +34,40 @@ build() {
}
package_virtualbox-libre-host-modules(){
- _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
-
+ _kernmaj=$(expac -Q '%v' linux-libre|sed -r 's/([[:digit:]]+\.[[:digit:]]+).*/\1/')
+ _kernver=$(< /usr/lib/modules/extramodules-$_kernmaj-LIBRE/version)
pkgdesc='Host kernel modules for VirtualBox (built for the linux-libre kernel package)'
- depends=('linux-libre>=3.8' 'linux-libre<3.9')
+ #depends=("linux-libre>=$_kernmaj" "linux-libre<$(echo "$_kernmaj+0.1"|bc)")
+ depends=('linux-libre>=3.9' 'linux-libre<3.10')
provides=("virtualbox-host-modules=${pkgver}")
replaces=('virtualbox-host-modules' 'virtualbox-modules' 'virtualbox-libre-modules')
conflicts=('virtualbox-host-modules' 'virtualbox-modules' 'virtualbox-libre-modules')
install=virtualbox-libre-host-modules.install
- install -dm755 "$pkgdir/usr/lib/modules/$_extramodules"
cd "dkms/vboxhost/$pkgver/$_kernver/$CARCH/module"
- install -m644 * "$pkgdir/usr/lib/modules/$_extramodules"
+ install -dm755 "$pkgdir/usr/lib/modules/extramodules-$_kernmaj-LIBRE/"
+ install -m644 * "$pkgdir/usr/lib/modules/extramodules-$_kernmaj-LIBRE/"
find "$pkgdir" -name '*.ko' -exec gzip -9 {} +
- sed -ie "s/EXTRAMODULES='.*'/EXTRAMODULES='$_extramodules'/" "$startdir/virtualbox-libre-host-modules.install"
+ sed -ie "s/VERSION='.*'/VERSION='$_kernver'/" "$startdir/virtualbox-libre-host-modules.install"
}
package_virtualbox-libre-guest-modules(){
- _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
-
+ _kernmaj=$(expac -Q '%v' linux-libre|sed -r 's/([[:digit:]]+\.[[:digit:]]+).*/\1/')
+ _kernver=$(< /usr/lib/modules/extramodules-$_kernmaj-LIBRE/version)
pkgdesc='Guest kernel modules for VirtualBox (built for the linux-libre kernel package)'
license=('GPL')
- depends=('linux-libre>=3.8' 'linux-libre<3.9')
+ #depends=("linux-libre>=$_kernmaj" "linux-libre<$(echo "$_kernmaj+0.1"|bc)")
+ depends=('linux-libre>=3.9' 'linux-libre<3.10')
provides=("virtualbox-guest-modules=${pkgver}")
replaces=('virtualbox-guest-modules' 'virtualbox-archlinux-modules' 'virtualbox-parabola-modules')
conflicts=('virtualbox-guest-modules' 'virtualbox-archlinux-modules' 'virtualbox-parabola-modules')
install=virtualbox-libre-guest-modules.install
- install -dm755 "$pkgdir/usr/lib/modules/$_extramodules"
cd "dkms/vboxguest/$pkgver/$_kernver/$CARCH/module"
- install -m644 * "$pkgdir/usr/lib/modules/$_extramodules"
+ install -dm755 "$pkgdir/usr/lib/modules/extramodules-$_kernmaj-LIBRE/"
+ install -m644 * "$pkgdir/usr/lib/modules/extramodules-$_kernmaj-LIBRE/"
find "$pkgdir" -name '*.ko' -exec gzip -9 {} +
- sed -ie "s/EXTRAMODULES='.*'/EXTRAMODULES='$_extramodules'/" "$startdir/virtualbox-libre-guest-modules.install"
+ sed -ie "s/VERSION='.*'/VERSION='$_kernver'/" "$startdir/virtualbox-libre-guest-modules.install"
}
# vim:set ts=2 sw=2 et:
diff --git a/libre/virtualbox-libre-modules/virtualbox-libre-guest-modules.install b/libre/virtualbox-libre-modules/virtualbox-libre-guest-modules.install
index 3a8199ff8..82bda9855 100755
--- a/libre/virtualbox-libre-modules/virtualbox-libre-guest-modules.install
+++ b/libre/virtualbox-libre-modules/virtualbox-libre-guest-modules.install
@@ -1,17 +1,18 @@
+VERSION=''
+
post_install() {
cat << EOF
===> You may want to load vboxguest, vboxsf and vboxvideo
EOF
- EXTRAMODULES='extramodules-3.8-LIBRE'
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+ depmod $VERSION
}
post_upgrade() {
- EXTRAMODULES='extramodules-3.8-LIBRE'
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+ depmod $VERSION
}
post_remove() {
- EXTRAMODULES='extramodules-3.8-LIBRE'
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+ depmod $VERSION
}
+
+# vim:set ts=2 sw=2 et:
diff --git a/libre/virtualbox-libre-modules/virtualbox-libre-host-modules.install b/libre/virtualbox-libre-modules/virtualbox-libre-host-modules.install
index 0a6d187e5..6c1a57d3a 100755
--- a/libre/virtualbox-libre-modules/virtualbox-libre-host-modules.install
+++ b/libre/virtualbox-libre-modules/virtualbox-libre-host-modules.install
@@ -1,19 +1,20 @@
+VERSION=''
+
post_install() {
cat << EOF
===> You must load vboxdrv module before starting VirtualBox:
===> # modprobe vboxdrv
EOF
- EXTRAMODULES='extramodules-3.8-LIBRE'
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+ depmod $VERSION
}
post_upgrade() {
- EXTRAMODULES='extramodules-3.8-LIBRE'
- 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.8-LIBRE'
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+ depmod $VERSION
}
+
+# vim:set ts=2 sw=2 et: