[arch-commits] Commit in cuda/repos (5 files)

Sven-Hendrik Haase svenstaro at archlinux.org
Fri Apr 24 10:14:23 UTC 2015


    Date: Friday, April 24, 2015 @ 12:14:22
  Author: svenstaro
Revision: 132096

archrelease: copy trunk to extra-x86_64

Added:
  cuda/repos/extra-x86_64/
  cuda/repos/extra-x86_64/PKGBUILD
    (from rev 132095, cuda/trunk/PKGBUILD)
  cuda/repos/extra-x86_64/cuda.conf
    (from rev 132095, cuda/trunk/cuda.conf)
  cuda/repos/extra-x86_64/cuda.install
    (from rev 132095, cuda/trunk/cuda.install)
  cuda/repos/extra-x86_64/cuda.sh
    (from rev 132095, cuda/trunk/cuda.sh)

--------------+
 PKGBUILD     |   62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 cuda.conf    |    2 +
 cuda.install |   11 ++++++++++
 cuda.sh      |    1 
 4 files changed, 76 insertions(+)

Copied: cuda/repos/extra-x86_64/PKGBUILD (from rev 132095, cuda/trunk/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD	                        (rev 0)
+++ extra-x86_64/PKGBUILD	2015-04-24 10:14:22 UTC (rev 132096)
@@ -0,0 +1,62 @@
+# $Id: PKGBUILD 69719 2012-04-23 02:56:20Z svenstaro $
+# Maintainer: Sven-Hendrik Haase <sh at lutzhaase.com>
+pkgname=cuda
+pkgver=7.0.28
+pkgrel=2
+pkgdesc="NVIDIA's GPU programming toolkit"
+arch=('x86_64')
+url="http://www.nvidia.com/object/cuda_home.html"
+license=('custom:NVIDIA')
+depends=('gcc-libs' 'opencl-nvidia')
+replaces=('cuda-toolkit' 'cuda-sdk')
+provides=('cuda-toolkit' 'cuda-sdk')
+optdepends=('gdb: for cuda-gdb')
+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'
+         '7e5990e03eea90075f5a500e91a0c3d3'
+         'ffe1e6fb7f97b23da28fd94a5fd7356d')
+
+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/cuda" -noprompt
+  perl install-sdk-linux.pl -cudaprefix="${pkgdir}/opt/cuda" -prefix="${pkgdir}/opt/cuda/samples" -noprompt
+
+  # allow gcc 4.9 to work
+  sed -i "/unsupported GNU/d" $pkgdir/opt/cuda/include/host_config.h
+
+  install -Dm755 "${srcdir}/cuda.sh" "${pkgdir}/etc/profile.d/cuda.sh"
+  install -Dm644 "${srcdir}/cuda.conf" "${pkgdir}/etc/ld.so.conf.d/cuda.conf"
+
+  mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}"
+  ln -s /opt/cuda/doc/pdf/EULA.pdf "${pkgdir}/usr/share/licenses/${pkgname}/EULA.pdf"
+
+  # remove redundant man and samples
+  rm -fr "${pkgdir}/opt/cuda/doc/man"
+  rm -fr "${pkgdir}/opt/cuda/cuda-samples"
+}

Copied: cuda/repos/extra-x86_64/cuda.conf (from rev 132095, cuda/trunk/cuda.conf)
===================================================================
--- extra-x86_64/cuda.conf	                        (rev 0)
+++ extra-x86_64/cuda.conf	2015-04-24 10:14:22 UTC (rev 132096)
@@ -0,0 +1,2 @@
+/opt/cuda/lib64
+/opt/cuda/lib

Copied: cuda/repos/extra-x86_64/cuda.install (from rev 132095, cuda/trunk/cuda.install)
===================================================================
--- extra-x86_64/cuda.install	                        (rev 0)
+++ extra-x86_64/cuda.install	2015-04-24 10:14:22 UTC (rev 132096)
@@ -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 .
+}

Copied: cuda/repos/extra-x86_64/cuda.sh (from rev 132095, cuda/trunk/cuda.sh)
===================================================================
--- extra-x86_64/cuda.sh	                        (rev 0)
+++ extra-x86_64/cuda.sh	2015-04-24 10:14:22 UTC (rev 132096)
@@ -0,0 +1 @@
+export PATH=$PATH:/opt/cuda/bin



More information about the arch-commits mailing list