summaryrefslogtreecommitdiff
path: root/community/cuda-toolkit/PKGBUILD
blob: 1612ba93e29158582ad7b78f7e53d0f0e3c873a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
pkgname=cuda-toolkit
pkgver=4.1.28
pkgrel=1
_fedver=14
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')
optdepends=('gdb: for cuda-gdb')
if [ "$CARCH" = "i686" ]; then
  _arch=32
  md5sums=('835d403e86f4b014b348c587ffb23c0d'
           '5af5226b36cd3f9993f762f85b5d236a'
           'c0781c63e726eaf03e10135b42b85729')
else
  _arch=64
  md5sums=('c82103da07d0e96f3d65d7b308b74446'
           '5af5226b36cd3f9993f762f85b5d236a'
           'c0781c63e726eaf03e10135b42b85729')
fi

install=cuda-toolkit.install
source=(http://developer.download.nvidia.com/compute/cuda/4_1/rel/toolkit/cudatoolkit_${pkgver}_linux_${_arch}_fedora${_fedver}.run
        cuda-toolkit.sh
        cuda-toolkit.conf)

build() {
  cd "$srcdir"
}

package() {
  cd "$srcdir"

  mkdir -p $pkgdir/opt/cuda-toolkit
  sh cudatoolkit_${pkgver}_linux_${_arch}_fedora${_fedver}.run --keep -- --prefix=$pkgdir/opt/cuda-toolkit

  sed -i "/unsupported GNU/d" $pkgdir/opt/cuda-toolkit/include/host_config.h

  install -Dm755 cuda-toolkit.sh $pkgdir/etc/profile.d/cuda-toolkit.sh
  install -Dm644 cuda-toolkit.conf $pkgdir/etc/ld.so.conf.d/cuda-toolkit.conf
  install -Dm644 $pkgdir/opt/cuda-toolkit/doc/EULA.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE

  mkdir -p $pkgdir/usr/lib
  cd $pkgdir/usr/lib
  ln -s /usr/lib/libncurses.so.5 libtinfo.so.5
}