PKGBUILD 1.33 KB
Newer Older
Xuetian Weng's avatar
Xuetian Weng committed
1 2

pkgname=nvidia-390xx-lts
AlmAck's avatar
AlmAck committed
3
pkgver=390.77
AlmAck's avatar
AlmAck committed
4
pkgrel=2
Xuetian Weng's avatar
Xuetian Weng committed
5 6 7
pkgdesc="NVIDIA drivers for linux-lts, 390xx legacy branch"
arch=('x86_64')
url="http://www.nvidia.com/"
AlmAck's avatar
AlmAck committed
8 9
depends=("linux-lts=4.4.147"  "nvidia-390xx-utils=${pkgver}")
makedepends=("linux-lts-headers=4.4.147")
Xuetian Weng's avatar
Xuetian Weng committed
10 11 12
conflicts=('nvidia-340xx-lts' 'nvidia-lts')
license=('custom')
options=('!strip')
AlmAck's avatar
AlmAck committed
13
_extramodules=extramodules-CHAKRA-LTS
Xuetian Weng's avatar
Xuetian Weng committed
14 15 16 17 18 19 20 21 22 23 24
source=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run")
sha512sums=('65b92ec7f9488a98a8579efcf5b00aca42945b1d0fd0f58aacebf45c772b0b896af8bbac3abec126a931752ef9504a727fac89220c115ff474c0521f3c214d99')

_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"

prepare() {
    sh "${_pkg}.run" --extract-only
    cd "${_pkg}"
}

build() {
AlmAck's avatar
AlmAck committed
25 26 27
    KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
    msg2 "Kernel = $KERNEL_VERSION"
    
Xuetian Weng's avatar
Xuetian Weng committed
28
    cd "${_pkg}/kernel"
AlmAck's avatar
AlmAck committed
29
    make SYSSRC=/usr/lib/modules/$KERNEL_VERSION/build module
Xuetian Weng's avatar
Xuetian Weng committed
30 31 32 33 34 35 36 37 38 39 40 41 42
}

package() {
    install -Dt "${pkgdir}/usr/lib/modules/${_extramodules}" -m644 \
      "${srcdir}/${_pkg}/kernel"/nvidia{,-modeset,-drm,-uvm}.ko

    find "${pkgdir}" -name '*.ko' -exec gzip -n {} +

    echo "blacklist nouveau" |
      install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf"

    install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 "${srcdir}/${_pkg}/LICENSE"
}