PKGBUILD 1.27 KB
Newer Older
Phil's avatar
Phil committed
1 2 3
#
# Chakra Packages for Chakra, part of chakra-project.org
#
4
# maintainer abveritas@chakra-project.org
Phil's avatar
Phil committed
5

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

pkgname=nvidia-lts
abveritas's avatar
abveritas committed
11
pkgver=313.18
12
pkgrel=2
Phil's avatar
Phil committed
13
pkgdesc="NVIDIA drivers for linux."
14
arch=('x86_64')
Phil's avatar
Phil committed
15
url="http://www.nvidia.com/"
16
depends=('linux-lts>=3.0' 'linux-lts<3.1' "nvidia-utils=${pkgver}")
Phil's avatar
Phil committed
17
makedepends=('linux-lts-headers')
Phil's avatar
Phil committed
18 19 20 21
conflicts=('nvidia-96xx-lts' 'nvidia-173xx-lts')
license=('custom')
install=nvidia.install

Phil's avatar
Phil committed
22 23
    _ARCH='x86_64'
    _pkg="NVIDIA-Linux-${_ARCH}-${pkgver}-no-compat32"
Anke's avatar
Anke committed
24
    source=("http://us.download.nvidia.com/XFree86/Linux-${_ARCH}/${pkgver}/${_pkg}.run")
abveritas's avatar
abveritas committed
25
    md5sums=('fa17a260793a38b4b8ae367db2e03b39')
Phil's avatar
Phil committed
26 27

build() {
Phil's avatar
Phil committed
28 29 30 31
    cd "${srcdir}"
    sh "${_pkg}.run" --extract-only
    cd "${_pkg}/kernel"
    make SYSSRC=/lib/modules/"${_kver}/build" module
Phil's avatar
Phil committed
32 33 34
}

package() {
Phil's avatar
Phil committed
35 36 37 38 39
    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"
Phil's avatar
Phil committed
40
}