pkgbuilds/nvidia-drd/PKGBUILD

47 lines
1.7 KiB
Bash

# $Id: PKGBUILD 223956 2014-10-07 06:17:15Z tpowa $
# Maintainer : Thomas Baechler <thomas@archlinux.org>
pkgname=nvidia-drd
pkgver=343.22
_extramodules=extramodules-3.17-drd
pkgrel=4
pkgdesc="NVIDIA drivers for linux"
arch=('i686' 'x86_64')
url="http://www.nvidia.com/"
depends=('linux-drd>=3.17' 'linux-drd<3.18' "nvidia-libgl" "nvidia-utils=${pkgver}")
makedepends=('linux-drd-headers>=3.17' 'linux-drd-headers<3.18')
license=('custom')
install=nvidia.install
options=(!strip)
source=("ftp://download.nvidia.com/XFree86/Linux-x86/${pkgver}/NVIDIA-Linux-x86-${pkgver}.run"
"ftp://download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run")
md5sums=('696d0bfa7195e22e0c4bd858fff2abb6'
'3d98eaa01a94e86abb04723ae2a702b1')
[[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
[[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
prepare() {
sh "${_pkg}.run" --extract-only
cd "${_pkg}"
# patches here
}
build() {
_kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
cd "${_pkg}"/kernel
make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
cd uvm
make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
}
package() {
install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
"${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
install -D -m644 "${srcdir}/${_pkg}/kernel/uvm/nvidia-uvm.ko" \
"${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-uvm.ko"
gzip "${pkgdir}/usr/lib/modules/${_extramodules}/"*.ko
install -d -m755 "${pkgdir}/usr/lib/modprobe.d"
echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nvidia-drd.conf"
}