1 # Maintainer: Samsagax <samsagax@gmail.com>
6 pkgdesc="kernel module allowing to switch dedicated graphics card on Optimus laptops"
8 url=("http://github.com/Bumblebee-Project/bbswitch")
12 install=bbswitch.install
13 sources=("https://github.com/downloads/Bumblebee-Project/bbswitch/${pkgname}-${pkgver}.tar.gz")
16 cd ${srcdir}/${pkgname}-${pkgver}
21 cd ${srcdir}/${pkgname}-${pkgver}
22 for _kernver in $(file /boot/* | grep "Linux kernel" | sed -e 's/^.*version //g' -e 's/ .*$//g' | xargs); do
23 msg2 "Building module for $_kernver..."
25 # KDIR is necessary even when cleaning
26 make KDIR=/usr/src/linux-${_kernver} clean
27 make KDIR=/usr/src/linux-${_kernver}
28 install -D -m644 bbswitch.ko ${pkgdir}/lib/modules/${_kernver}/kernel/drivers/acpi/bbswitch.ko