PKGBUILD 1.6 KB
Newer Older
Phil's avatar
Phil committed
1 2 3 4 5 6
#
# Chakra Packages for Chakra, part of chakra-project.org
#
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>

Phil's avatar
Phil committed
7 8 9
# Find the kernel name inside the chroot
_extramodules=extramodules-`pacman -Q linux-lts | cut -c11-13 | sed 's/linux-lts //g'`-CHAKRA-LTS
_kver="$(cat /lib/modules/${_extramodules}/version)"
Phil's avatar
Phil committed
10 11

pkgname=nvidia-96xx-lts
Phil's avatar
Phil committed
12
pkgver=96.43.20
13
pkgrel=3
Phil's avatar
Phil committed
14 15 16 17 18
pkgdesc="NVIDIA drivers for kernel26, 96xx branch."
arch=('i686' 'x86_64')
[ "$CARCH" = "i686"   ] && ARCH=x86
[ "$CARCH" = "x86_64" ] && ARCH=x86_64
url="http://www.nvidia.com/"
Phil's avatar
Phil committed
19 20
depends=('linux-lts>=3.0' 'linux-lts<3.1' 'nvidia-96xx-utils')
makedepends=('linux-lts-headers')
Phil's avatar
Phil committed
21 22 23 24
conflicts=('nvidia-lts' 'nvidia-173xx-lts')
license=('custom')
install=nvidia.install
source=("http://download.nvidia.com/XFree86/Linux-$ARCH/${pkgver}/NVIDIA-Linux-$ARCH-${pkgver}-pkg0.run")
Phil's avatar
Phil committed
25
md5sums=('875cc011385ea26ab5edd54a9b65a003')
Manuel's avatar
Manuel committed
26
[ "$CARCH" = "x86_64" ] && md5sums=('df3c87005487bdf54a6c5b783ff373db')
Phil's avatar
Phil committed
27 28

build() {
Phil's avatar
Phil committed
29 30 31 32 33
    sh "NVIDIA-Linux-$ARCH-${pkgver}-pkg0.run" --extract-only
    cd "NVIDIA-Linux-$ARCH-${pkgver}-pkg0/usr/src/nv/"
    ln -s Makefile.kbuild Makefile
    make SYSSRC=/lib/modules/${_kver}/build module 
}
Phil's avatar
Phil committed
34

Phil's avatar
Phil committed
35 36 37 38 39 40 41
package() {
    cd "NVIDIA-Linux-$ARCH-${pkgver}-pkg0/usr/src/nv/"
    mkdir -p $pkgdir//lib/modules/${_extramodules}
    install -m644 nvidia.ko $pkgdir/lib/modules/${_extramodules}
    install -d -m755 "${pkgdir}/etc/modprobe.d"
    sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
    gzip "${pkgdir}/lib/modules/${_extramodules}/nvidia.ko"
Phil's avatar
Phil committed
42
}