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 May 6th, 2012  |  syntax: None  |  size: 1.65 KB  |  views: 58  |  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 : Samsagax <samsagax@gmail.com>
  3. # Contributor : Thomas Baechler <thomas@archlinux.org>
  4.  
  5. pkgname=nvidia-bumblebee
  6. pkgver=295.49
  7. _extramodules=extramodules-3.3-ARCH
  8. pkgrel=0
  9. pkgdesc="NVIDIA drivers for linux. Packaged for Bumblebee"
  10. arch=('i686' 'x86_64')
  11. url="http://www.nvidia.com/"
  12. depends=('linux' "nvidia-utils-bumblebee=${pkgver}")
  13. provides=("nvidia=${pkgver}")
  14. makedepends=('linux-headers')
  15. conflicts=('nvidia' 'nvidia-96xx' 'nvidia-173xx')
  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.     source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
  24.     md5sums=('fd998f870d20b30b8d636ffce79d9e6c')
  25. elif [ "$CARCH" = "x86_64" ]; then
  26.     _arch='x86_64'
  27.    _pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32"
  28.     source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
  29.     md5sums=('84b92aa6eec13a38e8748264138acc56')
  30. fi
  31.  
  32. build() {
  33.     _kernver="$(cat /lib/modules/${_extramodules}/version || true)"
  34.     cd "${srcdir}"
  35.     sh "${_pkg}.run" --extract-only
  36.     cd "${_pkg}/kernel"
  37.     make SYSSRC=/lib/modules/"${_kernver}/build" module
  38. }
  39.  
  40. package() {
  41.     install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
  42.         "${pkgdir}/lib/modules/${_extramodules}/nvidia.ko"
  43.     install -d -m755 "${pkgdir}/usr/lib/modprobe.d"
  44.     echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nouveau_blacklist.conf"
  45.     sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
  46.     gzip "${pkgdir}/lib/modules/${_extramodules}/nvidia.ko"
  47. }
clone this paste RAW Paste Data