core/bbswitch/PKGBUILD

29 lines
869 B
Bash
Raw Normal View History

2012-11-19 21:27:09 +08:00
pkgname=bbswitch
2014-01-02 05:38:02 +08:00
pkgver=0.8
2018-08-25 06:54:22 +08:00
pkgrel=45
pkgdesc="kernel module allowing to switch dedicated graphics card on Optimus laptops"
arch=('x86_64')
2018-05-02 04:34:20 +08:00
url="http://github.com/Bumblebee-Project/bbswitch"
license=('GPL')
2018-08-25 06:54:22 +08:00
depends=("linux=4.18.5")
makedepends=("linux-headers=4.18.5")
_extramodules=extramodules-CHAKRA
2013-05-22 17:46:20 +08:00
source=("https://github.com/Bumblebee-Project/bbswitch/archive/v${pkgver}.tar.gz")
2014-01-02 05:38:02 +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() {
2014-01-02 05:38:02 +08:00
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"
2012-02-22 18:14:42 +08:00
}