Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

nvidia-pf 337.25

By: a guest on May 31st, 2014  |  syntax: None  |  size: 2.63 KB  |  views: 181  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer : Bjoern Bidar - theodorstormgrade@gmail.com
  2.  
  3. pkgname=nvidia-pf
  4. pkgver=337.25
  5. pkgrel=1
  6. _goodkver=3.14
  7. _badkver=3.15
  8. _modver=${_goodkver}-pf
  9. _extramodules=extramodules-$_modver
  10. _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
  11. _SYSSRC="/usr/lib/modules/$_kernver/build"
  12. _pf_kernel=$(pacman -Qqo /boot/vmlinuz-linux-pf)
  13. #_pf_headers=$(pacman -Qqo ${_SYSSRC})
  14. _cpu=$(sed -e "s/linux-pf//" <<<${_pf_kernel})
  15.  
  16. pkgdesc="NVIDIA drivers for linux-pf."
  17. arch=('i686' 'x86_64')
  18. url="http://www.nvidia.com/"
  19. makedepends=("linux-pf-headers>=${_goodkver}" "linux-pf-headers<${_badkver}")
  20. depends=("linux-pf>=${_goodkver}" "linux-pf<${_badkver}" "nvidia-utils=${pkgver}")
  21.  
  22. if [[ ${_cpu} ]]; then
  23.         true && pkgdesc="NVIDIA drivers for linux-pf${_cpu}."
  24.         true && makedepends=("linux-pf-headers${_cpu}>=${_goodkver}" "linux-pf-headers${_cpu}<${_badkver}")
  25.         true && depends=("linux-pf${_cpu}>=${_goodkver}" "linux-pf${_cpu}<${_badkver}" "nvidia-utils=${pkgver}")
  26. fi
  27. conflicts=( 'nvidia-96xx' 'nvidia-173xx' 'nvidia-pf-core2' 'nvidia-pf-k8'
  28.             'nvidia-pf-atom' 'nvidia-pf-psc' 'nvidia-pf-p4' 'nvidia-pf-p3'
  29.             'nvidia-pf-pm' 'nvidia-pf-k7')
  30. license=('custom')
  31. install=nvidia.install
  32. options=(!strip)
  33.  
  34. source=("ftp://download.nvidia.com/XFree86/Linux-x86/${pkgver}/NVIDIA-Linux-x86-${pkgver}.run"
  35.         "ftp://download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run")
  36. md5sums=('2a217632ced8952e21000a51065f85b8'
  37.          '66e19d6d621c9e70fbd5374dd8b44341')
  38.  
  39. [[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
  40. [[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
  41.  
  42.  
  43. prepare()
  44. {
  45.   cd "${srcdir}"
  46.   [[ -d "${_pkg}" ]] && rm -rf "${_pkg}"
  47.   sh "${_pkg}.run" --extract-only
  48.   cd "${_pkg}"
  49.   # patches here
  50. }
  51.  
  52. build() {
  53.     _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
  54.     cd "${_pkg}"/kernel
  55.     make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
  56.  
  57.     cd uvm
  58.     make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
  59. }
  60.  
  61.  
  62. package() {
  63.   if [[ ${_cpu} ]]; then
  64.     true && pkgname=${pkgname}${_cpu}
  65.     true && conflicts=(${conflicts[@]/nvidia-pf${_cpu}/} 'nvidia-pf')
  66.   fi
  67.   install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
  68.     "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
  69.   install -D -m644 "${srcdir}/${_pkg}/kernel/uvm/nvidia-uvm.ko" \
  70.     "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-uvm.ko"
  71.   gzip "${pkgdir}/usr/lib/modules/${_extramodules}/"*.ko
  72.   install -d -m755 "${pkgdir}/usr/lib/modprobe.d"
  73.   sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
  74. }
clone this paste RAW Paste Data