blob: b620150edcad59281eef11996354984bbaf5623e (
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Maintainer: Ivan Lisenkov <ivan@ivlis.com>
pkgname=cuda-7.5
pkgver=7.5.18
pkgrel=5
pkgdesc="NVIDIA's GPU programming toolkit. Version 7.5"
arch=('x86_64')
url="http://www.nvidia.com/object/cuda_home.html"
license=('custom:NVIDIA')
conflicts=('cuda')
depends=('gcc-libs' 'opencl-nvidia' 'gcc5')
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.5/Prod/local_installers/cuda_${pkgver}_linux.run
cuda.sh
cuda.conf
cuda-findgllib_mk.diff)
md5sums=('4b3bcecf0dfc35928a0898793cf3e4c6'
'7e5990e03eea90075f5a500e91a0c3d3'
'71420ee4e90c65df21c6c5d34373c245'
'6476452a339c12d8ca18b5feb47100cc')
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'
# Fix up samples tht use findgllib_mk
for f in pkg/samples/*/*/findgllib.mk; do
patch $f cuda-findgllib_mk.diff
done
}
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 newer gccs to work
sed -i "/unsupported GNU/d" $pkgdir/opt/cuda/include/host_config.h
ln -s /usr/bin/gcc-5 "${pkgdir}/opt/cuda/bin/gcc"
ln -s /usr/bin/g++-5 "${pkgdir}/opt/cuda/bin/g++"
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"
}
|