updated on Wed Jan 18 20:10:41 UTC 2012
[aur-mirror.git] / nvidia-utils-ice / PKGBUILD
bloba5930c2c095220776d6e83b82ca03d8bbc4125ee
1 # $Id: PKGBUILD 127415 2011-06-14 18:51:11Z ibiru $
2 # Maintainer: Thomas Baechler <thomas@archlinux.org>
3 # Contributor: James Rayner <iphitus@gmail.com>
5 pkgname=nvidia-utils-ice
6 pkgver=270.41.19
7 pkgrel=1
8 pkgdesc="NVIDIA drivers utilities and libraries."
9 arch=('i686' 'x86_64')
10 url="http://www.nvidia.com/"
11 depends=('xorg-server' 'libxvmc')
12 optdepends=('gtk2: nvidia-settings' 'pkg-config: nvidia-xconfig')
13 conflicts=('libgl')
14 provides=('libgl' 'libcl')
15 license=('custom')
16 install=nvidia.install
17 options=('!strip')
19 if [ "$CARCH" = "i686" ]; then
20         _arch='x86'
21         _pkg="NVIDIA-Linux-${_arch}-${pkgver}"
22         source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
23         md5sums=('c167e32702f56599bd600add97943312')
24 elif [ "$CARCH" = "x86_64" ]; then
25     _arch='x86_64'
26     _pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32"
27     source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
28         md5sums=('cb518bdd70f356425b8c4a5a48c0ad9c')
31 build() {
32         cd $srcdir
33         sh ${_pkg}.run --extract-only
36 package() {
37         cd $srcdir/${_pkg}
39         # X driver
40         install -D -m755 nvidia_drv.so $pkgdir/usr/lib/xorg/modules/drivers/nvidia_drv.so
41         # GLX extension module for X
42         install -D -m755 libglx.so.$pkgver $pkgdir/usr/lib/xorg/modules/extensions/libglx.so.$pkgver
43         ln -s libglx.so.$pkgver $pkgdir/usr/lib/xorg/modules/extensions/libglx.so       # X doesn't find glx otherwise
44         # OpenGL library
45         install -D -m755 libGL.so.$pkgver $pkgdir/usr/lib/libGL.so.$pkgver
46         # OpenGL core library
47         install -D -m755 libnvidia-glcore.so.$pkgver $pkgdir/usr/lib/libnvidia-glcore.so.$pkgver
48         # XvMC
49         install -D -m644 libXvMCNVIDIA.a $pkgdir/usr/lib/libXvMCNVIDIA.a
50         install -D -m755 libXvMCNVIDIA.so.$pkgver $pkgdir/usr/lib/libXvMCNVIDIA.so.$pkgver
51         # VDPAU
52         install -D -m755 libvdpau_nvidia.so.$pkgver $pkgdir/usr/lib/vdpau/libvdpau_nvidia.so.$pkgver
53         # CUDA
54         install -D -m755 libcuda.so.$pkgver $pkgdir/usr/lib/libcuda.so.$pkgver
55         install -D -m755 libnvcuvid.so.$pkgver $pkgdir/usr/lib/libnvcuvid.so.$pkgver
56         # nvidia-tls library
57         install -D -m755 tls/libnvidia-tls.so.$pkgver $pkgdir/usr/lib/libnvidia-tls.so.$pkgver
58         # OpenCL
59         install -D -m755 libnvidia-compiler.so.$pkgver $pkgdir/usr/lib/libnvidia-compiler.so.$pkgver
60         install -D -m755 libOpenCL.so.1.0.0 $pkgdir/usr/lib/libOpenCL.so.1.0.0
61         install -D -m644 nvidia.icd $pkgdir/etc/OpenCL/vendors/nvidia.icd
63         install -D -m755 libnvidia-cfg.so.$pkgver $pkgdir/usr/lib/libnvidia-cfg.so.$pkgver
65         install -D -m755 libnvidia-ml.so.$pkgver $pkgdir/usr/lib/libnvidia-ml.so.$pkgver
67         # create soname links
68         for _lib in $(find $pkgdir -name '*.so*'); do
69                 _soname="$(dirname ${_lib})/$(readelf -d "$_lib" | sed -nr 's/.*Library soname: \[(.*)\].*/\1/p')"
70                 if [ ! -e "${_soname}" ]; then
71                         ln -s "$(basename ${_lib})" "${_soname}"
72                         ln -s "$(basename ${_soname})" "${_soname/.[0-9]*/}"
73                 fi
74         done
77         # nvidia-xconfig
78         install -D -m755 nvidia-xconfig $pkgdir/usr/bin/nvidia-xconfig
79         install -D -m644 nvidia-xconfig.1.gz $pkgdir/usr/share/man/man1/nvidia-xconfig.1.gz
80         # nvidia-settings
81         install -D -m755 nvidia-settings $pkgdir/usr/bin/nvidia-settings
82         install -D -m644 nvidia-settings.1.gz $pkgdir/usr/share/man/man1/nvidia-settings.1.gz
83         install -D -m644 nvidia-settings.desktop $pkgdir/usr/share/applications/nvidia-settings.desktop
84         install -D -m644 nvidia-settings.png $pkgdir/usr/share/pixmaps/nvidia-settings.png
85         sed -e 's:__UTILS_PATH__:/usr/bin:' -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' -i $pkgdir/usr/share/applications/nvidia-settings.desktop
86         # nvidia-bug-report
87         install -D -m755 nvidia-bug-report.sh $pkgdir/usr/bin/nvidia-bug-report.sh
88         # nvidia-smi
89         install -D -m755 nvidia-smi $pkgdir/usr/bin/nvidia-smi
90         install -D -m644 nvidia-smi.1.gz $pkgdir/usr/share/man/man1/nvidia-smi.1.gz
93         install -D -m644 LICENSE $pkgdir/usr/share/licenses/nvidia/LICENSE
94         ln -s nvidia $pkgdir/usr/share/licenses/nvidia-utils
95         install -D -m644 README.txt $pkgdir/usr/share/doc/nvidia/README
96         install -D -m644 NVIDIA_Changelog $pkgdir/usr/share/doc/nvidia/NVIDIA_Changelog
97         ln -s nvidia $pkgdir/usr/share/doc/nvidia-utils