blob: aa1f3d8907dc3de051e98f85f2d8962215f1befc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# $Id: PKGBUILD 78541 2012-10-20 11:53:48Z seblu $
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Sébastien Luttringer <seblu@aur.archlinux.org>
pkgbase=virtualbox-modules-lts
pkgname=('virtualbox-host-modules-lts' 'virtualbox-guest-modules-lts')
pkgver=4.2.2
pkgrel=1
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:
|