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
8 pkgdesc="NVIDIA drivers utilities and libraries."
10 url="http://www.nvidia.com/"
11 depends=('xorg-server' 'libxvmc')
12 optdepends=('gtk2: nvidia-settings' 'pkg-config: nvidia-xconfig')
14 provides=('libgl' 'libcl')
16 install=nvidia.install
19 if [ "$CARCH" = "i686" ]; then
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
26 _pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32"
27 source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
28 md5sums=('cb518bdd70f356425b8c4a5a48c0ad9c')
33 sh ${_pkg}.run --extract-only
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
45 install -D -m755 libGL.so.$pkgver $pkgdir/usr/lib/libGL.so.$pkgver
47 install -D -m755 libnvidia-glcore.so.$pkgver $pkgdir/usr/lib/libnvidia-glcore.so.$pkgver
49 install -D -m644 libXvMCNVIDIA.a $pkgdir/usr/lib/libXvMCNVIDIA.a
50 install -D -m755 libXvMCNVIDIA.so.$pkgver $pkgdir/usr/lib/libXvMCNVIDIA.so.$pkgver
52 install -D -m755 libvdpau_nvidia.so.$pkgver $pkgdir/usr/lib/vdpau/libvdpau_nvidia.so.$pkgver
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
57 install -D -m755 tls/libnvidia-tls.so.$pkgver $pkgdir/usr/lib/libnvidia-tls.so.$pkgver
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
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]*/}"
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
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
87 install -D -m755 nvidia-bug-report.sh $pkgdir/usr/bin/nvidia-bug-report.sh
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