summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4da7d4700910eaa8903492b534759dfa7bdbd9a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Maintainer: Thaodan <theodorstormgrade@gmail.com>
# Base Package Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: M0Rf30
# Contributor: Samsagax <samsagax@gmail.com>

pkgname=bbswitch-pf
_pkgname=bbswitch
_godver=4.11
_badver=4.12
pkgver=0.8
_extramodules=extramodules-$_godver-pf # Don't forget to update bbswitch.install
pkgrel=44
pkgdesc="Kernel module allowing to switch dedicated graphics card on Optimus laptops"
arch=('i686' 'x86_64')
url="http://github.com/Bumblebee-Project/bbswitch"
license=('GPL')
depends=("linux-pf>=$_godver" "linux-pf<$_badver")
makedepends=("linux-pf-headers")
install=bbswitch.install
source=(git+https://github.com/Bumblebee-Project/bbswitch.git#branch=pm-rework)
md5sums=('SKIP')

build() {
  cd ${srcdir}/${_pkgname}

  _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"

  make KDIR=/lib/modules/${_kernver}/build
}

package() {
  cd ${srcdir}/${_pkgname}
   
  install -Dm644 bbswitch.ko "${pkgdir}"/usr/lib/modules/${_extramodules}/bbswitch.ko
  gzip "${pkgdir}/usr/lib/modules/${_extramodules}/bbswitch.ko"                      
}