updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / nvidia-lts-ccs / PKGBUILD
blob1472e13026d3f6f875e9ca06b3ce9f7572b49c19
1 # Maintainer: Jamie Nguyen <jamie tomoyolinux co uk
2 # Contributer: Eric BĂ©langer <eric@archlinux.org>
4 pkgname=nvidia-lts-ccs
5 pkgver=270.41.06
6 _kernver='2.6.32-lts-ccs'
7 pkgrel=1
8 pkgdesc="NVIDIA drivers for kernel26-lts-ccs"
9 arch=('i686' 'x86_64')
10 url="http://www.nvidia.com/"
11 depends=('kernel26-lts-ccs>=2.6.32' 'kernel26-lts-ccs<2.6.33' "nvidia-utils=${pkgver}")
12 makedepends=('kernel26-lts-ccs-headers>=2.6.32' 'kernel26-lts-ccs-headers<2.6.33')
13 provides=('nvidia')
14 license=('custom')
15 install=${pkgname}.install
16 options=(!strip)
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")
22     md5sums=('702868c77b13bba46f0fce26ed7a1fb7')
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")
27     md5sums=('d62243b91d0dc8f2c4b2ab646b72ca65')
30 build() {
31     cd "${srcdir}"
32     sh ${_pkg}.run --extract-only
33     cd ${_pkg}/kernel
34     make -j 1 SYSSRC=/lib/modules/${_kernver}/build module
37 package() {
38     install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
39         "${pkgdir}/lib/modules/${_kernver}/kernel/drivers/video/nvidia.ko"
40     install -d -m755 "${pkgdir}/etc/modprobe.d"
41     echo "blacklist nouveau" >> "${pkgdir}/etc/modprobe.d/nouveau_blacklist-lts-ccs.conf"
42     sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" \
43         "${startdir}/${pkgname}.install"
44     # gzip -9 all modules to safe 100MB of space
45     find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
46     install -D -m644 "${srcdir}/${_pkg}/LICENSE" \
47         "${pkgdir}/usr/share/licenses/nvidia-lts-ccs/LICENSE"