core/bbswitch/PKGBUILD
AlmAck 2866cac7f2 kernel 4.17.x
removed source lines and make each PKGBUILD stand alone
removed nvidia-304xx

missing the LTS group and the script for fast updates, like kdeupdate.sh
2018-08-04 16:47:44 +02:00

38 lines
1.1 KiB
Bash

pkgname=bbswitch
pkgver=0.8
pkgrel=41
pkgdesc="kernel module allowing to switch dedicated graphics card on Optimus laptops"
arch=('x86_64')
url="http://github.com/Bumblebee-Project/bbswitch"
license=('GPL')
install=bbswitch.install
depends=("linux=4.17.12")
makedepends=("linux-headers=4.17.12")
_extramodules=extramodules-CHAKRA
source=("https://github.com/Bumblebee-Project/bbswitch/archive/v${pkgver}.tar.gz")
md5sums=('5b116b31ace3604ddf9d1fc1f4bc5807')
prepare() {
#automatically update bbswitch.install
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/bbswitch.install"
}
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"
}