core/bbswitch-lts/PKGBUILD
2018-08-19 15:32:59 +02:00

31 lines
909 B
Bash

pkgname=bbswitch-lts
_pkgname=bbswitch
pkgver=0.8
pkgrel=14
pkgdesc="kernel module allowing to switch dedicated graphics card on Optimus laptops"
arch=('x86_64')
url='http://github.com/Bumblebee-Project/bbswitch'
license=('GPL')
provides=('bbswitch')
_extramodules=extramodules-CHAKRA-LTS
depends=("linux-lts=4.4.150")
makedepends=("linux-lts-headers=4.4.150")
source=("https://github.com/Bumblebee-Project/bbswitch/archive/v${pkgver}.tar.gz")
md5sums=('5b116b31ace3604ddf9d1fc1f4bc5807')
build() {
cd ${_pkgname}-${pkgver}
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
msg2 "Kernel = $KERNEL_VERSION"
make KDIR="/usr/lib/modules/$KERNEL_VERSION/build/"
}
package() {
cd ${_pkgname}-${pkgver}
# KDIR is necessary even when cleaning
install -Dm644 bbswitch.ko $pkgdir/usr/lib/modules/${_extramodules}/bbswitch.ko
gzip "${pkgdir}/usr/lib/modules/${_extramodules}/bbswitch.ko"
}