updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / nvidia-utils-glselect / PKGBUILD
blob441da0d1a68c7b482b7c2bcb5c29a740fce191f3
1 # Contributor: Thomas Baechler <thomas@archlinux.org>
2 # Contributor: James Rayner <iphitus@gmail.com>
3 # Maintainer: Jonathan Schmidt <j.schmidt@archlinux.us>
5 pkgname=nvidia-utils-glselect
6 pkgver=190.53
7 pkgrel=1
8 pkgdesc="NVIDIA drivers utilities and libraries with libgl compatibility through glselect."
9 arch=('i686' 'x86_64')
10 [ "$CARCH" = "i686"   ] && ARCH=x86
11 [ "$CARCH" = "x86_64" ] && ARCH=x86_64
12 url="http://www.nvidia.com/"
13 depends=('xorg-server')
14 optdepends=('gtk2: nvidia-settings' 'pkgconfig: nvidia-xconfig')
15 conflicts=('nvidia-utils')
16 provides=("nvidia-utils=$pkgver")
17 license=('custom')
18 install=nvidia.install
19 source=("http://download.nvidia.com/XFree86/Linux-${ARCH}/${pkgver}/NVIDIA-Linux-${ARCH}-${pkgver}-pkg0.run" 'glselect')
20 options=(force)
21 md5sums=('2e80419f6f9ac16beecd839874d0c5ab' '128787899ce0e0c08ae8e129a0663de4')
22 [ "$CARCH" = "x86_64" ] && md5sums=('3d3e956366f9df0e4c64d2e0299d1029' '128787899ce0e0c08ae8e129a0663de4')
24 build() {
25         cd $srcdir
26         sh NVIDIA-Linux-${ARCH}-${pkgver}-pkg0.run --extract-only
27         cd NVIDIA-Linux-${ARCH}-${pkgver}-pkg0/usr/
29         mkdir -p $pkgdir/usr/{lib,bin,share/applications,share/pixmaps,share/man/man1}
30         mkdir -p $pkgdir/usr/lib/xorg/modules/{extensions,drivers}
31   mkdir -p $pkgdir/usr/lib/vdpau
32         mkdir -p $pkgdir/usr/share/licenses/nvidia
33         mkdir -p $pkgdir/usr/include/cuda
35         install -m644 include/cuda/cuda*.h $pkgdir/usr/include/cuda/
37         install lib/{libGLcore,libGL,libnvidia-cfg,libcuda,tls/libnvidia-tls}.so.${pkgver} $pkgdir/usr/lib/ || return 1
38   install -m755 lib/vdpau/libvdpau_nvidia.so.${pkgver} "${pkgdir}/usr/lib/vdpau/" || return 1
39   ln -sf libvdpau_nvidia.so.${pkgver} "${pkgdir}/usr/lib/vdpau/libvdpau_nvidia.so.1"
41         install -m644 share/man/man1/* $pkgdir/usr/share/man/man1/ || return 1
42         rm $pkgdir/usr/share/man/man1/nvidia-installer.1.gz || return 1
43         install X11R6/lib/libXv* $pkgdir/usr/lib/ || return 1
44         install -m644 share/applications/nvidia-settings.desktop $pkgdir/usr/share/applications/ || return 1
45         # fix nvidia .desktop file
46         sed -e 's:__UTILS_PATH__:/usr/bin:' -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' -i $pkgdir/usr/share/applications/nvidia-settings.desktop
47         install -m644 share/pixmaps/nvidia-settings.png $pkgdir/usr/share/pixmaps/ || return 1
48         install X11R6/lib/modules/drivers/nvidia_drv.so $pkgdir/usr/lib/xorg/modules/drivers || return 1
49         install X11R6/lib/modules/extensions/libglx.so.$pkgver $pkgdir/usr/lib/xorg/modules/extensions || return 1
50         install -m755 bin/nvidia-{settings,xconfig,bug-report.sh} $pkgdir/usr/bin/ || return 1
51         cd $pkgdir/usr/lib/
52         ln -s libGLcore.so.$pkgver libGLcore.so.1 || return 1
53         ln -s libnvidia-cfg.so.$pkgver libnvidia-cfg.so.1 || return 1
54         ln -s libnvidia-tls.so.$pkgver libnvidia-tls.so.1 || return 1
55         ln -s libcuda.so.$pkgver libcuda.so.1 || return 1
56         ln -s libcuda.so.$pkgver libcuda.so || return 1
57         ln -s libXvMCNVIDIA.so.$pkgver libXvMCNVIDIA_dynamic.so.1 || return 1
59         install -m644 $srcdir/NVIDIA-Linux-${ARCH}-${pkgver}-pkg0/LICENSE $pkgdir/usr/share/licenses/nvidia/ || return 1
60         ln -s nvidia $startdir/pkg/usr/share/licenses/nvidia-utils || return 1
62         install -D -m644 $srcdir/NVIDIA-Linux-${ARCH}-${pkgver}-pkg0/usr/share/doc/README.txt $pkgdir/usr/share/doc/nvidia/README || return 1
64         find $pkgdir/usr -type d -exec chmod 755 {} \;
65         chmod 644 $pkgdir/usr/lib/libXvMCNVIDIA.a
67         # Allow gl lib link switching with glselect
68         install $srcdir/glselect $pkgdir/usr/bin/ || return 1