core/bbswitch-lts/PKGBUILD

38 lines
1.3 KiB
Bash
Raw Normal View History

# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
_extramodules=extramodules-3.14-CHAKRA-LTS
2014-04-23 02:44:14 +08:00
_kver="$(cat /lib/modules/${_extramodules}/version)"
2015-06-07 19:59:52 +08:00
_kernelver=3.14.44
pkgname=bbswitch-lts
_pkgname=bbswitch
2014-04-23 02:44:14 +08:00
pkgver=0.8
2015-06-07 19:59:52 +08:00
pkgrel=5
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')
install=bbswitch.install
depends=("linux-lts=${_kernelver}")
makedepends=("linux-lts-headers=${_kernelver}")
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}
make KDIR=/usr/lib/modules/${_kver}/build KVERSION=${_kver}
}
package() {
cd ${srcdir}/${_pkgname}-${pkgver}
msg2 "Building module for $_kver..."
# KDIR is necessary even when cleaning
#make KDIR=/usr/src/linux-${_kver} clean
mkdir -p $pkgdir/usr/lib/modules/${_extramodules}
install -D -m644 bbswitch.ko $pkgdir/usr/lib/modules/${_extramodules}
gzip "${pkgdir}/usr/lib/modules/${_extramodules}/bbswitch.ko"
#automatically update bbswitch.install
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/bbswitch.install"
}