updated on Wed Jan 11 20:01:35 UTC 2012
[aur-mirror.git] / nvidia-ck / PKGBUILD
blobe1be61b8a24133947cc314b09c370a38446262f3
1 # Maintainer: graysky <graysky AT archlnux.us>
2 # Contributor: A.J. Korf <jacobkorf at gmail dot com>
3 # Contrubutor: Thomas Baechler <thomas@archlinux.org>
5 pkgname=nvidia-ck
6 pkgver=290.10
7 _extramodules=extramodules-3.2-ck
8 _kernver="$(cat /lib/modules/${_extramodules}/version)"
9 pkgrel=2
10 _pkgdesc="nVidia drivers for linux-ck."
11 pkgdesc="$_pkgdesc"
12 arch=('i686' 'x86_64')
13 url="http://www.nvidia.com/"
14 depends=('linux-ck>=3.2' 'linux-ck<3.3' "nvidia-utils=${pkgver}")
15 makedepends=('linux-ck-headers>=3.2' 'linux-ck-headers<3.3')
16 conflicts=('nvidia-96xx-all' 'nvidia-173xx-all' 'nvidia-ck-stable' 'nvidia-beta-ck')
17 #groups=('ck-generic')
18 #replaces=()
19 license=('custom')
20 options=(!strip)
21 install=nvidia-ck.install
23 if [ "$CARCH" = "i686" ]; then
24         _arch='x86'
25         _pkg="NVIDIA-Linux-${_arch}-${pkgver}"
26         source=("http://us.download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
27   md5sums=('50319a4b3818c12c9c7243525e0e6316')  
28 elif [ "$CARCH" = "x86_64" ]; then
29         _arch='x86_64'
30         _pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32"
31         source=("http://us.download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
32         md5sums=('cebfba9a7e91716a06c66bb5b38d9661')
35 build() {
36         cd "${srcdir}"
37         sh ${_pkg}.run --extract-only
38         cd ${_pkg}/kernel
39         make SYSSRC=/lib/modules/"${_kernver}/build" module
42 package() {
43         install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
44                 "${pkgdir}/lib/modules/${_extramodules}/nvidia.ko"
45         install -d -m755 "${pkgdir}/etc/modprobe.d"
46         echo "blacklist nouveau" >> "${pkgdir}/etc/modprobe.d/nouveau_blacklist_ck.conf"
47         sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia-ck.install"
48         gzip "${pkgdir}/lib/modules/${_extramodules}/nvidia.ko"