updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / nvidia-173xx-ck / PKGBUILD
blob0192862a00bd237e6a82b4cc3bdcf64e42e8a6b8
1 # Contributor : Ferenc-Lorant Kiss <kfl62g@gmail.com>
3 pkgname=nvidia-173xx-ck
4 pkgver=173.14.31
5 _kernver='3.0-ck'
6 pkgrel=2
7 pkgdesc="NVIDIA drivers for linux-ck, 173xx branch."
8 arch=('i686' 'x86_64')
9 [ "$CARCH" = "i686"   ] && ARCH=x86
10 [ "$CARCH" = "x86_64" ] && ARCH=x86_64
11 url="http://www.nvidia.com/"
12 depends=('linux>=3.0' 'linux<3.1' 'nvidia-173xx-utils')
13 makedepends=('linux-headers>=3.0' 'linux-headers<3.1')
14 conflicts=('nvidia-96xx' 'nvidia')
15 license=('custom')
16 install=nvidia.install
17 source=("http://download.nvidia.com/XFree86/Linux-$ARCH/${pkgver}/NVIDIA-Linux-$ARCH-${pkgver}-pkg0.run")
18 options=(!strip)
19 md5sums=('01cd3b91196cd4495f56c34494f310b5')
20 [ "$CARCH" = "x86_64" ] && md5sums=('d53e8faf8ac90ad98b8998f25f121535')
22 build() {
23         cd $srcdir
24         sh NVIDIA-Linux-$ARCH-${pkgver}-pkg0.run --extract-only
25         cd NVIDIA-Linux-$ARCH-${pkgver}-pkg0
26         cd usr/src/nv/
27         ln -s Makefile.kbuild Makefile
28         make SYSSRC=/lib/modules/${_kernver}/build module
31 package() {
32         cd $srcdir/NVIDIA-Linux-$ARCH-${pkgver}-pkg0/usr/src/nv/
33         mkdir -p $pkgdir/lib/modules/${_kernver}/kernel/drivers/video/
34         install -m644 nvidia.ko $pkgdir/lib/modules/${_kernver}/kernel/drivers/video/
35         mkdir -p $pkgdir/etc/modprobe.d
36         echo "blacklist nouveau" >> $pkgdir/etc/modprobe.d/nouveau_blacklist.conf
37         sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/nvidia.install
38         # gzip -9 module
39         gzip "${pkgdir}/lib/modules/${_kernver}/kernel/drivers/video/nvidia.ko"