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