]>
Commit | Line | Data |
---|---|---|
2e3575d5 JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with prof # package computeprof (requires Qt < 4.7) | |
096b8e91 | 4 | |
427302e9 JR |
5 | Summary: NVIDIA CUDA Toolkit |
6 | Summary(pl.UTF-8): Zestaw narzędzi NVIDIA CUDA | |
7 | Name: cudatoolkit | |
fa7b7321 | 8 | Version: 4.0.17 |
87238f74 | 9 | Release: 1 |
427302e9 | 10 | License: nVidia Binary |
096b8e91 | 11 | Group: Development/Tools |
fa7b7321 JR |
12 | Source0: http://developer.download.nvidia.com/compute/cuda/4_0/toolkit/%{name}_%{version}_linux_32_ubuntu10.10.run |
13 | # Source0-md5: 8d025093ac6713eaa7dbffc8f3493606 | |
14 | Source1: http://developer.download.nvidia.com/compute/cuda/4_0/toolkit/%{name}_%{version}_linux_64_ubuntu10.10.run | |
15 | # Source1-md5: fb1f87e7a112545f6f07bc30e646bdf4 | |
16 | Source2: http://developer.download.nvidia.com/compute/cuda/4_0/sdk/gpucomputingsdk_%{version}_linux.run | |
17 | # Source2-md5: 07393c5eb702485deaa06a37747391ea | |
18 | Source3: http://developer.download.nvidia.com/compute/cuda/4_0/ToolsSDK/cudatools_%{version}_linux_32.run | |
19 | # Source3-md5: 6426892e521b931a18b57e3680b1cc4e | |
20 | Source4: http://developer.download.nvidia.com/compute/cuda/4_0/ToolsSDK/cudatools_%{version}_linux_64.run | |
21 | # Source4-md5: 1fc9673eccb604ed6e386397b995ec25 | |
427302e9 JR |
22 | URL: http://www.nvidia.com/object/cuda_home.html |
23 | Requires: %{name}-libs = %{version}-%{release} | |
0c85644f | 24 | %{?with_prof:Requires: qt4-assistant} |
427302e9 JR |
25 | Requires: xorg-driver-video-nvidia-libs >= 1:190.53-4 |
26 | ExclusiveArch: %{ix86} %{x8664} | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
f20b3777 JR |
29 | # libcublas and libcusparse indirectly use symbols from libdl |
30 | %define skip_post_check_so libcublas.so.* libcusparse.so.* | |
31 | ||
427302e9 | 32 | %description |
096b8e91 | 33 | The CUDA(tm) architecture enables developers to leverage the massively |
261c7aa8 | 34 | parallel processing power of NVIDIA GPUs, delivering the performance |
096b8e91 | 35 | of NVIDIA's world-renowned graphics processor technology to general |
261c7aa8 | 36 | purpose GPU Computing. |
427302e9 | 37 | |
261c7aa8 JR |
38 | With the CUDA architecture and tools, developers are achieving |
39 | dramatic speedups in fields such as medical imaging and natural | |
40 | resource exploration, and creating breakthrough applications in areas | |
41 | such as image recognition and real-time HD video playback and | |
42 | encoding. | |
43 | ||
44 | CUDA enables this unprecedented performance via standard APIs such | |
45 | OpenCL and DirectCompute, and high level programming languages such as | |
46 | C/C++, Fortran, Java, Python, and the Microsoft .NET Framework. | |
47 | ||
427302e9 JR |
48 | %package libs |
49 | Summary: NVIDIA CUDA libraries | |
50 | Summary(pl.UTF-8): Biblioteki NVIDIA CUDA | |
51 | Group: Libraries | |
52 | ||
53 | %description libs | |
54 | NVIDIA CUDA libraries. | |
55 | ||
56 | %description libs -l pl.UTF-8 | |
57 | Biblioteki NVIDIA CUDA. | |
58 | ||
f20b3777 JR |
59 | %package sdk |
60 | Summary: NVIDIA GPU Computing SDK | |
61 | Group: Libraries | |
62 | ||
63 | %description sdk | |
64 | The GPU Computing SDK includes 100+ code samples, utilities, | |
65 | whitepapers, and additional documentation to help you get started | |
66 | developing, porting, and optimizing your applications for the CUDA | |
67 | architecture. | |
68 | ||
427302e9 JR |
69 | %prep |
70 | %setup -qcT | |
71 | %ifarch %{ix86} | |
f20b3777 JR |
72 | /bin/sh %{SOURCE0} --noexec --keep --target toolkit |
73 | /bin/sh %{SOURCE3} --noexec --keep --target tools | |
427302e9 | 74 | %else |
f20b3777 JR |
75 | /bin/sh %{SOURCE1} --noexec --keep --target toolkit |
76 | /bin/sh %{SOURCE4} --noexec --keep --target tools | |
427302e9 | 77 | %endif |
f20b3777 JR |
78 | /bin/sh %{SOURCE2} --noexec --keep --target gpucomputing |
79 | ||
80 | cp -a toolkit/computeprof/doc toolkit/computeprof/computeprof | |
81 | cp -a tools/CUPTI/doc tools/CUPTI/CUPTI | |
82 | cp -a tools/Debugger/doc tools/Debugger/Debugger | |
83 | cp -a tools/NVML/doxygen tools/NVML/NVML | |
427302e9 | 84 | |
427302e9 JR |
85 | %install |
86 | rm -rf $RPM_BUILD_ROOT | |
5d95f0df | 87 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/cuda/prof/{doc,bin}} \ |
f20b3777 JR |
88 | $RPM_BUILD_ROOT%{_includedir}/cuda/{CUPTI,Debugger,NVML} \ |
89 | $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/CUPTI \ | |
90 | $RPM_BUILD_ROOT%{_usrsrc}/%{name}-sdk-%{version} \ | |
0084e931 | 91 | $RPM_BUILD_ROOT%{_sysconfdir} |
427302e9 | 92 | |
f20b3777 JR |
93 | install -p toolkit/bin/* $RPM_BUILD_ROOT%{_bindir} |
94 | cp -a toolkit/%{_lib}/* $RPM_BUILD_ROOT%{_libdir} | |
95 | cp -a tools/CUPTI/lib/* $RPM_BUILD_ROOT%{_libdir} | |
427302e9 | 96 | |
f20b3777 JR |
97 | cp -a toolkit/include/* $RPM_BUILD_ROOT%{_includedir}/cuda |
98 | cp -a tools/CUPTI/include/* $RPM_BUILD_ROOT%{_includedir}/cuda/CUPTI | |
99 | cp -a tools/Debugger/include/* $RPM_BUILD_ROOT%{_includedir}/cuda/Debugger | |
100 | cp -a tools/NVML/*.h $RPM_BUILD_ROOT%{_includedir}/cuda/NVML | |
101 | ||
102 | cp -a toolkit/open64 $RPM_BUILD_ROOT%{_libdir}/cuda | |
103 | ||
104 | cp -a toolkit/src/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
105 | cp -a tools/CUPTI/sample/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/CUPTI | |
106 | ||
107 | cp -a gpucomputing/sdk/* $RPM_BUILD_ROOT%{_usrsrc}/%{name}-sdk-%{version} | |
427302e9 | 108 | |
0084e931 | 109 | mv $RPM_BUILD_ROOT%{_bindir}/nvcc{,.bin} |
096b8e91 | 110 | cat <<'EOF' >$RPM_BUILD_ROOT%{_sysconfdir}/nvcc.conf |
0084e931 JR |
111 | INCLUDES="-I/usr/include/cuda" |
112 | LIBRARIES="-lcudart" | |
113 | ||
114 | CUDAFE_FLAGS= | |
115 | OPENCC_FLAGS= | |
116 | PTXAS_FLAGS= | |
117 | EOF | |
118 | ||
096b8e91 | 119 | cat <<'EOF' >$RPM_BUILD_ROOT%{_bindir}/nvcc |
0084e931 | 120 | #!/bin/sh |
0084e931 JR |
121 | . %{_sysconfdir}/nvcc.conf |
122 | ||
6c89600a JR |
123 | export INCLUDES LIBRARIES CUDAFE_FLAGS OPENCC_FLAGS PTXAS_FLAG |
124 | ||
096b8e91 | 125 | exec %{_bindir}/nvcc.bin "$@" |
0084e931 JR |
126 | EOF |
127 | ||
2e3575d5 | 128 | %if %{with prof} |
f20b3777 JR |
129 | cp -a toolkit/computeprof/doc/computeprof.{html,q*} $RPM_BUILD_ROOT%{_libdir}/cuda/prof/doc |
130 | cp -a toolkit/computeprof/doc/help.png $RPM_BUILD_ROOT%{_libdir}/cuda/prof/doc | |
131 | install -p toolkit/computeprof/bin/computeprof $RPM_BUILD_ROOT%{_libdir}/cuda/prof/bin | |
5d95f0df JR |
132 | |
133 | ln -s %{_libdir}/qt4/bin/assistant $RPM_BUILD_ROOT%{_libdir}/cuda/prof/bin/assistant | |
2e3575d5 JR |
134 | ln -s %{_libdir}/cuda/prof/bin/computeprof $RPM_BUILD_ROOT%{_bindir}/computeprof |
135 | %endif | |
136 | ||
5d95f0df | 137 | ln -s %{_libdir}/cuda/open64/bin/nvopencc $RPM_BUILD_ROOT%{_bindir}/nvopencc |
427302e9 JR |
138 | |
139 | %clean | |
140 | rm -rf $RPM_BUILD_ROOT | |
141 | ||
096b8e91 | 142 | %post libs -p /sbin/ldconfig |
427302e9 JR |
143 | %postun libs -p /sbin/ldconfig |
144 | ||
145 | %files | |
146 | %defattr(644,root,root,755) | |
f20b3777 JR |
147 | %doc toolkit/doc/* toolkit/bin/nvcc.profile |
148 | %doc tools/CUPTI/CUPTI tools/Debugger/Debugger tools/NVML/NVML | |
0084e931 | 149 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nvcc.conf |
427302e9 JR |
150 | %attr(755,root,root) %{_bindir}/bin2c |
151 | %attr(755,root,root) %{_bindir}/cuda-gdb | |
2e3575d5 | 152 | %attr(755,root,root) %{_bindir}/cuda-memcheck |
427302e9 | 153 | %attr(755,root,root) %{_bindir}/cudafe* |
f20b3777 JR |
154 | %attr(755,root,root) %{_bindir}/cuobjdump |
155 | %attr(755,root,root) %{_bindir}/fatbin* | |
427302e9 JR |
156 | %attr(755,root,root) %{_bindir}/filehash |
157 | %attr(755,root,root) %{_bindir}/nvcc | |
0084e931 | 158 | %attr(755,root,root) %{_bindir}/nvcc.bin |
5d95f0df | 159 | %attr(755,root,root) %{_bindir}/nvopencc |
427302e9 JR |
160 | %attr(755,root,root) %{_bindir}/ptxas |
161 | %{_includedir}/cuda | |
5d95f0df | 162 | %dir %{_libdir}/cuda |
2e3575d5 | 163 | %if %{with prof} |
f20b3777 | 164 | %doc toolkit/computeprof/CUDA_Visual_Profiler_Release_Notes.txt toolkit/computeprof/computeprof |
5d95f0df JR |
165 | %dir %{_libdir}/cuda/prof |
166 | %dir %{_libdir}/cuda/prof/bin | |
2e3575d5 | 167 | %attr(755,root,root) %{_bindir}/computeprof |
5d95f0df JR |
168 | %attr(755,root,root) %{_libdir}/cuda/prof/bin/* |
169 | %{_libdir}/cuda/prof/doc | |
2e3575d5 | 170 | %endif |
5d95f0df JR |
171 | %dir %{_libdir}/cuda/open64 |
172 | %dir %{_libdir}/cuda/open64/bin | |
173 | %dir %{_libdir}/cuda/open64/lib | |
174 | %attr(755,root,root) %{_libdir}/cuda/open64/bin/* | |
175 | %attr(755,root,root) %{_libdir}/cuda/open64/lib/* | |
096b8e91 ER |
176 | %{_libdir}/libcublas.so |
177 | %{_libdir}/libcudart.so | |
178 | %{_libdir}/libcufft.so | |
f20b3777 JR |
179 | %{_libdir}/libcupti.so |
180 | %{_libdir}/libcurand.so | |
181 | %{_libdir}/libcusparse.so | |
182 | %{_libdir}/libnpp.so | |
183 | %{_examplesdir}/%{name}-%{version} | |
427302e9 JR |
184 | |
185 | %files libs | |
186 | %defattr(644,root,root,755) | |
f20b3777 | 187 | %ghost %{_libdir}/libcublas.so.4 |
096b8e91 | 188 | %attr(755,root,root) %{_libdir}/libcublas.so.*.*.* |
f20b3777 | 189 | %ghost %{_libdir}/libcudart.so.4 |
096b8e91 | 190 | %attr(755,root,root) %{_libdir}/libcudart.so.*.*.* |
f20b3777 | 191 | %ghost %{_libdir}/libcufft.so.4 |
096b8e91 | 192 | %attr(755,root,root) %{_libdir}/libcufft.so.*.*.* |
f20b3777 JR |
193 | %ghost %{_libdir}/libcupti.so.4 |
194 | %attr(755,root,root) %{_libdir}/libcupti.so.*.*.* | |
195 | %ghost %{_libdir}/libcurand.so.4 | |
196 | %attr(755,root,root) %{_libdir}/libcurand.so.*.*.* | |
197 | %ghost %{_libdir}/libcusparse.so.4 | |
198 | %attr(755,root,root) %{_libdir}/libcusparse.so.*.*.* | |
199 | %ghost %{_libdir}/libnpp.so.4 | |
200 | %attr(755,root,root) %{_libdir}/libnpp.so.*.*.* | |
201 | ||
202 | %files sdk | |
203 | %defattr(644,root,root,755) | |
204 | %{_usrsrc}/%{name}-sdk-%{version} |