Created
October 19, 2012 18:17
-
-
Save dapolinario/3919759 to your computer and use it in GitHub Desktop.
PKGBUILD dkms-bbswitch-git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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