diff options
Diffstat (limited to 'libre/virtualbox-libre-modules-lts')
3 files changed, 40 insertions, 30 deletions
diff --git a/libre/virtualbox-libre-modules-lts/PKGBUILD b/libre/virtualbox-libre-modules-lts/PKGBUILD index 175c9c49f..1d985f296 100644 --- a/libre/virtualbox-libre-modules-lts/PKGBUILD +++ b/libre/virtualbox-libre-modules-lts/PKGBUILD @@ -1,26 +1,28 @@ -# $Id$ +# $Id: PKGBUILD 93525 2013-07-05 00:46:26Z seblu $ # Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl> # Contributor: Ionut Biru <ibiru@archlinux.org> # Contributor: Sébastien Luttringer <seblu@aur.archlinux.org> -# Maintainer (Parabola): Jorge López <jorginho@lavabit.com> # Maintainer (Parabola): André Silva <emulatorman@lavabit.com> +# Contributor (Parabola): Jorge López <jorginho@lavabit.com> pkgbase=virtualbox-libre-modules-lts pkgname=('virtualbox-libre-host-modules-lts' 'virtualbox-libre-guest-modules-lts') -pkgver=4.2.12 -pkgrel=3 +pkgver=4.2.16 +pkgrel=1.1 arch=('i686' 'x86_64') url='http://virtualbox.org' license=('GPL') -makedepends=('linux-libre-lts-headers' +makedepends=('linux-libre-lts' + 'linux-libre-lts-headers' "virtualbox-libre-host-dkms>=$pkgver" "virtualbox-libre-guest-dkms>=$pkgver" 'expac' + 'sed' 'bc') build() { - _kernver=$(expac -Q '%v' linux-libre-lts-headers)-LIBRE-LTS - + _kernmaj=$(expac -Q '%v' linux-libre-lts|sed -r 's/([[:digit:]]+\.[[:digit:]]+).*/\1/') + _kernver=$(< /usr/lib/modules/extramodules-$_kernmaj-LIBRE-LTS/version) # dkms need modification to be run as user cp -r /var/lib/dkms . echo "dkms_tree='$srcdir/dkms'" > dkms.conf @@ -33,9 +35,8 @@ build() { } package_virtualbox-libre-host-modules-lts(){ - _kernver=$(expac -Q '%v' linux-libre-lts-headers)-LIBRE-LTS - _extraver=extramodules-${_kernver%.*}-LIBRE-LTS - + _kernmaj=$(expac -Q '%v' linux-libre-lts|sed -r 's/([[:digit:]]+\.[[:digit:]]+).*/\1/') + _kernver=$(< /usr/lib/modules/extramodules-$_kernmaj-LIBRE-LTS/version) pkgdesc='Host kernel modules for VirtualBox (built for the linux-libre-lts kernel package)' # depends=("linux-libre-lts>=${_kernver%.*}" "linux-libre-lts<$(echo "${_kernver%.*}+0.1"|bc)") depends=('linux-libre-lts>=3.0' 'linux-libre-lts<3.1') @@ -44,17 +45,16 @@ package_virtualbox-libre-host-modules-lts(){ provides=("virtualbox-host-modules-lts=$pkgver" "virtualbox-libre-host-modules=$pkgver") install=virtualbox-libre-host-modules-lts.install - install -dm755 "$pkgdir/usr/lib/modules/$_extraver" cd "dkms/vboxhost/$pkgver/$_kernver/$CARCH/module" - install -m644 * "$pkgdir/usr/lib/modules/$_extraver" + install -dm755 "$pkgdir/usr/lib/modules/extramodules-$_kernmaj-LIBRE-LTS/" + install -m644 * "$pkgdir/usr/lib/modules/extramodules-$_kernmaj-LIBRE-LTS/" find "$pkgdir" -name '*.ko' -exec gzip -9 {} + - sed -ie "s/EXTRAMODULES='.*'/EXTRAMODULES='$_extraver'/" "$startdir/virtualbox-libre-host-modules-lts.install" + sed -ie "s/VERSION='.*'/VERSION='$_kernver'/" "$startdir/virtualbox-libre-host-modules-lts.install" } package_virtualbox-libre-guest-modules-lts(){ - _kernver=$(expac -Q '%v' linux-libre-lts-headers)-LIBRE-LTS - _extraver=extramodules-${_kernver%.*}-LIBRE-LTS - + _kernmaj=$(expac -Q '%v' linux-libre-lts|sed -r 's/([[:digit:]]+\.[[:digit:]]+).*/\1/') + _kernver=$(< /usr/lib/modules/extramodules-$_kernmaj-LIBRE-LTS/version) pkgdesc='Guest kernel modules for VirtualBox (built for the linux-libre-lts kernel package)' license=('GPL') # depends=("linux-libre-lts>=${_kernver%.*}" "linux-libre-lts<$(echo "${_kernver%.*}+0.1"|bc)") @@ -64,11 +64,11 @@ package_virtualbox-libre-guest-modules-lts(){ provides=("virtualbox-guest-modules-lts=$pkgver" "virtualbox-libre-host-modules=$pkgver") install=virtualbox-libre-guest-modules-lts.install - install -dm755 "$pkgdir/usr/lib/modules/$_extraver" cd "dkms/vboxguest/$pkgver/$_kernver/$CARCH/module" - install -m644 * "$pkgdir/usr/lib/modules/$_extraver" + install -dm755 "$pkgdir/usr/lib/modules/extramodules-$_kernmaj-LIBRE-LTS/" + install -m644 * "$pkgdir/usr/lib/modules/extramodules-$_kernmaj-LIBRE-LTS/" find "$pkgdir" -name '*.ko' -exec gzip -9 {} + - sed -ie "s/EXTRAMODULES='.*'/EXTRAMODULES='$_extraver'/" "$startdir/virtualbox-libre-guest-modules-lts.install" + sed -ie "s/VERSION='.*'/VERSION='$_kernver'/" "$startdir/virtualbox-libre-guest-modules-lts.install" } # vim:set ts=2 sw=2 et: diff --git a/libre/virtualbox-libre-modules-lts/virtualbox-libre-guest-modules-lts.install b/libre/virtualbox-libre-modules-lts/virtualbox-libre-guest-modules-lts.install index 54a052390..923bd68e3 100644 --- a/libre/virtualbox-libre-modules-lts/virtualbox-libre-guest-modules-lts.install +++ b/libre/virtualbox-libre-modules-lts/virtualbox-libre-guest-modules-lts.install @@ -1,16 +1,21 @@ -EXTRAMODULES='extramodules-3.0-LIBRE-LTS' +_depmod() { + EXTRAMODULES='extramodules-3.0-LIBRE-LTS' + depmod $(cat /usr/lib/modules/$EXTRAMODULES/version) +} post_install() { -cat << EOF + cat << EOF ===> You may want to load vboxguest, vboxsf and vboxvideo EOF - depmod $(cat /usr/lib/modules/$EXTRAMODULES/version) + _depmod } post_upgrade() { - depmod $(cat /usr/lib/modules/$EXTRAMODULES/version) + _depmod } post_remove() { - depmod $(cat /usr/lib/modules/$EXTRAMODULES/version) + _depmod } + +# vim:set ts=2 sw=2 et: diff --git a/libre/virtualbox-libre-modules-lts/virtualbox-libre-host-modules-lts.install b/libre/virtualbox-libre-modules-lts/virtualbox-libre-host-modules-lts.install index 4503996e8..97212dba1 100644 --- a/libre/virtualbox-libre-modules-lts/virtualbox-libre-host-modules-lts.install +++ b/libre/virtualbox-libre-modules-lts/virtualbox-libre-host-modules-lts.install @@ -1,18 +1,23 @@ -EXTRAMODULES='extramodules-3.0-LIBRE-LTS' +_depmod() { + EXTRAMODULES='extramodules-3.0-LIBRE-LTS' + depmod $(cat /usr/lib/modules/$EXTRAMODULES/version) +} post_install() { -cat << EOF + cat << EOF ===> You must load vboxdrv module before starting VirtualBox: ===> # modprobe vboxdrv EOF - depmod $(cat /usr/lib/modules/$EXTRAMODULES/version) + _depmod } post_upgrade() { - depmod $(cat /usr/lib/modules/$EXTRAMODULES/version) - echo 'In order to use the new version, reload all virtualbox modules manually.' + _depmod + echo 'In order to use the new version, reload all virtualbox modules manually.' } post_remove() { - depmod $(cat /usr/lib/modules/$EXTRAMODULES/version) + _depmod } + +# vim:set ts=2 sw=2 et: |