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

PKGBUILD.nvidia-utils-ll

By: workdowg on Aug 12th, 2012  |  syntax: None  |  size: 4.15 KB  |  views: 26  |  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: NONE
  3. # Contributor: Thomas Baechler <thomas@archlinux.org>, workdowg <workdowg@gmail.com>
  4. # - Beta - ONLY BUILT ON x86_64!!!!
  5.  
  6. pkgname=nvidia-utils-ll
  7. pkgver=295.71
  8. pkgrel=1
  9. arch=('i686' 'x86_64')
  10. url="http://www.nvidia.com/"
  11. license=('custom')
  12. options=('!strip')
  13.  
  14. if [ "$CARCH" = "i686" ]; then
  15.     _arch='x86'
  16.     _pkg="NVIDIA-Linux-${_arch}-${pkgver}"
  17.     source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
  18.         md5sums=('80731d9e51aa52117330b791d5417624')
  19. elif [ "$CARCH" = "x86_64" ]; then
  20.     _arch='x86_64'
  21.     _pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32"
  22.     source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
  23.     md5sums=('820a6fc65e0eecf8e6f3ae7a0b96fc4f')
  24. fi
  25.  
  26. create_links() {
  27.     # create soname links
  28.     while read -d '' _lib; do
  29.         _soname="$(dirname "${_lib}")/$(readelf -d "${_lib}" | sed -nr 's/.*Library soname: \[(.*)\].*/\1/p')"
  30.         [[ -e "${_soname}" ]] || ln -s "$(basename "${_lib}")" "${_soname}"
  31.         [[ -e "${_soname/.[0-9]*/}" ]] || ln -s "$(basename "${_soname}")" "${_soname/.[0-9]*/}"
  32.     done < <(find "${pkgdir}" -type f -name '*.so*' -print0)
  33. }
  34.  
  35. build() {
  36.     cd "${srcdir}"
  37.     sh "${_pkg}.run" --extract-only
  38. }
  39.  
  40. package() {
  41.     pkgdesc="NVIDIA drivers utilities and libraries (long-lived branch)"
  42.     depends=('xorg-server' 'libxvmc')
  43.     optdepends=('gtk2: nvidia-settings' 'pkg-config: nvidia-xconfig'
  44.                 'opencl-nvidia: OpenCL support')
  45.     conflicts=('libgl' 'nvidia-utils')
  46.     provides=('libgl' 'nvidia-utils')
  47.     cd "${srcdir}/${_pkg}"
  48.  
  49.     # X driver
  50.     install -D -m755 nvidia_drv.so "${pkgdir}/usr/lib/xorg/modules/drivers/nvidia_drv.so"
  51.     # GLX extension module for X
  52.     install -D -m755 "libglx.so.${pkgver}" "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so.${pkgver}"
  53.     ln -s "libglx.so.${pkgver}" "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so"   # X doesn't find glx otherwise
  54.     # OpenGL library
  55.     install -D -m755 "libGL.so.${pkgver}" "${pkgdir}/usr/lib/libGL.so.${pkgver}"
  56.     # OpenGL core library
  57.     install -D -m755 "libnvidia-glcore.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-glcore.so.${pkgver}"
  58.     # XvMC
  59.     install -D -m644 libXvMCNVIDIA.a "${pkgdir}/usr/lib/libXvMCNVIDIA.a"
  60.     install -D -m755 "libXvMCNVIDIA.so.${pkgver}" "${pkgdir}/usr/lib/libXvMCNVIDIA.so.${pkgver}"
  61.     # VDPAU
  62.     install -D -m755 "libvdpau_nvidia.so.${pkgver}" "${pkgdir}/usr/lib/vdpau/libvdpau_nvidia.so.${pkgver}"
  63.     # nvidia-tls library
  64.     install -D -m755 "tls/libnvidia-tls.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-tls.so.${pkgver}"
  65.     install -D -m755 "libnvidia-cfg.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-cfg.so.${pkgver}"
  66.  
  67.     install -D -m755 "libnvidia-ml.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-ml.so.${pkgver}"
  68.  
  69.     # nvidia-xconfig
  70.     install -D -m755 nvidia-xconfig "${pkgdir}/usr/bin/nvidia-xconfig"
  71.     install -D -m644 nvidia-xconfig.1.gz "${pkgdir}/usr/share/man/man1/nvidia-xconfig.1.gz"
  72.     # nvidia-settings
  73.     install -D -m755 nvidia-settings "${pkgdir}/usr/bin/nvidia-settings"
  74.     install -D -m644 nvidia-settings.1.gz "${pkgdir}/usr/share/man/man1/nvidia-settings.1.gz"
  75.     install -D -m644 nvidia-settings.desktop "${pkgdir}/usr/share/applications/nvidia-settings.desktop"
  76.     install -D -m644 nvidia-settings.png "${pkgdir}/usr/share/pixmaps/nvidia-settings.png"
  77.     sed -e 's:__UTILS_PATH__:/usr/bin:' -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' -i "${pkgdir}/usr/share/applications/nvidia-settings.desktop"
  78.     # nvidia-bug-report
  79.     install -D -m755 nvidia-bug-report.sh "${pkgdir}/usr/bin/nvidia-bug-report.sh"
  80.     # nvidia-smi
  81.     install -D -m755 nvidia-smi "${pkgdir}/usr/bin/nvidia-smi"
  82.     install -D -m644 nvidia-smi.1.gz "${pkgdir}/usr/share/man/man1/nvidia-smi.1.gz"
  83.  
  84.  
  85.     install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/nvidia/LICENSE"
  86.     ln -s nvidia "${pkgdir}/usr/share/licenses/nvidia-utils"
  87.     install -D -m644 README.txt "${pkgdir}/usr/share/doc/nvidia/README"
  88.     install -D -m644 NVIDIA_Changelog "${pkgdir}/usr/share/doc/nvidia/NVIDIA_Changelog"
  89.     ln -s nvidia "${pkgdir}/usr/share/doc/nvidia-utils"
  90.  
  91.     create_links
  92. }
clone this paste RAW Paste Data