# Maintainer : Cole Deck # Contributor : Davi da Silva Böger # Contributor : adytzu2007 # Contributor : Samsagax # Contributor : abbradar pkgname=bbswitch-g14-dkms-git _pkgname='bbswitch' pkgver=0.8.r5.gddbd243 pkgrel=1 pkgdesc="kernel module allowing to switch dedicated graphics card on the Zephyrus G14 and other similar laptops" arch=('i686' 'x86_64') url="https://github.com/Bumblebee-Project/bbswitch" license=('GPL') provides=('bbswitch') conflicts=('bbswitch-git' 'bbswitch' 'bbswitch-dkms' 'dkms-bbswitch' 'bbswitch-dkms-git') depends=('dkms' 'linux-headers') makedepends=('git') _gitroot='git://github.com/Bumblebee-Project/bbswitch.git' _gitbranch='develop' source=("${_gitroot}#branch=${_gitbranch}" "bbswitch-dkms-git-zephyrus14.patch") sha256sums=("SKIP" "c26e9a63e28575cee6518a7e8b21e6886f70b96e9ca922d9b46cfc5b2247a6fe") pkgver() { cd "$srcdir/${_pkgname}" git describe --long | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g' } prepare() { cd "${srcdir}/${_pkgname}" # Exceprt adapted from upstream Makefile.dkms sed -e "s/#MODULE_VERSION#/${pkgver}/" -i "dkms/dkms.conf" } package() { cd "${srcdir}/${_pkgname}" patch -p1 bbswitch.c ${srcdir}/bbswitch-dkms-git-zephyrus14.patch install -dm755 "${pkgdir}/usr/src/${_pkgname}-${pkgver}" install -Dm644 Makefile bbswitch.c dkms/dkms.conf "${pkgdir}/usr/src/${_pkgname}-${pkgver}" install -dm755 "${pkgdir}/usr/share/doc/${_pkgname}/" install -Dm644 NEWS README.md "${pkgdir}/usr/share/doc/${_pkgname}/" }