diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2013-06-20 15:25:33 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2013-06-20 15:25:33 -0300 |
commit | cebf33d7109e0157a80f34d6136e212f0a28d274 (patch) | |
tree | a6464302c970f72581105b50ff0896e1f56def3d /community/virtualbox-modules/PKGBUILD | |
parent | 1a65caeb80e2cc8c7b39262d72255124d0c8614e (diff) | |
parent | 5cb95ceee39e4691f768ea2fef60b8a106e92209 (diff) |
Merge branch 'master' of gparabola:abslibre-mips64el
Diffstat (limited to 'community/virtualbox-modules/PKGBUILD')
-rw-r--r-- | community/virtualbox-modules/PKGBUILD | 39 |
1 files changed, 19 insertions, 20 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: |