This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

PKGBUILD

By: a guest on Feb 12th, 2013  |  syntax: None  |  size: 1.91 KB  |  views: 60  |  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. # $Id$
  2. # Maintainer : Youpi <max.flocard@gmail.com>
  3. # Contributor : Thomas Baechler <thomas@archlinux.org>
  4.  
  5. pkgname=nvidia-bumblebee
  6. pkgver=313.18
  7. _extramodules=extramodules-`uname -r|sed 's/\.[0-9]*\-.\-/\-/g'`
  8. pkgrel=2
  9. pkgdesc="NVIDIA drivers for linux. Packaged for Bumblebee"
  10. arch=('i686' 'x86_64')
  11. url="http://www.nvidia.com/"
  12. depends=('linux>=3.6' 'linux<3.8' "nvidia-utils-bumblebee>310")
  13. provides=("nvidia=${pkgver}")
  14. makedepends=('linux-headers>=3.6' 'linux-headers<3.8')
  15. conflicts=('nvidia' 'nvidia-96xx' 'nvidia-173xx' 'dkms-nvidia')
  16. license=('custom')
  17. install=nvidia.install
  18. options=(!strip)
  19.  
  20. if [ "$CARCH" = "i686" ]; then
  21.     _arch='x86'
  22.     _pkg="NVIDIA-Linux-${_arch}-${pkgver}"
  23.    
  24. source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run" 'unfuck-3.7.6.patch')
  25.     md5sums=('780c37c28a6e06e9571cafe348b7da64' 'a970b8023f52a14929889a4a61a0ee27')
  26. elif [ "$CARCH" = "x86_64" ]; then
  27.     _arch='x86_64'
  28.     _pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32"
  29.     source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run" 'unfuck-3.7.6.patch')
  30.     md5sums=('fa17a260793a38b4b8ae367db2e03b39' 'a970b8023f52a14929889a4a61a0ee27')
  31. fi
  32.  
  33. build() {
  34.     _kernver="$(cat /usr/lib/modules/${_extramodules}/version ||
  35. true)"
  36.     cd "${srcdir}"
  37.     sh "${_pkg}.run" --extract-only
  38.     cd "${_pkg}/kernel"
  39.     patch -Np1 -i "${srcdir}/unfuck-3.7.6.patch"
  40.     make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
  41. }
  42.  
  43. package() {
  44.     install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
  45.         "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
  46.     install -d -m755 "${pkgdir}/usr/lib/modprobe.d"
  47.     echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nouveau_blacklist.conf"
  48.     sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
  49.     gzip "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
  50. }
clone this paste RAW Paste Data