void-packages/srcpkgs/bbswitch/template

21 lines
736 B
Bash

# Template file for 'bbswitch'
pkgname=bbswitch
version=0.8
revision=5
archs="x86_64*"
depends="dkms"
short_desc="Kernel module for disabling the nVidia GPU on Optimus laptops"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://github.com/Bumblebee-Project/bbswitch"
distfiles="https://github.com/Bumblebee-Project/bbswitch/archive/v$version.tar.gz"
checksum=76cabd3f734fb4fe6ebfe3ec9814138d0d6f47d47238521ecbd6a986b60d1477
dkms_modules="${pkgname} ${version}"
do_install() {
vinstall Makefile 644 usr/src/${pkgname}-${version}
vinstall bbswitch.c 644 usr/src/${pkgname}-${version}
sed "s,#MODULE_VERSION#,${version}," dkms/dkms.conf > \
${DESTDIR}/usr/src/${pkgname}-${version}/dkms.conf
}