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

Untitled

By: gun26 on Jul 30th, 2011  |  syntax: None  |  size: 2.46 KB  |  views: 104  |  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: PKGBUILD 51860 2011-07-17 15:05:31Z ibiru $
  2. # Maintainer: Thomas Baechler <thomas@archlinux.org>
  3. # Contributor: James Rayner <iphitus@gmail.com>
  4.  
  5. _pkgbasename=nvidia-utils-beta
  6. pkgname=lib32-$_pkgbasename
  7. pkgver=280.11
  8. pkgrel=1
  9. pkgdesc="NVIDIA beta drivers utilities and libraries. (32-bit)"
  10. arch=('x86_64')
  11. url="http://www.nvidia.com/"
  12. depends=('lib32-libxvmc' 'lib32-zlib' 'lib32-gcc-libs' $_pkgbasename)
  13. conflicts=('lib32-libgl')
  14. provides=('lib32-libgl=7.10.3')
  15. license=('custom')
  16. options=('!strip')
  17.  
  18. _arch='x86'
  19. _pkg="NVIDIA-Linux-${_arch}-${pkgver}"
  20. source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
  21. md5sums=('9902f8f920ef9e1abef0d1de981da169')
  22.  
  23. build() {
  24.     cd $srcdir
  25.     sh ${_pkg}.run --extract-only
  26. }
  27.  
  28. package() {
  29.     cd $srcdir/${_pkg}
  30.  
  31.     # OpenGL library
  32.     install -D -m755 libGL.so.$pkgver $pkgdir/usr/lib32/libGL.so.$pkgver
  33.     # OpenGL core library
  34.     install -D -m755 libnvidia-glcore.so.$pkgver $pkgdir/usr/lib32/libnvidia-glcore.so.$pkgver
  35.     # XvMC
  36.     install -D -m644 libXvMCNVIDIA.a $pkgdir/usr/lib32/libXvMCNVIDIA.a
  37.     install -D -m755 libXvMCNVIDIA.so.$pkgver $pkgdir/usr/lib32/libXvMCNVIDIA.so.$pkgver
  38.     # VDPAU
  39.     install -D -m755 libvdpau_nvidia.so.$pkgver $pkgdir/usr/lib32/vdpau/libvdpau_nvidia.so.$pkgver
  40.     # CUDA
  41.     install -D -m755 libcuda.so.$pkgver $pkgdir/usr/lib32/libcuda.so.$pkgver
  42.     install -D -m755 libnvcuvid.so.$pkgver $pkgdir/usr/lib32/libnvcuvid.so.$pkgver
  43.     # nvidia-tls library
  44.     install -D -m755 tls/libnvidia-tls.so.$pkgver $pkgdir/usr/lib32/libnvidia-tls.so.$pkgver
  45.     # OpenCL
  46.     install -D -m755 libnvidia-compiler.so.$pkgver $pkgdir/usr/lib32/libnvidia-compiler.so.$pkgver
  47.     install -D -m755 libOpenCL.so.1.0.0 $pkgdir/usr/lib32/libOpenCL.so.1.0.0
  48.  
  49.     install -D -m755 libnvidia-cfg.so.$pkgver $pkgdir/usr/lib32/libnvidia-cfg.so.$pkgver
  50.     install -D -m755 libnvidia-ml.so.$pkgver $pkgdir/usr/lib32/libnvidia-ml.so.$pkgver
  51.  
  52.     # create soname links
  53.     for _lib in $(find $pkgdir -name '*.so*'); do
  54.         _soname="$(dirname ${_lib})/$(readelf -d "$_lib" | sed -nr 's/.*Library soname: \[(.*)\].*/\1/p')"
  55.         if [ ! -e "${_soname}" ]; then
  56.             ln -s "$(basename ${_lib})" "${_soname}"
  57.             ln -s "$(basename ${_soname})" "${_soname/.[0-9]*/}"
  58.         fi
  59.     done
  60.  
  61.     rm -rf "${pkgdir}"/usr/{include,share,bin}
  62.     mkdir -p "$pkgdir/usr/share/licenses"
  63.     ln -s $_pkgbasename "$pkgdir/usr/share/licenses/$pkgname"
  64. }
clone this paste RAW Paste Data