PKGBUILD 1.18 KB
Newer Older
Neophytos's avatar
Neophytos committed
1 2 3
# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>

# Find the kernel name inside the chroot
AlmAck's avatar
AlmAck committed
4 5
_extramodules=extramodules-3.2-lts
_kver="$(cat /lib/modules/${_extramodules}/version)"
Neophytos's avatar
Neophytos committed
6 7 8

pkgname=nvidia-304xx-lts
pkgver=304.117
AlmAck's avatar
AlmAck committed
9
pkgrel=2
Neophytos's avatar
Neophytos committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
pkgdesc="NVIDIA drivers for linux."
arch=('x86_64')
url="http://www.nvidia.com/"
depends=('linux-lts>=3.2' 'linux-lts<3.4' "nvidia-304xx-utils=${pkgver}")
makedepends=('linux-lts-headers')
conflicts=('nvidia-96xx-lts' 'nvidia-173xx-lts' 'nvidia-lts')
license=('custom')
install=nvidia.install
_pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32"
source=("http://us.download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
md5sums=('8ee9f672028971c6d36118894d0e2c59')

build() {
    cd "${srcdir}"
    sh "${_pkg}.run" --extract-only
    cd "${_pkg}/kernel"
    make SYSSRC=/lib/modules/"${_kver}/build" module
}

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