updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / nvidia-256 / PKGBUILD
blob447ade7e4112e551a4f61c97f87703907c54c5be
1 # Syco <SycoLTH at gmail dot com>
3 pkgname=nvidia-256
4 pkgver=256.53
5 pkgrel=3
6 pkgdesc="NVIDIA drivers for kernel26."
7 arch=('i686' 'x86_64')
8 url="http://www.nvidia.com/"
9 depends=('kernel26>=2.6.36' 'kernel26<2.6.37' "nvidia-utils=${pkgver}")
10 makedepends=('kernel26-headers>=2.6.36' 'kernel26-headers<2.6.37')
11 conflicts=('nvidia-96xx' 'nvidia-71xx' 'nvidia-legacy' 'nvidia')
12 provides=("nvidia=${pkgver}")
13 license=('custom')
14 install=nvidia.install
16 _kernver=`uname -r`
18 if [ "$CARCH" = "i686" ]; then
19     _arch='x86'
20     _pkg="NVIDIA-Linux-${_arch}-${pkgver}"
21     source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run" "patch_2.6.36.patch")
22         md5sums=('21fe3fe0afed7818b7adf383477b2155' '291a1b8b954d5b2129102dc23d89c139')
23 elif [ "$CARCH" = "x86_64" ]; then
24     _arch='x86_64'
25     _pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32"
26     source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run" "patch_2.6.36.patch")
27         md5sums=('73f08a19e00d05165cbbfc74e2fa4bdd' '291a1b8b954d5b2129102dc23d89c139')
30 build() {
31     cd ${srcdir}
32     sh ${_pkg}.run --extract-only
33     cd ${_pkg}
34     patch -p0 < $srcdir/patch_2.6.36.patch
35     cd kernel
36     make SYSSRC=/lib/modules/${_kernver}/build module
39 package() {
40     install -D -m644 ${srcdir}/${_pkg}/kernel/nvidia.ko ${pkgdir}/lib/modules/${_kernver}/kernel/drivers/video/nvidia.ko
41     install -d -m755 ${pkgdir}/etc/modprobe.d
42     echo "blacklist nouveau" >> ${pkgdir}/etc/modprobe.d/nouveau_blacklist.conf
43     sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" ${startdir}/nvidia.install