PKGBUILD 1.57 KB
Newer Older
1 2 3 4 5 6 7 8
# Platform Packages for Chakra, part of chakra-project.org
#
# Maintainer: Neophytos Kolokotronis <tetris4@gmail.com>
# Contributor: Jason Melton <jason.melton@gmail.com>
# Contributor: Atilla ÖNTAŞ <tarakbumba@gmail.com>

pkgname=dkms-nvidia
_pkgname=nvidia
9 10
pkgver=304.30
pkgrel=1
11 12 13 14 15 16 17 18 19 20 21 22
pkgdesc="NVIDIA dynamic kernel module (DKMS) drivers for kernel26."
arch=(i686 x86_64)
url="http://www.nvidia.com/"
license=('custom')
depends=('dkms')
optdepends=("nvidia-utils=${pkgver}")
provides=("nvidia=${pkgver}")
conflicts=("nvidia")
install=${_pkgname}.install
options=(!strip)

if [ "$CARCH" = "i686" ]; then
abveritas's avatar
abveritas committed
23
	_pkg="NVIDIA-Linux-x86-${pkgver}"
Neophytos's avatar
Neophytos committed
24
  source=("http://us.download.nvidia.com/XFree86/Linux-x86/${pkgver}/${_pkg}.run")
25
  md5sums=('b7f908ea08218df08db06026215ec419')
26 27 28
elif [ "$CARCH" = "x86_64" ]; then
	_arch='x86_64'
	_pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32"
Neophytos's avatar
Neophytos committed
29
  source=("http://us.download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
30
  md5sums=('780561a808dffbfc74be84547733f30f')
31 32 33
fi

source[1]="dkms.conf"
34
md5sums[1]='d75545122b9edb649ca0d9e4bd42b92c'
35 36

build() {
Neophytos's avatar
Neophytos committed
37 38
   cd $srcdir
   sh ${_pkg}.run --extract-only
39 40
}

Neophytos's avatar
Neophytos committed
41 42 43 44 45 46
package() {
   mkdir -p                                ${pkgdir}/usr/src/${_pkgname}-${pkgver}
   cp -a       ${srcdir}/${_pkg}/kernel/*  ${pkgdir}/usr/src/${_pkgname}-${pkgver}
   cp          ${srcdir}/dkms.conf         ${pkgdir}/usr/src/${_pkgname}-${pkgver}
   install -d -m755 $pkgdir/etc/modprobe.d
   echo "blacklist nouveau" >> $pkgdir/etc/modprobe.d/nouveau_blacklist.conf
47
   sed -i -e "s:^\(.*nvidia -v\) \(2.*\)\$:\1 '${pkgver}':g" "${startdir}/nvidia.install"
48
}