PKGBUILD 1.3 KB
Newer Older
Neophytos's avatar
Neophytos committed
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
Neophytos's avatar
Neophytos committed
6 7

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

22
prepare() {
Neophytos's avatar
Neophytos committed
23
    cd "${srcdir}"
24
    sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
Neophytos's avatar
Neophytos committed
25
    sh "${_pkg}.run" --extract-only
26 27 28 29
    cd "${_pkg}"
}

build() {
Neophytos's avatar
Neophytos committed
30
    cd "${_pkg}/kernel"
31
    make SYSSRC=/usr/lib/modules/"${_kver}/build" module
Neophytos's avatar
Neophytos committed
32 33 34 35
}

package() {
    install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
36
        "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
Neophytos's avatar
Neophytos committed
37 38
    install -d -m755 "${pkgdir}/etc/modprobe.d"
    sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
39
    gzip "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
Neophytos's avatar
Neophytos committed
40
}