diff options
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 64 | ||||
-rw-r--r-- | cuda.conf | 2 | ||||
-rw-r--r-- | cuda.install | 11 | ||||
-rw-r--r-- | cuda.sh | 1 |
5 files changed, 102 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f52426ebf7ac --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +# Generated by mksrcinfo v8 +# Sat Jan 16 05:22:33 UTC 2016 +pkgbase = cuda-7.0-compat + pkgdesc = NVIDIA's GPU programming toolkit - Frozen at version 7.0 + pkgver = 7.0.28 + pkgrel = 1 + url = http://www.nvidia.com/object/cuda_home.html + install = cuda.install + arch = x86_64 + license = custom:NVIDIA + depends = gcc-libs + depends = opencl-nvidia + optdepends = gdb: for cuda-gdb + options = !strip + options = staticlibs + source = http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/cuda_7.0.28_linux.run + source = cuda.sh + source = cuda.conf + md5sums = 312aede1c3d1d3425c8caa67bbb7a55e + md5sums = cd09b0fb3735c637f7adefdebb5650c5 + md5sums = 6ac5205a67d4c13c8d662455ddf5217d + +pkgname = cuda-7.0-compat + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..712314d96d9c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,64 @@ +# $Id: PKGBUILD 69719 2012-04-23 02:56:20Z svenstaro $ +# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> +# Maintainer: xgdgsc +pkgname=cuda-7.0-compat +_pkgname=cuda-7.0 +pkgver=7.0.28 +pkgrel=1 +pkgdesc="NVIDIA's GPU programming toolkit - Frozen at version 7.0" +arch=('x86_64') +url="http://www.nvidia.com/object/cuda_home.html" +license=('custom:NVIDIA') +depends=('gcc-libs' 'opencl-nvidia') +optdepends=('gdb: for cuda-gdb') +replace=() +provides=() +options=(!strip staticlibs) +install=cuda.install +source=(http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/cuda_${pkgver}_linux.run + cuda.sh + cuda.conf) +md5sums=('312aede1c3d1d3425c8caa67bbb7a55e' + 'cd09b0fb3735c637f7adefdebb5650c5' + '6ac5205a67d4c13c8d662455ddf5217d') +PKGEXT=.tar.gz +prepare() { + sh cuda_${pkgver}_linux.run -extract=${srcdir} + ./cuda-linux64-rel-*.run --noexec --keep + ./cuda-samples-linux-*.run --noexec --keep + + # path hacks + + # 1rd sed line: sets right path to install man files + # 2rd sed line: hack to lie installer, now detect launch script by root + # 3rd sed line: sets right path in .desktop files and other .desktop stuff (warnings by desktop-file-validate) + sed -e "s|/usr/share|${srcdir}/../pkg/${_pkgname}/usr/share|g" \ + -e 's|can_add_for_all_users;|1;|g' \ + -e 's|=\\"$prefix\\\"|=/opt/cuda|g' -e 's|Terminal=No|Terminal=false|g' -e 's|ParallelComputing|ParallelComputing;|g' \ + -i pkg/install-linux.pl + + # set right path in Samples Makefiles + sed 's|\$cudaprefix\\|\\/opt\\/cuda\\|g' -i pkg/install-sdk-linux.pl + + # use python2 + find pkg -name '*.py' | xargs sed -i -e 's|env python|env python2|g' -e 's|bin/python|bin/python2|g' +} + +package() { + cd pkg + perl install-linux.pl -prefix="${pkgdir}/opt/$_pkgname" -noprompt + perl install-sdk-linux.pl -cudaprefix="${pkgdir}/opt/$_pkgname" -prefix="${pkgdir}/opt/$_pkgname/samples" -noprompt + + # allow gcc 4.9 to work + sed -i "/unsupported GNU/d" $pkgdir/opt/$_pkgname/include/host_config.h + + # install -Dm755 "${srcdir}/cuda.sh" "${pkgdir}/etc/profile.d/$_pkgname.sh" + install -Dm644 "${srcdir}/cuda.conf" "${pkgdir}/etc/ld.so.conf.d/$_pkgname.conf" + + mkdir -p "${pkgdir}/usr/share/licenses/$_pkgname" + ln -s /opt/$_pkgname/doc/pdf/EULA.pdf "${pkgdir}/usr/share/licenses/$_pkgname/EULA.pdf" + + # remove redundant man and samples + rm -fr "${pkgdir}/opt/$_pkgname/doc/man" + rm -fr "${pkgdir}/opt/$_pkgname/cuda-samples" +} diff --git a/cuda.conf b/cuda.conf new file mode 100644 index 000000000000..8eeabba42228 --- /dev/null +++ b/cuda.conf @@ -0,0 +1,2 @@ +/opt/cuda-7.0/lib64 +/opt/cuda-7.0/lib diff --git a/cuda.install b/cuda.install new file mode 100644 index 000000000000..e6542ab15e48 --- /dev/null +++ b/cuda.install @@ -0,0 +1,11 @@ +post_install() { + echo "The cuda binaries are in /opt/cuda-7.0/bin" + echo "The cuda samples are in /opt/cuda-7.0/samples" + echo "The cuda docs are in /opt/cuda-7.0/doc" + echo "You need to relogin in order for the cuda binaries to appear in your PATH" + post_upgrade +} + +post_upgrade() { + ldconfig -r . +} diff --git a/cuda.sh b/cuda.sh new file mode 100644 index 000000000000..88eb9ed7284c --- /dev/null +++ b/cuda.sh @@ -0,0 +1 @@ +export PATH=$PATH:/opt/cuda-7.0/bin |