diff options
author | root <root@rshg054.dnsready.net> | 2012-10-30 01:38:24 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-10-30 01:38:24 -0700 |
commit | 455295fdb5009a8cd7b033a93e01f7450fd3087b (patch) | |
tree | 278f9d3446f3e581a65629cb7a122c9d5df20df8 /community/cuda | |
parent | 29665004d902f751dedb1a4baaa896f9ed74c6b6 (diff) |
Tue Oct 30 01:38:05 PDT 2012
Diffstat (limited to 'community/cuda')
-rw-r--r-- | community/cuda/PKGBUILD | 54 | ||||
-rw-r--r-- | community/cuda/cuda.conf | 2 | ||||
-rw-r--r-- | community/cuda/cuda.install | 11 | ||||
-rw-r--r-- | community/cuda/cuda.sh | 1 |
4 files changed, 68 insertions, 0 deletions
diff --git a/community/cuda/PKGBUILD b/community/cuda/PKGBUILD new file mode 100644 index 000000000..e2e58fb3a --- /dev/null +++ b/community/cuda/PKGBUILD @@ -0,0 +1,54 @@ +# $Id: PKGBUILD 69719 2012-04-23 02:56:20Z svenstaro $ +# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> +pkgname=cuda +pkgver=5.0.35 +pkgrel=2 +pkgdesc="NVIDIA's GPU programming toolkit" +arch=('i686' 'x86_64') +url="http://www.nvidia.com/object/cuda_home.html" +license=('custom') +depends=('gcc-libs' 'opencl-nvidia') +replaces=('cuda-toolkit' 'cuda-sdk') +provides=('cuda-toolkit' 'cuda-sdk') +optdepends=('gdb: for cuda-gdb') +options=(!strip) +if [ "$CARCH" = "i686" ]; then + _arch=32 + md5sums=('40c514acb750902c54656b97a6deded6' + '7e5990e03eea90075f5a500e91a0c3d3' + 'c0781c63e726eaf03e10135b42b85729') +else + _arch=64 + md5sums=('df796fb9ab66075b5c346b3fd0bf596b' + '7e5990e03eea90075f5a500e91a0c3d3' + 'c0781c63e726eaf03e10135b42b85729') +fi +install=cuda.install +source=(http://developer.download.nvidia.com/compute/cuda/5_0/rel-update-1/installers/cuda_${pkgver}_linux_${_arch}_fedora16-1.run + cuda.sh + cuda.conf) + +build() { + cd "$srcdir" +} + +package() { + sh cuda_${pkgver}_linux_${_arch}_fedora16-1.run -toolkitpath=$PWD -samplespath=$PWD -extract=$srcdir + ./cudatoolkit_${pkgver}_linux_${_arch}_fedora16.run -prefix=$pkgdir/opt/cuda -noprompt + ./cuda-samples_${pkgver}_linux.run -cudaprefix=$pkgdir/opt/cuda -prefix=$pkgdir/opt/cuda/samples -noprompt + + # allow gcc 4.7 to work + sed -i "/unsupported GNU/d" $pkgdir/opt/cuda/include/host_config.h + + # fix nvidia path fuckup + sed -i "s|/build/pkg||g" $pkgdir/opt/cuda/bin/nvvp + + install -Dm755 cuda.sh $pkgdir/etc/profile.d/cuda.sh + install -Dm644 cuda.conf $pkgdir/etc/ld.so.conf.d/cuda.conf + + install -Dm644 $pkgdir/opt/cuda/doc/EULA.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE + + # correct cuda path in samples + cd $pkgdir/opt/cuda/samples + find . -type f | egrep -v '(ppm|pgm)' | xargs grep -lI "$pkgdir/opt/cuda" | xargs sed -i "s|$pkgdir/opt/cuda|/opt/cuda|g" +} diff --git a/community/cuda/cuda.conf b/community/cuda/cuda.conf new file mode 100644 index 000000000..0f55b39a7 --- /dev/null +++ b/community/cuda/cuda.conf @@ -0,0 +1,2 @@ +/opt/cuda-toolkit/lib64 +/opt/cuda-toolkit/lib diff --git a/community/cuda/cuda.install b/community/cuda/cuda.install new file mode 100644 index 000000000..fb341b1dd --- /dev/null +++ b/community/cuda/cuda.install @@ -0,0 +1,11 @@ +post_install() { + echo "The cuda binaries are in /opt/cuda/bin" + echo "The cuda samples are in /opt/cuda/samples" + echo "The cuda docs are in /opt/cuda/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/community/cuda/cuda.sh b/community/cuda/cuda.sh new file mode 100644 index 000000000..6de59ddd5 --- /dev/null +++ b/community/cuda/cuda.sh @@ -0,0 +1 @@ +export PATH=$PATH:/opt/cuda/bin |