core/nvidia-bumblebee/PKGBUILD
2013-08-22 23:22:45 +02:00

48 lines
1.7 KiB
Bash

# Platform Packages for Chakra, part of chakra-project.org
#
# Maintainer: Neophytos Kolokotronis <tetris4@gmail.com>
# Contributions from AUR: https://aur.archlinux.org/packages/nvidia-bumblebee/
_extramodules=extramodules-3.10-CHAKRA
_kver=$(cat /lib/modules/${_extramodules}/version)
pkgname=nvidia-bumblebee
pkgver=319.32
pkgrel=2
_extramodules='extramodules-3.9-CHAKRA'
pkgdesc="NVIDIA drivers for linux. Packaged for Bumblebee"
arch=('x86_64')
url="http://www.nvidia.com/"
depends=('linux>3.10' 'linux<3.11' "nvidia-utils-bumblebee")
provides=("nvidia=${pkgver}")
makedepends=('linux-headers>3.10' 'linux-headers<3.11')
conflicts=('nvidia' 'nvidia-96xx' 'nvidia-173xx' 'nvidia-304xx' 'dkms-nvidia')
license=('custom')
install=nvidia.install
options=(!strip)
_ARCH='x86_64'
_pkg="NVIDIA-Linux-${_ARCH}-${pkgver}-no-compat32"
source=("ftp://download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run"
'nvidia-linux-3.10.patch')
md5sums=('d181d856768868823df3bda4607a5315'
'8323dcba90576dcae67c42d6ea94704e')
build() {
cd "${srcdir}"
sh "${_pkg}.run" --extract-only
cd "${_pkg}/kernel"
patch -Np3 -i ${srcdir}/nvidia-linux-3.10.patch
make SYSSRC=/lib/modules/"${_kver}/build" module
}
package() {
install -D -m644 "${srcdir}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32/kernel/nvidia.ko" \
"${pkgdir}/lib/modules/${_extramodules}/nvidia.ko"
install -d -m755 "${pkgdir}/lib/modprobe.d"
echo "blacklist nouveau" >> "${pkgdir}/lib/modprobe.d/nouveau_blacklist.conf"
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
gzip "${pkgdir}/lib/modules/${_extramodules}/nvidia.ko"
}