core/bbswitch-lts/PKGBUILD

34 lines
1006 B
Bash
Raw Normal View History

pkgname=bbswitch-lts
_pkgname=bbswitch
2014-04-23 02:44:14 +08:00
pkgver=0.8
2018-08-19 19:20:58 +08:00
pkgrel=13
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
depends=("linux-lts=4.4.147")
2018-08-19 19:20:58 +08:00
makedepends=("linux-lts-headers=4.4.147")
source=("https://github.com/Bumblebee-Project/bbswitch/archive/v${pkgver}.tar.gz")
2014-04-23 02:44:14 +08:00
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}
msg2 "Building module for $_kver..."
# KDIR is necessary even when cleaning
#make KDIR=/usr/src/linux-${_kver} clean
install -Dm644 bbswitch.ko $pkgdir/usr/lib/modules/${_extramodules}/bbswitch.ko
gzip "${pkgdir}/usr/lib/modules/${_extramodules}/bbswitch.ko"
}