updated on Thu Jan 19 00:16:31 UTC 2012
[aur-mirror.git] / cuda-sdk-old / PKGBUILD
blob23c49e69476243bdc743960eb1044b55f272d731
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>
5 pkgname=cuda-sdk-old
6 pkgver=2.2
7 _pkgver=2.2
8 pkgrel=1
9 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."
10 arch=('i686' 'x86_64')
11 [ "$CARCH" = "i686"   ] && ARCH=x86
12 [ "$CARCH" = "x86_64" ] && ARCH=x86_64
13 url="http://www.nvidia.com/object/cuda_home.html"
14 license=('custom')
15 depends=('cuda-toolkit-old'
16          'freeglut'
17          'gcc43')
18 source=(http://developer.download.nvidia.com/compute/cuda/2_2/sdk/cudasdk_${_pkgver}_linux.run
19         common.mk.patch)
20 md5sums=('6ba1f419a88139530c0e82176bb1a8af' 'fa0a2c93ecc9bcdca8ce4c644572d62a')
21 build() {
22   #Make directories
23   mkdir -p $pkgdir/usr/share/licenses/cuda-sdk
24   mkdir -p $pkgdir/usr/share/doc/cuda-sdk
25   mkdir -p $pkgdir/usr/share/cuda-sdk/bin
26   mkdir -p $pkgdir/usr/share/cuda-sdk/lib
27   mkdir -p $pkgdir/usr/share/cuda-sdk/releaseNotesData
28   mkdir -p $pkgdir/usr/share/cuda-sdk/tools
30   #Create links for gcc-3.4 build environment
31   mkdir -p $pkgdir/usr/share/cuda-sdk/bin
32   ln -s /usr/bin/gcc-4.3 $pkgdir/usr/share/cuda-sdk/bin/gcc
33   ln -s /usr/bin/g++-4.3 $pkgdir/usr/share/cuda-sdk/bin/g++  
35   #Extract the SDK
36   cd $srcdir
37   sh cudasdk_${_pkgver}_linux.run --noexec --keep --nox11 &> /dev/null
38   
39   #Build the SDK
40   patch -p0 -i $srcdir/common.mk.patch || return 1
41   sed -i 's|GCC34DIR|'"$pkgdir"'/usr/share/cuda-sdk/bin|' $srcdir/pkg/sdk/common/common.mk
42   #echo "check x86 patch"
43   #read   
44   cd $srcdir/pkg/sdk
45   CUDA_INSTALL_PATH=/usr make || return 1
46   
47   #Copy over folders
48   cp -rf $srcdir/pkg/sdk/ $pkgdir/usr/share/cuda-sdk
50   #Install the files
51   install -m 755 $srcdir/pkg/sdk/bin/linux/release/* $pkgdir/usr/share/cuda-sdk/bin
52   mv $srcdir/pkg/sdk/doc/cudpp_license.txt $pkgdir/usr/share/licenses/cuda-sdk
53   mv $srcdir/pkg/sdk/doc/license.txt $pkgdir/usr/share/licenses/cuda-sdk
54   install -m 644 $srcdir/pkg/sdk/doc/* $pkgdir/usr/share/doc/cuda-sdk
57 #TODO: dxtc & simpleTexture must run as root since the data directory is not writable by default
58 #TODO: matrixMulDrv & simpleTexture are not passing tests