core/bbswitch/PKGBUILD
2018-09-06 22:49:55 +02:00

29 lines
869 B
Bash

pkgname=bbswitch
pkgver=0.8
pkgrel=46
pkgdesc="kernel module allowing to switch dedicated graphics card on Optimus laptops"
arch=('x86_64')
url="http://github.com/Bumblebee-Project/bbswitch"
license=('GPL')
depends=("linux=4.18.6")
makedepends=("linux-headers=4.18.6")
_extramodules=extramodules-CHAKRA
source=("https://github.com/Bumblebee-Project/bbswitch/archive/v${pkgver}.tar.gz")
md5sums=('5b116b31ace3604ddf9d1fc1f4bc5807')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
msg2 "Kernel = $KERNEL_VERSION"
make KDIR="/usr/lib/modules/$KERNEL_VERSION/build/"
}
package() {
cd ${srcdir}/${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"
}