diff options
author | root <root@rshg054.dnsready.net> | 2013-08-13 01:33:19 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-08-13 01:33:19 -0700 |
commit | 7a65a910b77ad191d69881098c47f9b0c852d92e (patch) | |
tree | 9564e611af1442f8952a8cbddb3b0ad25ed71aab /community/virtualbox-modules/PKGBUILD | |
parent | 60da6abff6c9577a783d72865f11de7a585e912e (diff) |
Tue Aug 13 01:31:08 PDT 2013
Diffstat (limited to 'community/virtualbox-modules/PKGBUILD')
-rw-r--r-- | community/virtualbox-modules/PKGBUILD | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/community/virtualbox-modules/PKGBUILD b/community/virtualbox-modules/PKGBUILD new file mode 100644 index 000000000..cc8295555 --- /dev/null +++ b/community/virtualbox-modules/PKGBUILD @@ -0,0 +1,65 @@ +# $Id: PKGBUILD 95204 2013-08-06 14:56:23Z tpowa $ +# Maintainer: Ionut Biru <ibiru@archlinux.org> +# Maintainer: Sébastien Luttringer + +pkgbase=virtualbox-modules +pkgname=('virtualbox-host-modules' 'virtualbox-guest-modules') +pkgver=4.2.16 +pkgrel=5 +arch=('i686' 'x86_64') +url='http://virtualbox.org' +license=('GPL') +makedepends=('linux>=3.10' 'linux<3.11' + 'linux-headers>=3.10' 'linux-headers<3.11' + "virtualbox-host-dkms>=$pkgver" + "virtualbox-guest-dkms>=$pkgver" + 'expac' + 'sed' + 'bc') + +# remember to also adjust the .install files and the package deps below +_extramodules=extramodules-3.10-ARCH + +build() { + _kernver="$(cat /usr/lib/modules/$_extramodules/version)" + # 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(){ + _kernver="$(cat /usr/lib/modules/$_extramodules/version)" + pkgdesc='Host kernel modules for VirtualBox' + depends=('linux>=3.10' 'linux<3.11') + replaces=('virtualbox-modules') + conflicts=('virtualbox-modules') + install=virtualbox-host-modules.install + + cd "dkms/vboxhost/$pkgver/$_kernver/$CARCH/module" + install -dm755 "$pkgdir/usr/lib/modules/$_extramodules/" + install -m644 * "$pkgdir/usr/lib/modules/$_extramodules/" + find "$pkgdir" -name '*.ko' -exec gzip -9 {} + +} + +package_virtualbox-guest-modules(){ + _kernver="$(cat /usr/lib/modules/$_extramodules/version)" + pkgdesc='Guest kernel modules for VirtualBox' + license=('GPL') + depends=('linux>=3.10' 'linux<3.11') + replaces=('virtualbox-archlinux-modules') + conflicts=('virtualbox-archlinux-modules') + install=virtualbox-guest-modules.install + + cd "dkms/vboxguest/$pkgver/$_kernver/$CARCH/module" + install -dm755 "$pkgdir/usr/lib/modules/$_extramodules/" + install -m644 * "$pkgdir/usr/lib/modules/$_extramodules/" + find "$pkgdir" -name '*.ko' -exec gzip -9 {} + +} + +# vim:set ts=2 sw=2 et: |