1 # Maintainer: Mikael Eriksson <mikael_eriksson@miffe.org>
2 # Original arch package by:
3 # Thomas Baechler <thomas@archlinux.org>
5 pkgname=nvidia-mainline
9 pkgdesc="NVIDIA drivers for linux-mainline."
10 read _ _kernver < <(file -b "/boot/vmlinuz-linux-mainline" | grep -o 'version [^ ]\+')
11 _kernpkgver=$(pacman -Q linux-mainline|cut -d' ' -f 2)
12 _extramodules=$_kernver/extramodules
13 arch=('i686' 'x86_64')
14 url="http://www.nvidia.com/"
15 depends=('linux-mainline' "nvidia-utils=${pkgver}")
16 conflicts=('nvidia-96xx' 'nvidia-173xx')
18 install=nvidia.install
21 if [ "$CARCH" = "i686" ]; then
23 _pkg="NVIDIA-Linux-${_arch}-${pkgver}"
24 source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
25 md5sums=('50319a4b3818c12c9c7243525e0e6316')
26 elif [ "$CARCH" = "x86_64" ]; then
28 _pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32"
29 source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
30 md5sums=('cebfba9a7e91716a06c66bb5b38d9661')
34 msg "Building for kernel version $_kernver"
36 sh "${_pkg}.run" --extract-only
38 make SYSSRC=/lib/modules/"${_kernver}/build" module
42 install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
43 "${pkgdir}/lib/modules/${_extramodules}/nvidia.ko"
44 install -d -m755 "${pkgdir}/etc/modprobe.d"
45 #echo "blacklist nouveau" >> "${pkgdir}/etc/modprobe.d/nouveau_blacklist.conf"
46 sed -i -e "s,EXTRAMODULES='.*',EXTRAMODULES='${_extramodules}'," "${startdir}/nvidia.install"
47 gzip "${pkgdir}/lib/modules/${_extramodules}/nvidia.ko"
48 eval pkgrel="${pkgrel}_${_kernpkgver/-/_}"