summaryrefslogtreecommitdiff
path: root/libre/virtualbox-libre-modules
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2013-05-09 16:24:38 +0200
committerMichał Masłowski <mtjm@mtjm.eu>2013-05-09 16:24:38 +0200
commitcdbd7308d16cb249715cce9bedf8b809f2576804 (patch)
treebfdb3a816cf96988dc788e2678acdb294b032811 /libre/virtualbox-libre-modules
parenta86ff663185661ee304bb1f6d00d982102dd706d (diff)
parent648599b08776ea788a3ddb0365eb30fda03efe7b (diff)
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts: community/bwbar/PKGBUILD community/dosbox/PKGBUILD community/extremetuxracer/PKGBUILD community/fbgrab/PKGBUILD community/fbv/PKGBUILD community/flam3/PKGBUILD community/freedroidrpg/PKGBUILD community/gdk-pixbuf/PKGBUILD community/ghemical/PKGBUILD community/gmic/PKGBUILD community/gnash/PKGBUILD community/gnustep-base/PKGBUILD community/guvcview/PKGBUILD community/keepassx/PKGBUILD community/kvpnc/PKGBUILD community/libghemical/PKGBUILD community/liboglappth/PKGBUILD community/png2ico/PKGBUILD community/shapelib/PKGBUILD community/sloccount/PKGBUILD community/tmw/PKGBUILD community/xmoto/PKGBUILD core/links/PKGBUILD extra/amule/PKGBUILD extra/cairomm/PKGBUILD extra/calligra/PKGBUILD extra/evas/PKGBUILD extra/fltk/PKGBUILD extra/gd/PKGBUILD extra/gif2png/PKGBUILD extra/glhack/PKGBUILD extra/graphviz/PKGBUILD extra/gstreamer0.10-good/PKGBUILD extra/imlib/PKGBUILD extra/imlib2/PKGBUILD extra/lbreakout2/PKGBUILD extra/libgdiplus/PKGBUILD extra/libkate/PKGBUILD extra/libpano13/PKGBUILD extra/libwebp/PKGBUILD extra/libwmf/PKGBUILD extra/libxslt/PKGBUILD extra/mjpegtools/PKGBUILD extra/ntp/PKGBUILD extra/nx/PKGBUILD extra/openjpeg/PKGBUILD extra/php/PKGBUILD extra/plotutils/PKGBUILD extra/poppler/PKGBUILD extra/qrencode/PKGBUILD extra/qt4/PKGBUILD extra/qt5/PKGBUILD extra/qtiplot/PKGBUILD extra/qtwebkit/PKGBUILD extra/samba/PKGBUILD extra/sdl_image/PKGBUILD extra/vice/PKGBUILD extra/vigra/PKGBUILD extra/vlc/PKGBUILD extra/webkitgtk/PKGBUILD extra/webkitgtk2/PKGBUILD extra/wv/PKGBUILD extra/wxgtk/PKGBUILD extra/xaos/PKGBUILD extra/xsane/PKGBUILD extra/zvbi/PKGBUILD
Diffstat (limited to 'libre/virtualbox-libre-modules')
-rw-r--r--libre/virtualbox-libre-modules/PKGBUILD39
-rwxr-xr-xlibre/virtualbox-libre-modules/virtualbox-libre-guest-modules.install13
-rwxr-xr-xlibre/virtualbox-libre-modules/virtualbox-libre-host-modules.install15
3 files changed, 36 insertions, 31 deletions
diff --git a/libre/virtualbox-libre-modules/PKGBUILD b/libre/virtualbox-libre-modules/PKGBUILD
index 713c61158..9077a0ac4 100644
--- a/libre/virtualbox-libre-modules/PKGBUILD
+++ b/libre/virtualbox-libre-modules/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id$
+# $Id: PKGBUILD 90212 2013-05-09 00:26:24Z seblu $
# Maintainer: Ionut Biru <ibiru@archlinux.org>
# Maintainer: Sébastien Luttringer <seblu@archlinux.org>
# Maintainer (Parabola): Jorge López <jorginho@lavabit.com>
@@ -7,20 +7,21 @@
pkgbase=virtualbox-libre-modules
pkgname=('virtualbox-libre-host-modules' 'virtualbox-libre-guest-modules')
pkgver=4.2.12
-_extramodules=extramodules-3.8-LIBRE
-pkgrel=3
+pkgrel=5
arch=('i686' 'x86_64')
url='http://virtualbox.org'
license=('GPL')
-makedepends=('linux-libre-headers'
+makedepends=('linux-libre'
+ 'linux-libre-headers'
"virtualbox-libre-host-dkms>=$pkgver"
"virtualbox-libre-guest-dkms>=$pkgver"
'expac'
+ 'sed'
'bc')
build() {
- _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
-
+ _kernmaj=$(expac -Q '%v' linux-libre|sed -r 's/([[:digit:]]+\.[[:digit:]]+).*/\1/')
+ _kernver=$(< /usr/lib/modules/extramodules-$_kernmaj-LIBRE/version)
# dkms need modification to be run as user
cp -r /var/lib/dkms .
echo "dkms_tree='$srcdir/dkms'" > dkms.conf
@@ -33,38 +34,40 @@ build() {
}
package_virtualbox-libre-host-modules(){
- _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
-
+ _kernmaj=$(expac -Q '%v' linux-libre|sed -r 's/([[:digit:]]+\.[[:digit:]]+).*/\1/')
+ _kernver=$(< /usr/lib/modules/extramodules-$_kernmaj-LIBRE/version)
pkgdesc='Host kernel modules for VirtualBox (built for the linux-libre kernel package)'
- depends=('linux-libre>=3.8' 'linux-libre<3.9')
+ #depends=("linux-libre>=$_kernmaj" "linux-libre<$(echo "$_kernmaj+0.1"|bc)")
+ depends=('linux-libre>=3.9' 'linux-libre<3.10')
provides=("virtualbox-host-modules=${pkgver}")
replaces=('virtualbox-host-modules' 'virtualbox-modules' 'virtualbox-libre-modules')
conflicts=('virtualbox-host-modules' 'virtualbox-modules' 'virtualbox-libre-modules')
install=virtualbox-libre-host-modules.install
- install -dm755 "$pkgdir/usr/lib/modules/$_extramodules"
cd "dkms/vboxhost/$pkgver/$_kernver/$CARCH/module"
- install -m644 * "$pkgdir/usr/lib/modules/$_extramodules"
+ install -dm755 "$pkgdir/usr/lib/modules/extramodules-$_kernmaj-LIBRE/"
+ install -m644 * "$pkgdir/usr/lib/modules/extramodules-$_kernmaj-LIBRE/"
find "$pkgdir" -name '*.ko' -exec gzip -9 {} +
- sed -ie "s/EXTRAMODULES='.*'/EXTRAMODULES='$_extramodules'/" "$startdir/virtualbox-libre-host-modules.install"
+ sed -ie "s/VERSION='.*'/VERSION='$_kernver'/" "$startdir/virtualbox-libre-host-modules.install"
}
package_virtualbox-libre-guest-modules(){
- _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
-
+ _kernmaj=$(expac -Q '%v' linux-libre|sed -r 's/([[:digit:]]+\.[[:digit:]]+).*/\1/')
+ _kernver=$(< /usr/lib/modules/extramodules-$_kernmaj-LIBRE/version)
pkgdesc='Guest kernel modules for VirtualBox (built for the linux-libre kernel package)'
license=('GPL')
- depends=('linux-libre>=3.8' 'linux-libre<3.9')
+ #depends=("linux-libre>=$_kernmaj" "linux-libre<$(echo "$_kernmaj+0.1"|bc)")
+ depends=('linux-libre>=3.9' 'linux-libre<3.10')
provides=("virtualbox-guest-modules=${pkgver}")
replaces=('virtualbox-guest-modules' 'virtualbox-archlinux-modules' 'virtualbox-parabola-modules')
conflicts=('virtualbox-guest-modules' 'virtualbox-archlinux-modules' 'virtualbox-parabola-modules')
install=virtualbox-libre-guest-modules.install
- install -dm755 "$pkgdir/usr/lib/modules/$_extramodules"
cd "dkms/vboxguest/$pkgver/$_kernver/$CARCH/module"
- install -m644 * "$pkgdir/usr/lib/modules/$_extramodules"
+ install -dm755 "$pkgdir/usr/lib/modules/extramodules-$_kernmaj-LIBRE/"
+ install -m644 * "$pkgdir/usr/lib/modules/extramodules-$_kernmaj-LIBRE/"
find "$pkgdir" -name '*.ko' -exec gzip -9 {} +
- sed -ie "s/EXTRAMODULES='.*'/EXTRAMODULES='$_extramodules'/" "$startdir/virtualbox-libre-guest-modules.install"
+ sed -ie "s/VERSION='.*'/VERSION='$_kernver'/" "$startdir/virtualbox-libre-guest-modules.install"
}
# vim:set ts=2 sw=2 et:
diff --git a/libre/virtualbox-libre-modules/virtualbox-libre-guest-modules.install b/libre/virtualbox-libre-modules/virtualbox-libre-guest-modules.install
index 3a8199ff8..82bda9855 100755
--- a/libre/virtualbox-libre-modules/virtualbox-libre-guest-modules.install
+++ b/libre/virtualbox-libre-modules/virtualbox-libre-guest-modules.install
@@ -1,17 +1,18 @@
+VERSION=''
+
post_install() {
cat << EOF
===> You may want to load vboxguest, vboxsf and vboxvideo
EOF
- EXTRAMODULES='extramodules-3.8-LIBRE'
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+ depmod $VERSION
}
post_upgrade() {
- EXTRAMODULES='extramodules-3.8-LIBRE'
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+ depmod $VERSION
}
post_remove() {
- EXTRAMODULES='extramodules-3.8-LIBRE'
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+ depmod $VERSION
}
+
+# vim:set ts=2 sw=2 et:
diff --git a/libre/virtualbox-libre-modules/virtualbox-libre-host-modules.install b/libre/virtualbox-libre-modules/virtualbox-libre-host-modules.install
index 0a6d187e5..6c1a57d3a 100755
--- a/libre/virtualbox-libre-modules/virtualbox-libre-host-modules.install
+++ b/libre/virtualbox-libre-modules/virtualbox-libre-host-modules.install
@@ -1,19 +1,20 @@
+VERSION=''
+
post_install() {
cat << EOF
===> You must load vboxdrv module before starting VirtualBox:
===> # modprobe vboxdrv
EOF
- EXTRAMODULES='extramodules-3.8-LIBRE'
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+ depmod $VERSION
}
post_upgrade() {
- EXTRAMODULES='extramodules-3.8-LIBRE'
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
- echo 'In order to use the new version, reload all virtualbox modules manually.'
+ depmod $VERSION
+ echo 'In order to use the new version, reload all virtualbox modules manually.'
}
post_remove() {
- EXTRAMODULES='extramodules-3.8-LIBRE'
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+ depmod $VERSION
}
+
+# vim:set ts=2 sw=2 et: