PKGBUILD 1.45 KB
Newer Older
1 2
# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>

3 4
_extramodules=extramodules-3.14-CHAKRA-LTS
_kver="$(cat /lib/modules/${_extramodules}/version)"
5
_kernelver=3.14.66
6

Xuetian Weng's avatar
Xuetian Weng committed
7
pkgname=nvidia-340xx-lts
8
pkgver=340.96
AlmAck's avatar
AlmAck committed
9
pkgrel=1
10 11 12 13 14
pkgdesc="NVIDIA drivers for linux."
arch=('x86_64')
url="http://www.nvidia.com/"
depends=("linux-lts=${_kernelver}"  "nvidia-340xx-utils=${pkgver}")
makedepends=("linux-lts-headers=${_kernelver}")
15
conflicts=('nvidia-304xx-lts' 'nvidia-lts')
16 17
license=('custom')
install=nvidia.install
18 19
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
source=("ftp://download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_pkg}.run")
20
md5sums=('7bdbcee13bade63227933d9217571882')
21

22
prepare() {
23
    sh "${_pkg}.run" --extract-only
24 25 26 27
    cd "${_pkg}"
}

build() {
28 29
    cd "${_pkg}/kernel"
    make SYSSRC=/usr/lib/modules/"${_kver}/build" module
30 31 32

    cd uvm
    make SYSSRC=/usr/lib/modules/"${_kver}/build" module
33 34 35 36 37
}

package() {
    install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
        "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
38 39 40 41 42
    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"
    echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nouveau_blacklist.conf"
43 44
    sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
}