diff options
author | Rhys Perry | 2020-02-16 21:29:59 +0000 |
---|---|---|
committer | Rhys Perry | 2020-02-16 21:29:59 +0000 |
commit | 14d5e2a6d7b04a47360635adc927032ccc88b782 (patch) | |
tree | 3afb54745fd3ba6c56fc6a68502984911084642a /PKGBUILD | |
parent | 412acfcc881301305c20bf34de98d9600fcea144 (diff) | |
download | aur-14d5e2a6d7b04a47360635adc927032ccc88b782.tar.gz |
Force recompile for new kernel
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -3,7 +3,7 @@ pkgname=bbswitch-zen pkgver=0.8 -pkgrel=3 +pkgrel=4 pkgdesc="Kernel module allowing to switch dedicated graphics card on Optimus laptops" arch=('x86_64') url="http://github.com/Bumblebee-Project/bbswitch" @@ -14,6 +14,8 @@ depends=('linux-zen') makedepends=('linux-zen-headers') source=("bbswitch-${pkgver}.tar.gz::https://github.com/Bumblebee-Project/bbswitch/archive/v${pkgver}.tar.gz") md5sums=('SKIP') +_verstring="$(pacman -Qi linux-zen | grep Version | tr -s " " | cut -d ' ' -f3)" +_kernname="$(echo ${_verstring} | cut -d '.' -f1)"."$(echo ${_verstring} | cut -d '.' -f2)"."$(echo ${_verstring} | cut -d '.' -f3)"-"$(echo ${_verstring} | cut -d '.' -f4)"-zen prepare(){ echo -e '\033[1;31mWARNING:\033[0m \033[0;33mThis package MUST be rebuilt every time you upgrade your kernel.\n I will try to update `pkgrel` as soon as an update comes out but this might take a few hours for me to notice.\n If you do not rebuild expect errors\033[0m\033[0m' @@ -21,12 +23,11 @@ prepare(){ build() { cd bbswitch-${pkgver} - make + make -C /usr/lib/modules/${_kernname}/build M=$(pwd) modules } package() { cd bbswitch-${pkgver} - _kernname="$(ls -a /usr/lib/modules | grep zen$)" _extradir="/usr/lib/modules/${_kernname}/extramodules" install -Dt "${pkgdir}${_extradir}" -m644 *.ko find "${pkgdir}" -name '*.ko' -exec xz {} + |