core/bbswitch-lts/PKGBUILD

31 lines
909 B
Bash
Raw Normal View History

pkgname=bbswitch-lts
_pkgname=bbswitch
2014-04-23 02:44:14 +08:00
pkgver=0.8
2018-09-07 05:41:03 +08:00
pkgrel=16
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')
2018-08-19 21:32:59 +08:00
_extramodules=extramodules-CHAKRA-LTS
2018-09-07 05:41:03 +08:00
depends=("linux-lts=4.4.154")
makedepends=("linux-lts-headers=4.4.154")
source=("https://github.com/Bumblebee-Project/bbswitch/archive/v${pkgver}.tar.gz")
2014-04-23 02:44:14 +08:00
md5sums=('5b116b31ace3604ddf9d1fc1f4bc5807')
build() {
2018-08-19 21:32:59 +08:00
cd ${_pkgname}-${pkgver}
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
msg2 "Kernel = $KERNEL_VERSION"
make KDIR="/usr/lib/modules/$KERNEL_VERSION/build/"
}
package() {
2018-08-19 21:32:59 +08:00
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"
}