updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / cuda-toolkit-old / PKGBUILD
blob03b80390cbd7cad1cb90842ff93070f0be43f291
1 # Maintainer: Carson Reynolds <carson@k2.t.u-tokyo.ac.jp>
2 # Contributor: Lawrence Lee <valheru AT facticius DOT net>
3 # Contributor: Ismael Barros Barros <razielmine@gmail.com>
4 pkgname=cuda-toolkit-old
5 pkgver=2.2
6 pkgrel=4
7 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."
8 arch=('i686' 'x86_64')
10 url="http://www.nvidia.com/object/cuda_home.html"
11 license=('custom')
12 provides=('cuda' 'cuda-toolkit')
14 if [ "$CARCH" = "i686" ]; then
15    ARCH=x86      
16    source=(http://developer.download.nvidia.com/compute/cuda/2_2/toolkit/cudatoolkit_2.2_linux_32_suse11.1.run install-linux.pl.ununinstall.patch)
17    depends=('gcc-libs' 'nvidia>=185.18.14.-1' 'zlib')
18    md5sums=('d23cdec72cf18602cdb558b55578da1a' 'a6ecb757dc97696bbc2ef31930ba519f')
21 if [ "$CARCH" = "x86_64" ]; then
22    ARCH=x86_64
23    source=(http://developer.download.nvidia.com/compute/cuda/2_2/toolkit/cudatoolkit_2.2_linux_64_suse11.1.run install-linux.pl.ununinstall.patch)
24    depends=('gcc-libs' 'nvidia>=185.18.14.-1' 'zlib' 'lib32-pcre')
25    md5sums=('db982d755516b8952475c92cb243e5cb' 'a6ecb757dc97696bbc2ef31930ba519f')
28 build() {
29   mkdir -p $pkgdir/usr/bin
30   mkdir -p $pkgdir/usr/lib
31   mkdir -p $pkgdir/usr/include
32   mkdir -p $pkgdir/usr/share/cuda-prof
33   mkdir -p $pkgdir/usr/share/doc/cuda-toolkit
34   mkdir -p $pkgdir/usr/share/doc/cuda-toolkit/cudaprof
35   mkdir -p $pkgdir/usr/share/doc/cuda-toolkit/html
36   mkdir -p $pkgdir/usr/share/licenses/cuda-toolkit
37   cd $srcdir
38   [ "$CARCH" = "i686" ] &&  sh cudatoolkit_2.2_linux_32_suse11.1.run --noexec --keep
39   [ "$CARCH" = "x86_64" ] &&  sh cudatoolkit_2.2_linux_64_suse11.1.run --noexec --keep
40   patch -p0 -i install-linux.pl.ununinstall.patch || return 1
41   cd pkg
42   # these files conflict with linux man pages
43   mv $srcdir/pkg/man/man3/major.3 $srcdir/pkg/man/man3/cuda-major.3 
44   mv $srcdir/pkg/man/man3/minor.3 $srcdir/pkg/man/man3/cuda-minor.3 
45   # uninstall routine causes problems, we will pacman handle uninstallation instead
46   ./install-linux.pl --prefix=$startdir/pkg/usr &> /dev/null
47   install -m 755 $pkgdir/usr/open64/bin/* $pkgdir/usr/bin
48   install -m 755 $pkgdir/usr/open64/lib/* $pkgdir/usr/lib
49   mv $pkgdir/usr/doc/EULA.txt $pkgdir/usr/share/licenses/cuda-toolkit/
50   mv $pkgdir/usr/doc/* $pkgdir/usr/share/doc/cuda-toolkit
51   mv $pkgdir/usr/man $pkgdir/usr/share/man
52   mv $pkgdir/usr/cudaprof/*.txt $pkgdir/usr/share/licenses/cuda-toolkit
53   mv $pkgdir/usr/cudaprof/doc/* $pkgdir/usr/share/doc/cuda-toolkit/cudaprof
54   rmdir $pkgdir/usr/cudaprof/doc
55   mv $pkgdir/usr/cudaprof/* $pkgdir/usr/share/cuda-prof
56   rm -rf $pkgdir/usr/doc
57   rm -rf $pkgdir/usr/man
58   rm -rf $pkgdir/usr/open64
59   rm -rf $pkgdir/usr/src
60   rm -rf $pkgdir/usr/cudaprof