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