1 # Syco <SycoLTH at gmail dot com>
3 pkgname=nvidia-utils-256
6 pkgdesc="NVIDIA drivers utilities and libraries."
8 url="http://www.nvidia.com/"
9 depends=('xorg-server' 'libxvmc')
10 optdepends=('gtk2: nvidia-settings' 'pkg-config: nvidia-xconfig')
11 conflicts=('libgl' 'nvidia-utils')
12 provides=('libgl' "nvidia-utils=${pkgver}")
14 install=nvidia.install
16 backup=('etc/X11/xorg.conf.d/20-nvidia.conf')
18 if [ "$CARCH" = "i686" ]; then
20 _pkg="NVIDIA-Linux-${_arch}-${pkgver}"
21 source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
22 md5sums=('21fe3fe0afed7818b7adf383477b2155')
23 elif [ "$CARCH" = "x86_64" ]; then
25 _pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32"
26 source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
27 md5sums=('73f08a19e00d05165cbbfc74e2fa4bdd')
30 source[1]='20-nvidia.conf'
31 md5sums[1]='541cb36684b6764ccba73d7afe268bf5'
35 sh ${_pkg}.run --extract-only
42 install -D -m755 nvidia_drv.so ${pkgdir}/usr/lib/xorg/modules/drivers/nvidia_drv.so
43 # GLX extension module for X
44 install -D -m755 libglx.so.${pkgver} ${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so.${pkgver}
45 ln -s libglx.so.${pkgver} ${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so # X doesn't find glx otherwise
47 install -D -m755 libGL.so.${pkgver} ${pkgdir}/usr/lib/libGL.so.${pkgver}
49 install -D -m755 libnvidia-glcore.so.${pkgver} ${pkgdir}/usr/lib/libnvidia-glcore.so.${pkgver}
51 install -D -m644 libXvMCNVIDIA.a ${pkgdir}/usr/lib/libXvMCNVIDIA.a
52 install -D -m755 libXvMCNVIDIA.so.${pkgver} ${pkgdir}/usr/lib/libXvMCNVIDIA.so.${pkgver}
54 install -D -m755 libvdpau_nvidia.so.${pkgver} ${pkgdir}/usr/lib/vdpau/libvdpau_nvidia.so.${pkgver}
56 install -D -m755 libcuda.so.${pkgver} ${pkgdir}/usr/lib/libcuda.so.${pkgver}
58 install -D -m755 tls/libnvidia-tls.so.${pkgver} ${pkgdir}/usr/lib/libnvidia-tls.so.${pkgver}
60 install -D -m755 libnvidia-compiler.so.${pkgver} ${pkgdir}/usr/lib/libnvidia-compiler.so.${pkgver}
61 install -D -m755 libOpenCL.so.1.0.0 ${pkgdir}/usr/lib/libOpenCL.so.1.0.0
62 install -D -m644 nvidia.icd ${pkgdir}/etc/OpenCL/vendors/nvidia.icd
64 install -D -m755 libnvidia-cfg.so.${pkgver} ${pkgdir}/usr/lib/libnvidia-cfg.so.${pkgver}
67 for _lib in $(find ${pkgdir} -name '*.so*'); do
68 _soname="$(dirname ${_lib})/$(readelf -d "$_lib" | sed -nr 's/.*Library soname: \[(.*)\].*/\1/p')"
69 if [ ! -e "${_soname}" ]; then
70 ln -s "$(basename ${_lib})" "${_soname}"
71 ln -s "$(basename ${_soname})" "${_soname/.[0-9]*/}"
77 install -D -m755 nvidia-xconfig ${pkgdir}/usr/bin/nvidia-xconfig
78 install -D -m644 nvidia-xconfig.1.gz ${pkgdir}/usr/share/man/man1/nvidia-xconfig.1.gz
80 install -D -m755 nvidia-settings ${pkgdir}/usr/bin/nvidia-settings
81 install -D -m644 nvidia-settings.1.gz ${pkgdir}/usr/share/man/man1/nvidia-settings.1.gz
82 install -D -m644 nvidia-settings.desktop ${pkgdir}/usr/share/applications/nvidia-settings.desktop
83 install -D -m644 nvidia-settings.png ${pkgdir}/usr/share/pixmaps/nvidia-settings.png
84 sed -e 's:__UTILS_PATH__:/usr/bin:' -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' -i ${pkgdir}/usr/share/applications/nvidia-settings.desktop
86 install -D -m755 nvidia-bug-report.sh ${pkgdir}/usr/bin/nvidia-bug-report.sh
88 install -D -m755 nvidia-smi ${pkgdir}/usr/bin/nvidia-smi
89 install -D -m644 nvidia-smi.1.gz ${pkgdir}/usr/share/man/man1/nvidia-smi.1.gz
92 install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/nvidia/LICENSE
93 ln -s nvidia ${pkgdir}/usr/share/licenses/nvidia-utils
94 install -D -m644 README.txt ${pkgdir}/usr/share/doc/nvidia/README
95 install -D -m644 NVIDIA_Changelog ${pkgdir}/usr/share/doc/nvidia/NVIDIA_Changelog
96 ln -s nvidia ${pkgdir}/usr/share/doc/nvidia-utils
98 # Install xorg.conf.d file for nvidia autodetection in xorg.conf-less configurations
99 install -D -m644 ${srcdir}/20-nvidia.conf ${pkgdir}/etc/X11/xorg.conf.d/20-nvidia.conf