updated on Thu Jan 19 12:17:07 UTC 2012
[aur-mirror.git] / opencl-nvidia-275xx / PKGBUILD
blob7a2f756468e98b0bcab9bbcfc623c9b4035c4107
1 # $Id$
2 # Maintainer: Thomas Baechler <thomas@archlinux.org>
3 # Contributor: James Rayner <iphitus@gmail.com>
4 pkgbase=opencl-nvidia-275xx
5 pkgname='opencl-nvidia-275xx'
6 pkgver=275.43
7 pkgrel=1
8 arch=('i686' 'x86_64')
9 url="http://www.nvidia.com/"
10 license=('custom')
11 install=nvidia.install
12 options=('!strip')
14 if [ "$CARCH" = "i686" ]; then
15     _arch='x86'
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
20     _arch='x86_64'
21     _pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32"
22     source=("http://us.download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
23     md5sums=('5a80b13f0e92e33367d49866f6377dc1')
26 create_links() {
27     # create soname links
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]*/}"
33             fi
34     done
37 build() {
38     cd "${srcdir}"
39     sh "${_pkg}.run" --extract-only
42 package_opencl-nvidia-275xx() {
43     pkgdesc="OpenCL implemention for NVIDIA"
44     depends=('libcl')
45     conflicts=('opencl-nvidia')
46     optdepends=('opencl-headers: headers necessary for OpenCL development')
47     cd "${srcdir}/${_pkg}"
49     # OpenCL
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}"
52     # CUDA
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}"
55     create_links