From 777466db27694f0cad10a7159ba66f2a2b39a516 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 5 Oct 2012 01:33:02 -0700 Subject: Fri Oct 5 01:33:01 PDT 2012 --- community-testing/virtualbox-modules-lts/PKGBUILD | 69 +++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 community-testing/virtualbox-modules-lts/PKGBUILD (limited to 'community-testing/virtualbox-modules-lts/PKGBUILD') diff --git a/community-testing/virtualbox-modules-lts/PKGBUILD b/community-testing/virtualbox-modules-lts/PKGBUILD new file mode 100644 index 000000000..493f7cc3a --- /dev/null +++ b/community-testing/virtualbox-modules-lts/PKGBUILD @@ -0,0 +1,69 @@ +# $Id: PKGBUILD 77089 2012-10-04 16:56:39Z bpiotrowski $ +# Maintainer: Bartłomiej Piotrowski +# Contributor: Ionut Biru +# Contributor: Sébastien Luttringer + +pkgbase=virtualbox-modules-lts +pkgname=('virtualbox-host-modules-lts' 'virtualbox-guest-modules-lts') +pkgver=4.2.0 +pkgrel=3 +arch=('i686' 'x86_64') +url='http://virtualbox.org' +license=('GPL') +makedepends=('linux-lts-headers' + "virtualbox-host-source>=$pkgver" + "virtualbox-guest-source>=$pkgver" + 'expac') + +build() { + # current kernel version + _kernver=$(expac -Q '%v' linux-lts-headers)-lts + # dkms need modification to be run as user + cp -r /var/lib/dkms . + echo "dkms_tree='$srcdir/dkms'" > dkms.conf + # build host modules + msg2 'Host modules' + dkms --dkmsframework dkms.conf build "vboxhost/$pkgver" -k "$_kernver" + # build guest modules + msg2 'Guest modules' + dkms --dkmsframework dkms.conf build "vboxguest/$pkgver" -k "$_kernver" +} + +package_virtualbox-host-modules-lts(){ + pkgdesc='Host kernel modules for VirtualBox' + depends=('linux-lts>=3.0' 'linux-lts<3.1') + replaces=('virtualbox-modules-lts') + conflicts=('virtualbox-modules-lts') + provides=("virtualbox-host-modules=$pkgver") + install=virtualbox-host-modules-lts.install + + _kernver=$(expac -Q '%v' linux-lts-headers)-lts + _extraver=extramodules-${_kernver%.*}-lts + + install -dm755 "$pkgdir/usr/lib/modules/$_extraver" + cd "dkms/vboxhost/$pkgver/$_kernver/$CARCH/module" + install -m644 * "$pkgdir/usr/lib/modules/$_extraver" + find "$pkgdir" -name '*.ko' -exec gzip -9 {} + + sed -ie "s/EXTRAMODULES='.*'/EXTRAMODULES='$_extraver'/" "$startdir/virtualbox-host-modules-lts.install" +} + +package_virtualbox-guest-modules-lts(){ + pkgdesc='Guest kernel modules for VirtualBox' + license=('GPL') + depends=('linux-lts>=3.0' 'linux-lts<3.1') + replaces=('virtualbox-archlinux-modules-lts') + conflicts=('virtualbox-archlinux-modules-lts') + provides=("virtualbox-host-modules=$pkgver") + install=virtualbox-guest-modules-lts.install + + _kernver=$(expac -Q '%v' linux-lts-headers)-lts + _extraver=extramodules-${_kernver%.*}-lts + + install -dm755 "$pkgdir/usr/lib/modules/$_extraver" + cd "dkms/vboxguest/$pkgver/$_kernver/$CARCH/module" + install -m644 * "$pkgdir/usr/lib/modules/$_extraver" + find "$pkgdir" -name '*.ko' -exec gzip -9 {} + + sed -ie "s/EXTRAMODULES='.*'/EXTRAMODULES='$_extraver'/" "$startdir/virtualbox-guest-modules-lts.install" +} + +# vim:set ts=2 sw=2 et: -- cgit v1.2.3-54-g00ecf