SHARE
TWEET

nvidia-zen for Arch Linux

a guest Jan 27th, 2017 233 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #  Maintainer: sudokode <sudokode@gmail.com>
  2. # Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
  3. # Contributor: Felix Yan <felixonmars@archlinux.org>
  4. # Contributor: Thomas Baechler <thomas@archlinux.org>
  5.  
  6. #pkgbase=nvidia-zen
  7. pkgname=nvidia-zen
  8. pkgver=375.26
  9. _extramodules=extramodules-4.8-zen
  10. pkgrel=1
  11. pkgdesc="NVIDIA drivers for linux-zen"
  12. arch=('i686' 'x86_64')
  13. url="http://www.nvidia.com/"
  14. depends=('linux-zen>=4.8' 'linux-zen<4.9' 'libgl' "nvidia-utils=${pkgver}")
  15. makedepends=('nvidia-libgl' 'linux-zen-headers>=4.8' 'linux-zen-headers<4.9')
  16. license=('custom')
  17. install=readme.install
  18. options=('!strip')
  19. source_i686=("http://us.download.nvidia.com/XFree86/Linux-x86/${pkgver}/NVIDIA-Linux-x86-${pkgver}.run")
  20. source_x86_64=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run")
  21. sha512sums_i686=('4a18d7df8dabea9da52a5996b6e820f618e6417449b4e329c886d05465b25adb39ae3bd77b2852c93a7338fab2d398f6705bddde315c7373e313f242dc1113ab')
  22. sha512sums_x86_64=('f52f6597daa1eaf4cbd934d785da6028ef23ecef98e14746143e3738504f8d65b73788abbcf9fd812317fc2c53cdf1c4d4839de57fafdea1930a08c6b21f1992')
  23.  
  24. [[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
  25. [[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
  26.  
  27. prepare() {
  28.     sh "${_pkg}.run" --extract-only
  29. }
  30.  
  31. build() {
  32.     _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
  33.     cd "${_pkg}"/kernel
  34.     make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
  35. }
  36.  
  37. package() {
  38.     install -Dm644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
  39.         "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
  40.     install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-modeset.ko" \
  41.         "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-modeset.ko"
  42.     install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-drm.ko" \
  43.     "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-drm.ko"
  44.  
  45.     if [[ "$CARCH" = "x86_64" ]]; then
  46.         install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-uvm.ko" \
  47.             "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-uvm.ko"
  48.     fi
  49.  
  50.     gzip -9 "${pkgdir}/usr/lib/modules/${_extramodules}/"*.ko
  51.     install -dm755 "${pkgdir}/usr/lib/modprobe.d"
  52.  
  53.     echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nvidia-zen.conf"
  54. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top