1 # Maintainer: Thomas Jost <schnouki@schnouki.net>
2 # Contributor: Carson Reynolds <carson@k2.t.u-tokyo.ac.jp>
4 # WARNING: this is a package for a beta version of CUDA. If you need a stable
5 # and reliable version, please use the "cuda-toolkit" package instead.
7 # A x86_64 binary version of this package is available from my custom
8 # repository. If you wish to use it, just add the following lines to your
11 # Server = http://repo.schnouki.net/archlinux/$arch
12 # Then run "pacman -Sy cuda-toolkit-beta" as root
14 pkgname=cuda-toolkit-beta
19 pkgdesc="NVIDIA's CUDA architecture can be programmed in the only C language environment that unlocks the processing power of GPUs to solve the most complex compute-intensive challenges."
20 arch=('i686' 'x86_64')
22 url="http://www.nvidia.com/object/cuda_home.html"
25 depends=('gcc45' 'ncurses' 'nvidia>=285.05' 'opencl-nvidia' 'python2')
26 optdepends=('libxtst: for the NVIDIA Visual Profiler'
27 'libxrender: for the NVIDIA Visual Profiler'
28 'libxt: for the NVIDIA Visual Profiler'
33 provides=("opencl-headers" "cuda-toolkit=${pkgver}" "thrust")
34 conflicts=("opencl-headers" "cuda-toolkit" "thrust")
37 if [ "$CARCH" = "i686" ]; then
39 md5sums=('930b7bfd1a162335b909f119a004f6d7')
40 sha256sums=('ad2317371a87d7642d1385e06e4ea1820b28ae94b4686cf8e4171d0d759364e3')
43 md5sums=('509c795b9b79f991e045a83576e2e2f3')
44 sha256sums=('249ee7ce7a6fdb0c289f9a89b59429aa605cf061c474532e6eb53c76f9b9a0ed')
47 source=(http://developer.download.nvidia.com/compute/cuda/4_1/RC2/toolkit/cudatoolkit_${pkgver}_linux_${_bits}_fedora${_fedver}.run)
48 install=cuda-toolkit.install
50 # This is ugly, but saves a lot of time: don't compress the package with xz.
56 msg2 "Uncompressing the CUDA toolkit..."
57 sh cudatoolkit_${pkgver}_linux_${_bits}_fedora${_fedver}.run --noexec --keep --target toolkit &>/dev/null
59 msg2 "Patching the install script..."
60 # don't uninstall first
61 sed -i 's/my $yesno = ""/my $yesno = "no"/' toolkit/install-linux.pl
64 #echo "Inspect srcdir"
71 msg2 "Installing the CUDA toolkit..."
72 install -dm755 "$pkgdir/usr/cuda"
73 ./install-linux.pl --prefix="$pkgdir/usr/cuda" >/dev/null
75 msg2 "Fixing paths..."
76 sed -i "s#$pkgdir##g" "$pkgdir/usr/cuda/bin/nvvp"
78 msg2 "Creating required symlinks..."
79 install -dm755 "$pkgdir/usr/cuda/gcc-4.5"
80 ln -s ../../bin/gcc-4.5 "$pkgdir/usr/cuda/gcc-4.5/gcc"
81 ln -s ../../bin/g++-4.5 "$pkgdir/usr/cuda/gcc-4.5/g++"
83 # Hack: cuda-gdb needs libtinfo.so.5, which is apparently now in ncurses
84 ln -s ../../lib/libncurses.so.5 "$pkgdir/usr/cuda/lib/libtinfo.so.5"
86 msg2 "Patching nvcc.profile for gcc-4.5..."
87 # Thanks to Valentine Sinitsyn for the idea!
88 echo '' >> "$pkgdir/usr/cuda/bin/nvcc.profile"
89 echo '# Arch-specific paths' >> "$pkgdir/usr/cuda/bin/nvcc.profile"
90 echo 'compiler-bindir = /usr/cuda/gcc-4.5' >> "$pkgdir/usr/cuda/bin/nvcc.profile"
92 msg2 "Adding config files in /etc/ld.so.conf.d and /etc/profile.d..."
94 install -dm755 "$pkgdir/etc/ld.so.conf.d"
96 [[ -d "$pkgdir/usr/cuda/lib" ]] && echo "/usr/cuda/lib"
97 [[ -d "$pkgdir/usr/cuda/lib64" ]] && echo "/usr/cuda/lib64"
98 ) > "$pkgdir/etc/ld.so.conf.d/cuda-toolkit.conf"
101 install -dm755 "$pkgdir/etc/profile.d"
102 echo 'export PATH="${PATH}:/usr/cuda/bin"' > "$pkgdir/etc/profile.d/cuda-toolkit.sh"
104 msg2 "Installing license information..."
105 install -d "$pkgdir/usr/share/licenses/$pkgname"
106 ln -s ../../../cuda/doc/EULA.txt "$pkgdir/usr/share/licenses/$pkgname/EULA.txt"
109 #echo "Inspect pkgdir"
114 # pkgbuild-update-sums-on-save: nil