Skip to content

@dapolinario /gist:3919759
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
PKGBUILD dkms-bbswitch-git
# Maintainer: Samsagax <samsagax@gmail.com>
pkgname=dkms-bbswitch-git
pkgver=20121019
pkgrel=1
pkgdesc="kernel module allowing to switch dedicated graphics card on Optimus laptops, dkms version"
arch=('i686' 'x86_64')
url=("http://github.com/Bumblebee-Project/bbswitch")
license=('GPL')
provides=('bbswitch')
conflicts=('bbswitch-git' 'bbswitch' 'dkms-bbswitch')
depends=('dkms' 'linux-headers')
makedepends=('git')
source=('dkms.conf.in')
md5sums=('262c8a723584860fa86f8e5fc8a4889a')
install=dkms-bbswitch.install
_gitroot=('git://github.com/Bumblebee-Project/bbswitch.git')
_gitname=("bbswitch")
_gitbranch=('develop')
build() {
cd ${srcdir}
## Git checkout
if [ -d ${srcdir}/${_gitname} ] ; then
msg "Git checkout: Updating existing tree"
cd ${_gitname} && git pull origin
msg "Git checkout: Tree has been updated"
else
msg "Git checkout: Retrieving sources"
git clone ${_gitroot} --branch ${_gitbranch}
fi
msg "Checkout completed"
}
package() {
cd ${srcdir}/${_gitname}
install -dm755 "${pkgdir}/usr/src/bbswitch-${pkgver}/"
for i in "${srcdir}/${_gitname}/"{Makefile,bbswitch.c}; do
install -D -m644 "${i}" "${pkgdir}/usr/src/bbswitch-${pkgver}/"
done
sed "s/#MODULE_VERSION#/${pkgver}/" "${srcdir}/dkms.conf.in" > "${pkgdir}/usr/src/bbswitch-${pkgver}/dkms.conf"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.