2 # Maintainer: Thomas Baechler <thomas@archlinux.org>
3 # Contributor: James Rayner <iphitus@gmail.com>
4 pkgbase=opencl-nvidia-275xx
5 pkgname='opencl-nvidia-275xx'
9 url="http://www.nvidia.com/"
11 install=nvidia.install
14 if [ "$CARCH" = "i686" ]; then
16 _pkg="NVIDIA-Linux-${_arch}-${pkgver}"
17 source=("http://us.download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
18 md5sums=('aba5889666208d6b69aa6b27ff608842')
19 elif [ "$CARCH" = "x86_64" ]; then
21 _pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32"
22 source=("http://us.download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
23 md5sums=('5a80b13f0e92e33367d49866f6377dc1')
28 for _lib in $(find "${pkgdir}" -name '*.so*'); do
29 _soname="$(dirname ${_lib})/$(readelf -d "$_lib" | sed -nr 's/.*Library soname: \[(.*)\].*/\1/p')"
30 if [ ! -e "${_soname}" ]; then
31 ln -s "$(basename ${_lib})" "${_soname}"
32 ln -s "$(basename ${_soname})" "${_soname/.[0-9]*/}"
39 sh "${_pkg}.run" --extract-only
42 package_opencl-nvidia-275xx() {
43 pkgdesc="OpenCL implemention for NVIDIA"
45 conflicts=('opencl-nvidia')
46 optdepends=('opencl-headers: headers necessary for OpenCL development')
47 cd "${srcdir}/${_pkg}"
50 install -D -m644 nvidia.icd "${pkgdir}/etc/OpenCL/vendors/nvidia.icd"
51 install -D -m755 libnvidia-compiler.so.${pkgver} "${pkgdir}/usr/lib/libnvidia-compiler.so.${pkgver}"
53 install -D -m755 libcuda.so.${pkgver} "${pkgdir}/usr/lib/libcuda.so.${pkgver}"
54 install -D -m755 libnvcuvid.so.${pkgver} "${pkgdir}/usr/lib/libnvcuvid.so.${pkgver}"