diff options
Diffstat (limited to 'libre')
-rw-r--r-- | libre/virtualbox-libre-modules-lts/PKGBUILD | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/libre/virtualbox-libre-modules-lts/PKGBUILD b/libre/virtualbox-libre-modules-lts/PKGBUILD index 669e0e668..4378a3fdb 100644 --- a/libre/virtualbox-libre-modules-lts/PKGBUILD +++ b/libre/virtualbox-libre-modules-lts/PKGBUILD @@ -21,8 +21,8 @@ makedepends=('linux-libre-lts' '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 @@ -35,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') @@ -47,16 +46,15 @@ package_virtualbox-libre-host-modules-lts(){ install=virtualbox-libre-host-modules-lts.install cd "dkms/vboxhost/$pkgver/$_kernver/$CARCH/module" - install -dm755 "$pkgdir/usr/lib/modules/$_extraver" - 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/VERSION='.*'/VERSION='$_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)") @@ -67,10 +65,10 @@ package_virtualbox-libre-guest-modules-lts(){ install=virtualbox-libre-guest-modules-lts.install cd "dkms/vboxguest/$pkgver/$_kernver/$CARCH/module" - install -dm755 "$pkgdir/usr/lib/modules/$_extraver" - 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/VERSION='.*'/VERSION='$_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: |