updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / nvidia-beta-ck / PKGBUILD
blobaf59661f8ac1680530c1600dd99a371c9eb40d2a
1 # Maintainer: Zbynek Novotny <znovotny@gmail.com>
2 # Contributor: graysky <graysky AT archlinux dot us>
3 # Contributor: Dan Vratil <vratil@progdansoft.com>
5 pkgname="nvidia-beta-ck"
6 pkgver=295.09
7 pkgrel=2
8 pkgdesc="NVIDIA beta drivers for linux-ck."
9 arch=('i686' 'x86_64')
10 kernver="3.2"
11 extramods="extramodules-${kernver}-ck"
12 exactkernver="$(cat /lib/modules/${extramods}/version)"
13 [ "$CARCH" = x86_64 ] && ARCH=x86_64 && srcname=NVIDIA-Linux-x86_64-${pkgver}-no-compat32 && md5sums=('d3746ccbfdffed6dc984703c5163a0e9')
14 [ "$CARCH" = "i686" ] && ARCH=x86    && srcname=NVIDIA-Linux-x86-${pkgver}                && md5sums=('cd0a20afd4d891adb884b9ad054fa2b6')
15 provides=("nvidia-beta-ck=${pkgver}")
16 url="http://www.nvidia.com/"
17 depends=("linux-ck>=${kernver}" "nvidia-utils-beta=${pkgver}")
18 makedepends=('linux-ck-headers')
19 conflicts=('nvidia-ck')
20 license=('custom')
21 install=nvidia.install
22 source=("ftp://download.nvidia.com/XFree86/Linux-$ARCH/${pkgver}/${srcname}.run")
24 build()
26         # Extract the nvidia drivers
27         cd "${srcdir}"
28         if [ -d ${srcname} ]; then
29                 rm -rf ${srcname}
30         fi
31         sh ${srcname}.run --extract-only
32         cd ${srcname}/kernel
34         make SYSSRC=/usr/src/linux-${exactkernver} module
37 package() 
39         cd "${srcdir}/${srcname}/kernel"
41     module_path="${pkgdir}/lib/modules/${extramods}/kernel/drivers/video"
43         # Install kernel module
44         mkdir -p "${module_path}"
45         install -m644 nvidia.ko "${module_path}"
47         # Blacklist nouveau since 2.6.34
48     # We have to store the blacklist directive in a unique conffile
49     # whose name does not collide with other packages (e.g. nvidia-beta)
50         mkdir -p "${pkgdir}/etc/modprobe.d/"
51         echo "blacklist nouveau" >> "${pkgdir}/etc/modprobe.d/nouveau_blacklist-ck.conf"
52     gzip "${module_path}/nvidia.ko"