summaryrefslogtreecommitdiff
path: root/community/virtualbox-modules-lts
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-09-20 20:05:58 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-09-20 20:05:58 -0300
commit1872d2123d241e0a3ef01a50fcdc4596b056bcf4 (patch)
treea9ba894779ea4dc5df5f6d5a9bceae99f4c44e06 /community/virtualbox-modules-lts
parent5a05be089c68617c86c9c555e63f2b0314451ebf (diff)
parent005a14f92ef5d35e4c47d970cb7e69367a835958 (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/balsa/PKGBUILD community/bitcoin/PKGBUILD community/jack2/PKGBUILD community/kadu/PKGBUILD community/oss/PKGBUILD core/sudo/PKGBUILD extra/djvulibre/PKGBUILD extra/gtk2/PKGBUILD extra/kdenetwork/PKGBUILD extra/samba/PKGBUILD gnome-unstable/at-spi2-atk/PKGBUILD gnome-unstable/at-spi2-core/PKGBUILD gnome-unstable/glib-networking/PKGBUILD gnome-unstable/glib2/PKGBUILD gnome-unstable/gobject-introspection/PKGBUILD libre/kdenetwork-kopete-libre/PKGBUILD multilib/jack2-multilib/PKGBUILD multilib/lib32-gtk2/PKGBUILD multilib/lib32-sdl/PKGBUILD multilib/wine/PKGBUILD multilib/zsnes/PKGBUILD testing/btrfs-progs/PKGBUILD testing/dnsutils/PKGBUILD testing/man-db/PKGBUILD testing/postgresql/PKGBUILD testing/postgresql/postgresql.install testing/postgresql/postgresql.service testing/procps-ng/PKGBUILD testing/procps-ng/sysctl.conf testing/sudo/PKGBUILD testing/xf86-video-nouveau/PKGBUILD testing/xf86-video-nouveau/xf86-video-nouveau.install
Diffstat (limited to 'community/virtualbox-modules-lts')
-rw-r--r--community/virtualbox-modules-lts/PKGBUILD69
-rwxr-xr-xcommunity/virtualbox-modules-lts/build.sh20
-rw-r--r--community/virtualbox-modules-lts/virtualbox-guest-modules-lts.install16
-rw-r--r--community/virtualbox-modules-lts/virtualbox-host-modules-lts.install18
4 files changed, 123 insertions, 0 deletions
diff --git a/community/virtualbox-modules-lts/PKGBUILD b/community/virtualbox-modules-lts/PKGBUILD
new file mode 100644
index 000000000..53f2c101d
--- /dev/null
+++ b/community/virtualbox-modules-lts/PKGBUILD
@@ -0,0 +1,69 @@
+# $Id: PKGBUILD 76475 2012-09-18 19:15:56Z 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.0
+pkgrel=2
+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:
diff --git a/community/virtualbox-modules-lts/build.sh b/community/virtualbox-modules-lts/build.sh
new file mode 100755
index 000000000..828448cab
--- /dev/null
+++ b/community/virtualbox-modules-lts/build.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+if (( $# != 1 )); then
+ echo "usage: $0 extra"
+ echo " $0 testing"
+ exit 1
+fi
+
+$1-i686-build
+linux32 makechrootpkg -I ../../virtualbox/trunk/virtualbox-host-source-*-i686.pkg.tar.xz -r /var/lib/archbuild/$1-i686
+linux32 makechrootpkg -I ../../virtualbox/trunk/virtualbox-guest-source-*-i686.pkg.tar.xz -r /var/lib/archbuild/$1-i686
+linux32 makechrootpkg -r /var/lib/archbuild/$1-i686
+
+$1-x86_64-build
+makechrootpkg -I ../../virtualbox/trunk/virtualbox-host-source-*-x86_64.pkg.tar.xz -r /var/lib/archbuild/$1-x86_64
+makechrootpkg -I ../../virtualbox/trunk/virtualbox-guest-source-*-x86_64.pkg.tar.xz -r /var/lib/archbuild/$1-x86_64
+makechrootpkg -r /var/lib/archbuild/$1-x86_64
+
+
+# vim:set ts=2 sw=2 ft=sh et:
diff --git a/community/virtualbox-modules-lts/virtualbox-guest-modules-lts.install b/community/virtualbox-modules-lts/virtualbox-guest-modules-lts.install
new file mode 100644
index 000000000..d2984a743
--- /dev/null
+++ b/community/virtualbox-modules-lts/virtualbox-guest-modules-lts.install
@@ -0,0 +1,16 @@
+EXTRAMODULES='extramodules-3.0-lts'
+
+post_install() {
+cat << EOF
+===> You may want to load vboxguest, vboxsf and vboxvideo
+EOF
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
+
+post_upgrade() {
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
+
+post_remove() {
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
diff --git a/community/virtualbox-modules-lts/virtualbox-host-modules-lts.install b/community/virtualbox-modules-lts/virtualbox-host-modules-lts.install
new file mode 100644
index 000000000..07ecf7311
--- /dev/null
+++ b/community/virtualbox-modules-lts/virtualbox-host-modules-lts.install
@@ -0,0 +1,18 @@
+EXTRAMODULES='extramodules-3.0-lts'
+
+post_install() {
+cat << EOF
+===> You must load vboxdrv module before starting VirtualBox:
+===> # modprobe vboxdrv
+EOF
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
+
+post_upgrade() {
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+ echo 'In order to use the new version, reload all virtualbox modules manually.'
+}
+
+post_remove() {
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}