]>
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 JR |
8 | Version: 4.0.17 |
9 | Release: 0.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 | ||
29 | %description | |
096b8e91 | 30 | The CUDA(tm) architecture enables developers to leverage the massively |
261c7aa8 | 31 | parallel processing power of NVIDIA GPUs, delivering the performance |
096b8e91 | 32 | of NVIDIA's world-renowned graphics processor technology to general |
261c7aa8 | 33 | purpose GPU Computing. |
427302e9 | 34 | |
261c7aa8 JR |
35 | With the CUDA architecture and tools, developers are achieving |
36 | dramatic speedups in fields such as medical imaging and natural | |
37 | resource exploration, and creating breakthrough applications in areas | |
38 | such as image recognition and real-time HD video playback and | |
39 | encoding. | |
40 | ||
41 | CUDA enables this unprecedented performance via standard APIs such | |
42 | OpenCL and DirectCompute, and high level programming languages such as | |
43 | C/C++, Fortran, Java, Python, and the Microsoft .NET Framework. | |
44 | ||
427302e9 JR |
45 | %package libs |
46 | Summary: NVIDIA CUDA libraries | |
47 | Summary(pl.UTF-8): Biblioteki NVIDIA CUDA | |
48 | Group: Libraries | |
49 | ||
50 | %description libs | |
51 | NVIDIA CUDA libraries. | |
52 | ||
53 | %description libs -l pl.UTF-8 | |
54 | Biblioteki NVIDIA CUDA. | |
55 | ||
56 | %prep | |
57 | %setup -qcT | |
58 | %ifarch %{ix86} | |
59 | /bin/sh %{SOURCE0} --noexec --keep | |
fa7b7321 | 60 | /bin/sh %{SOURCE3} --noexec --keep |
427302e9 JR |
61 | %else |
62 | /bin/sh %{SOURCE1} --noexec --keep | |
fa7b7321 | 63 | /bin/sh %{SOURCE4} --noexec --keep |
427302e9 | 64 | %endif |
fa7b7321 | 65 | /bin/sh %{SOURCE2} --noexec --keep |
2e3575d5 | 66 | cp -a pkg/computeprof/doc pkg/computeprof/computeprof |
427302e9 | 67 | |
427302e9 JR |
68 | %install |
69 | rm -rf $RPM_BUILD_ROOT | |
5d95f0df | 70 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/cuda/prof/{doc,bin}} \ |
0084e931 JR |
71 | $RPM_BUILD_ROOT{%{_mandir}/man{1,3},%{_includedir}/cuda} \ |
72 | $RPM_BUILD_ROOT%{_sysconfdir} | |
427302e9 | 73 | |
096b8e91 | 74 | install -p pkg/bin/* $RPM_BUILD_ROOT%{_bindir} |
427302e9 | 75 | cp -a pkg/%{_lib}/* $RPM_BUILD_ROOT%{_libdir} |
096b8e91 ER |
76 | cp -p pkg/man/man1/* $RPM_BUILD_ROOT%{_mandir}/man1 |
77 | cp -p pkg/man/man3/* $RPM_BUILD_ROOT%{_mandir}/man3 | |
427302e9 JR |
78 | cp -a pkg/include/* $RPM_BUILD_ROOT%{_includedir}/cuda |
79 | ||
5d95f0df | 80 | cp -a pkg/open64 $RPM_BUILD_ROOT%{_libdir}/cuda |
427302e9 | 81 | |
0084e931 | 82 | mv $RPM_BUILD_ROOT%{_bindir}/nvcc{,.bin} |
096b8e91 | 83 | cat <<'EOF' >$RPM_BUILD_ROOT%{_sysconfdir}/nvcc.conf |
0084e931 JR |
84 | INCLUDES="-I/usr/include/cuda" |
85 | LIBRARIES="-lcudart" | |
86 | ||
87 | CUDAFE_FLAGS= | |
88 | OPENCC_FLAGS= | |
89 | PTXAS_FLAGS= | |
90 | EOF | |
91 | ||
096b8e91 | 92 | cat <<'EOF' >$RPM_BUILD_ROOT%{_bindir}/nvcc |
0084e931 | 93 | #!/bin/sh |
0084e931 JR |
94 | . %{_sysconfdir}/nvcc.conf |
95 | ||
6c89600a JR |
96 | export INCLUDES LIBRARIES CUDAFE_FLAGS OPENCC_FLAGS PTXAS_FLAG |
97 | ||
096b8e91 | 98 | exec %{_bindir}/nvcc.bin "$@" |
0084e931 JR |
99 | EOF |
100 | ||
2e3575d5 JR |
101 | %if %{with prof} |
102 | cp -a pkg/computeprof/doc/computeprof.{html,q*} $RPM_BUILD_ROOT%{_libdir}/cuda/prof/doc | |
103 | cp -a pkg/computeprof/doc/help.png $RPM_BUILD_ROOT%{_libdir}/cuda/prof/doc | |
096b8e91 | 104 | install -p pkg/computeprof/bin/computeprof $RPM_BUILD_ROOT%{_libdir}/cuda/prof/bin |
5d95f0df JR |
105 | |
106 | ln -s %{_libdir}/qt4/bin/assistant $RPM_BUILD_ROOT%{_libdir}/cuda/prof/bin/assistant | |
2e3575d5 JR |
107 | ln -s %{_libdir}/cuda/prof/bin/computeprof $RPM_BUILD_ROOT%{_bindir}/computeprof |
108 | %endif | |
109 | ||
5d95f0df | 110 | ln -s %{_libdir}/cuda/open64/bin/nvopencc $RPM_BUILD_ROOT%{_bindir}/nvopencc |
427302e9 JR |
111 | |
112 | %clean | |
113 | rm -rf $RPM_BUILD_ROOT | |
114 | ||
096b8e91 | 115 | %post libs -p /sbin/ldconfig |
427302e9 JR |
116 | %postun libs -p /sbin/ldconfig |
117 | ||
118 | %files | |
119 | %defattr(644,root,root,755) | |
120 | %doc pkg/doc/* pkg/bin/nvcc.profile | |
0084e931 | 121 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nvcc.conf |
427302e9 JR |
122 | %attr(755,root,root) %{_bindir}/bin2c |
123 | %attr(755,root,root) %{_bindir}/cuda-gdb | |
2e3575d5 | 124 | %attr(755,root,root) %{_bindir}/cuda-memcheck |
427302e9 | 125 | %attr(755,root,root) %{_bindir}/cudafe* |
427302e9 JR |
126 | %attr(755,root,root) %{_bindir}/fatbin |
127 | %attr(755,root,root) %{_bindir}/filehash | |
128 | %attr(755,root,root) %{_bindir}/nvcc | |
0084e931 | 129 | %attr(755,root,root) %{_bindir}/nvcc.bin |
5d95f0df | 130 | %attr(755,root,root) %{_bindir}/nvopencc |
427302e9 JR |
131 | %attr(755,root,root) %{_bindir}/ptxas |
132 | %{_includedir}/cuda | |
5d95f0df | 133 | %dir %{_libdir}/cuda |
2e3575d5 JR |
134 | %if %{with prof} |
135 | %doc pkg/computeprof/CUDA_Visual_Profiler_Release_Notes.txt pkg/computeprof/computeprof | |
5d95f0df JR |
136 | %dir %{_libdir}/cuda/prof |
137 | %dir %{_libdir}/cuda/prof/bin | |
2e3575d5 | 138 | %attr(755,root,root) %{_bindir}/computeprof |
5d95f0df JR |
139 | %attr(755,root,root) %{_libdir}/cuda/prof/bin/* |
140 | %{_libdir}/cuda/prof/doc | |
2e3575d5 | 141 | %endif |
5d95f0df JR |
142 | %dir %{_libdir}/cuda/open64 |
143 | %dir %{_libdir}/cuda/open64/bin | |
144 | %dir %{_libdir}/cuda/open64/lib | |
145 | %attr(755,root,root) %{_libdir}/cuda/open64/bin/* | |
146 | %attr(755,root,root) %{_libdir}/cuda/open64/lib/* | |
096b8e91 ER |
147 | %{_libdir}/libcublas.so |
148 | %{_libdir}/libcudart.so | |
149 | %{_libdir}/libcufft.so | |
427302e9 JR |
150 | %{_mandir}/man1/* |
151 | %{_mandir}/man3/* | |
152 | ||
153 | %files libs | |
154 | %defattr(644,root,root,755) | |
096b8e91 ER |
155 | %ghost %{_libdir}/libcublas.so.3 |
156 | %attr(755,root,root) %{_libdir}/libcublas.so.*.*.* | |
157 | %ghost %{_libdir}/libcudart.so.3 | |
158 | %attr(755,root,root) %{_libdir}/libcudart.so.*.*.* | |
159 | %ghost %{_libdir}/libcufft.so.3 | |
160 | %attr(755,root,root) %{_libdir}/libcufft.so.*.*.* |