2 # Maintainer: Samsagax <samsagax@gmail.com>
3 # Contributor: Thomas Baechler <thomas@archlinux.org>
4 # Contributor: James Rayner <iphitus@gmail.com>
5 pkgname=nvidia-utils-bumblebee
6 #pkgname=('nvidia-utils-bumblebee' 'opencl-nvidia')
10 url="http://www.nvidia.com/"
14 if [ "$CARCH" = "i686" ]; then
16 _pkg="NVIDIA-Linux-${_arch}-${pkgver}"
17 source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
18 md5sums=('50319a4b3818c12c9c7243525e0e6316')
19 elif [ "$CARCH" = "x86_64" ]; then
21 _pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32"
22 source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
23 md5sums=('cebfba9a7e91716a06c66bb5b38d9661')
28 while read -d '' _lib; do
29 _soname="$(dirname "${_lib}")/$(readelf -d "${_lib}" | sed -nr 's/.*Library soname: \[(.*)\].*/\1/p')"
30 [[ -e "${_soname}" ]] || ln -s "$(basename "${_lib}")" "${_soname}"
31 [[ -e "${_soname/.[0-9]*/}" ]] || ln -s "$(basename "${_soname}")" "${_soname/.[0-9]*/}"
32 done < <(find "${pkgdir}" -type f -name '*.so*' -print0)
37 sh "${_pkg}.run" --extract-only
41 pkgdesc="NVIDIA drivers utilities and libraries. With LibGL and xorg modules installed in a different directory."
42 depends=('xorg-server' 'libxvmc')
43 optdepends=('gtk2: nvidia-settings' 'pkg-config: nvidia-xconfig'
44 'opencl-nvidia: OpenCL support')
45 provides=("nvidia-utils=${pkgver}")
46 conflicts=('nvidia-utils')
47 cd "${srcdir}/${_pkg}"
50 install -D -m755 nvidia_drv.so "${pkgdir}/usr/lib/xorg/modules/drivers/nvidia_drv.so"
51 # GLX extension module for X
52 install -D -m755 "libglx.so.${pkgver}" "${pkgdir}/usr/lib/nvidia-bumblebee/xorg/modules/extensions/libglx.so.${pkgver}"
53 ln -s "libglx.so.${pkgver}" "${pkgdir}/usr/lib/nvidia-bumblebee/xorg/modules/extensions/libglx.so" # X doesn't find glx otherwise
55 install -D -m755 "libGL.so.${pkgver}" "${pkgdir}/usr/lib/nvidia-bumblebee/libGL.so.${pkgver}"
57 install -D -m755 "libnvidia-glcore.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-glcore.so.${pkgver}"
59 install -D -m644 libXvMCNVIDIA.a "${pkgdir}/usr/lib/libXvMCNVIDIA.a"
60 install -D -m755 "libXvMCNVIDIA.so.${pkgver}" "${pkgdir}/usr/lib/libXvMCNVIDIA.so.${pkgver}"
62 install -D -m755 "libvdpau_nvidia.so.${pkgver}" "${pkgdir}/usr/lib/vdpau/libvdpau_nvidia.so.${pkgver}"
64 install -D -m755 "tls/libnvidia-tls.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-tls.so.${pkgver}"
65 install -D -m755 "libnvidia-cfg.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-cfg.so.${pkgver}"
67 install -D -m755 "libnvidia-ml.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-ml.so.${pkgver}"
70 install -D -m755 nvidia-xconfig "${pkgdir}/usr/bin/nvidia-xconfig"
71 install -D -m644 nvidia-xconfig.1.gz "${pkgdir}/usr/share/man/man1/nvidia-xconfig.1.gz"
73 install -D -m755 nvidia-settings "${pkgdir}/usr/bin/nvidia-settings"
74 install -D -m644 nvidia-settings.1.gz "${pkgdir}/usr/share/man/man1/nvidia-settings.1.gz"
75 install -D -m644 nvidia-settings.desktop "${pkgdir}/usr/share/applications/nvidia-settings.desktop"
76 install -D -m644 nvidia-settings.png "${pkgdir}/usr/share/pixmaps/nvidia-settings.png"
77 sed -e 's:__UTILS_PATH__:/usr/bin:' -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' -i "${pkgdir}/usr/share/applications/nvidia-settings.desktop"
79 install -D -m755 nvidia-bug-report.sh "${pkgdir}/usr/bin/nvidia-bug-report.sh"
81 install -D -m755 nvidia-smi "${pkgdir}/usr/bin/nvidia-smi"
82 install -D -m644 nvidia-smi.1.gz "${pkgdir}/usr/share/man/man1/nvidia-smi.1.gz"
85 install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/nvidia/LICENSE"
86 ln -s nvidia "${pkgdir}/usr/share/licenses/nvidia-utils"
87 install -D -m644 README.txt "${pkgdir}/usr/share/doc/nvidia/README"
88 install -D -m644 NVIDIA_Changelog "${pkgdir}/usr/share/doc/nvidia/NVIDIA_Changelog"
89 ln -s nvidia "${pkgdir}/usr/share/doc/nvidia-utils"