Want more features on Pastebin? Sign Up, it's FREE!
Guest

nvidia-275xx - kernel 3.3 ArchLinux PKGBUILD

By: vasyabelkin on Apr 9th, 2012  |  syntax: Bash  |  size: 1.75 KB  |  views: 68  |  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 : Thomas Baechler <thomas@archlinux.org>
  3.  
  4. pkgname=nvidia-275xx
  5. pkgver=275.43
  6. _extramodules=extramodules-3.3-ARCH
  7. _kernver="$(cat /lib/modules/${_extramodules}/version)"
  8. pkgrel=4
  9. pkgdesc="NVIDIA 275-xx drivers for linux."
  10. arch=('i686' 'x86_64')
  11. url="http://www.nvidia.com/"
  12. depends=('linux<3.4' 'linux>=3.3' "nvidia-utils-275xx=${pkgver}")
  13. makedepends=('linux-headers<3.4' 'linux-headers>=3.3')
  14. conflicts=('nvidia-96xx' 'nvidia-173xx' 'nvidia')
  15. license=('custom')
  16. install=nvidia.install
  17. options=(!strip)
  18.  
  19. if [ "$CARCH" = "i686" ]; then
  20.     _arch='x86'
  21.     _pkg="NVIDIA-Linux-${_arch}-${pkgver}"
  22.     source=("http://us.download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
  23.     md5sums=('aba5889666208d6b69aa6b27ff608842')
  24. elif [ "$CARCH" = "x86_64" ]; then
  25.     _arch='x86_64'
  26.     _pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32"
  27.     source=("http://us.download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
  28.     md5sums=('5a80b13f0e92e33367d49866f6377dc1')
  29. fi
  30.  
  31. build() {
  32.     cd "${srcdir}"
  33.     sh "${_pkg}.run" --extract-only
  34.     cd "${_pkg}/kernel"
  35.     sed -i  's/CFLAGS="$CFLAGS -I$SOURCES\/arch\/x86\/include"/CFLAGS="$CFLAGS -I$SOURCES\/arch\/x86\/include -I$SOURCES\/arch\/x86\/include\/generated"/' conftest.sh
  36.     make SYSSRC=/lib/modules/"${_kernver}/build" module
  37. }
  38.  
  39. package() {
  40.     install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
  41.         "${pkgdir}/lib/modules/${_extramodules}/nvidia.ko"
  42.     install -d -m755 "${pkgdir}/etc/modprobe.d"
  43.     echo "blacklist nouveau" >> "${pkgdir}/etc/modprobe.d/nouveau_blacklist.conf"
  44.     sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
  45.     gzip "${pkgdir}/lib/modules/${_extramodules}/nvidia.ko"
  46. }
clone this paste RAW Paste Data