Commit 5c1b9f4f authored by AlmAck's avatar AlmAck

bbswitch removed .install file

parent f5ecf175
pkgname=bbswitch
pkgver=0.8
pkgrel=43
pkgrel=44
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.18.3")
makedepends=("linux-headers=4.18.3")
_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)
......@@ -28,10 +22,7 @@ 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"
}
post_install() {
EXTRAMODULES='extramodules-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
echo 'In order to use nvidia module, reboot the system.'
}
post_upgrade() {
EXTRAMODULES='extramodules-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
post_remove() {
EXTRAMODULES='extramodules-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment