PKGBUILD 1.33 KB
Newer Older
1

Xuetian Weng's avatar
Xuetian Weng committed
2
pkgname=nvidia-340xx-lts
Luca Giambonini's avatar
Luca Giambonini committed
3
pkgver=340.106
Luca Giambonini's avatar
Luca Giambonini committed
4
pkgrel=3
5 6 7
pkgdesc="NVIDIA drivers for linux."
arch=('x86_64')
url="http://www.nvidia.com/"
8
depends=("linux-lts=4.4.147"  "nvidia-340xx-utils=${pkgver}")
Luca Giambonini's avatar
Luca Giambonini committed
9
makedepends=("linux-lts-headers=4.4.147")
10
conflicts=('nvidia-304xx-lts' 'nvidia-lts')
11
license=('custom')
12 13
_extramodules=extramodules-CHAKRA-LTS

14
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
Chaoting Liu's avatar
Chaoting Liu committed
15
source=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_pkg}.run")
Luca Giambonini's avatar
Luca Giambonini committed
16
md5sums=('37c84428b64696be2b104edbc9855f57')
17

18
prepare() {
19
    sh "${_pkg}.run" --extract-only
20 21 22
    cd "${_pkg}"
}

23 24 25 26
build() {    
    KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
    msg2 "Kernel = $KERNEL_VERSION"
    
27
    cd "${_pkg}/kernel"
28 29
    make SYSSRC=/usr/lib/modules/$KERNEL_VERSION/build module
    
30
    cd uvm
31
    make SYSSRC=/usr/lib/modules/$KERNEL_VERSION/build module
32 33 34 35 36
}

package() {
    install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
        "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
37 38 39 40
    install -D -m644 "${srcdir}/${_pkg}/kernel/uvm/nvidia-uvm.ko" \
        "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-uvm.ko"
    gzip "${pkgdir}/usr/lib/modules/${_extramodules}/"*.ko
    install -d -m755 "${pkgdir}/usr/lib/modprobe.d"
41 42
    echo "blacklist nouveau" |
      install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf"
43
}