diff options
author | root <root@rshg054.dnsready.net> | 2013-04-13 00:05:58 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-04-13 00:05:58 -0700 |
commit | 8f0418e4a239ba973834592537b474d3aac52d5b (patch) | |
tree | 55787459ba85dcd3ea548b37ca4027ef993c28b5 /community/virtualbox-modules | |
parent | d976aa5e1544c80dc2457ea20b27f28f3fa05899 (diff) |
Sat Apr 13 00:05:58 PDT 2013
Diffstat (limited to 'community/virtualbox-modules')
-rw-r--r-- | community/virtualbox-modules/PKGBUILD | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/community/virtualbox-modules/PKGBUILD b/community/virtualbox-modules/PKGBUILD index e36fd36e4..3941dbe84 100644 --- a/community/virtualbox-modules/PKGBUILD +++ b/community/virtualbox-modules/PKGBUILD @@ -1,12 +1,11 @@ -# $Id: PKGBUILD 87865 2013-04-08 09:34:55Z tpowa $ +# $Id: PKGBUILD 88161 2013-04-12 16:17:46Z seblu $ # Maintainer: Ionut Biru <ibiru@archlinux.org> # Maintainer: Sébastien Luttringer pkgbase=virtualbox-modules pkgname=('virtualbox-host-modules' 'virtualbox-guest-modules') -pkgver=4.2.10 -_extramodules=extramodules-3.8-ARCH -pkgrel=4 +pkgver=4.2.12 +pkgrel=1 arch=('i686' 'x86_64') url='http://virtualbox.org' license=('GPL') @@ -17,7 +16,7 @@ makedepends=('linux-headers' 'bc') build() { - _kernver="$(cat /usr/lib/modules/${_extramodules}/version)" + _kernver=$(expac -Q '%v' linux-headers)-ARCH # dkms need modification to be run as user cp -r /var/lib/dkms . @@ -31,7 +30,8 @@ build() { } package_virtualbox-host-modules(){ - _kernver="$(cat /usr/lib/modules/${_extramodules}/version)" + _kernver=$(expac -Q '%v' linux-headers)-ARCH + _extraver=extramodules-${_kernver%.*}-ARCH pkgdesc='Host kernel modules for VirtualBox' depends=("linux>=${_kernver%.*}" "linux<$(echo "${_kernver%.*}+0.1"|bc)") @@ -39,15 +39,16 @@ package_virtualbox-host-modules(){ conflicts=('virtualbox-modules') install=virtualbox-host-modules.install - install -dm755 "$pkgdir/usr/lib/modules/$_extramodules" + install -dm755 "$pkgdir/usr/lib/modules/$_extraver" cd "dkms/vboxhost/$pkgver/$_kernver/$CARCH/module" - install -m644 * "$pkgdir/usr/lib/modules/$_extramodules" + install -m644 * "$pkgdir/usr/lib/modules/$_extraver" find "$pkgdir" -name '*.ko' -exec gzip -9 {} + - sed -ie "s/EXTRAMODULES='.*'/EXTRAMODULES='$_extramodules'/" "$startdir/virtualbox-host-modules.install" + sed -ie "s/EXTRAMODULES='.*'/EXTRAMODULES='$_extraver'/" "$startdir/virtualbox-host-modules.install" } package_virtualbox-guest-modules(){ - _kernver="$(cat /usr/lib/modules/${_extramodules}/version)" + _kernver=$(expac -Q '%v' linux-headers)-ARCH + _extraver=extramodules-${_kernver%.*}-ARCH pkgdesc='Guest kernel modules for VirtualBox' license=('GPL') @@ -56,11 +57,11 @@ package_virtualbox-guest-modules(){ conflicts=('virtualbox-archlinux-modules') install=virtualbox-guest-modules.install - install -dm755 "$pkgdir/usr/lib/modules/$_extramodules" + install -dm755 "$pkgdir/usr/lib/modules/$_extraver" cd "dkms/vboxguest/$pkgver/$_kernver/$CARCH/module" - install -m644 * "$pkgdir/usr/lib/modules/$_extramodules" + install -m644 * "$pkgdir/usr/lib/modules/$_extraver" find "$pkgdir" -name '*.ko' -exec gzip -9 {} + - sed -ie "s/EXTRAMODULES='.*'/EXTRAMODULES='$_extramodules'/" "$startdir/virtualbox-guest-modules.install" + sed -ie "s/EXTRAMODULES='.*'/EXTRAMODULES='$_extraver'/" "$startdir/virtualbox-guest-modules.install" } # vim:set ts=2 sw=2 et: |