]>
Commit | Line | Data |
---|---|---|
2e3575d5 JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with prof # package computeprof (requires Qt < 4.7) | |
4 | # | |
427302e9 JR |
5 | Summary: NVIDIA CUDA Toolkit |
6 | Summary(pl.UTF-8): Zestaw narzędzi NVIDIA CUDA | |
7 | Name: cudatoolkit | |
2e3575d5 | 8 | Version: 3.1 |
6c89600a | 9 | Release: 3 |
427302e9 JR |
10 | License: nVidia Binary |
11 | Group: Applications | |
2e3575d5 JR |
12 | Source0: http://developer.download.nvidia.com/compute/cuda/3_1/toolkit/%{name}_%{version}_linux_32_fedora12.run |
13 | # Source0-md5: da98863cf8d538a083dd8958133f76a9 | |
14 | Source1: http://developer.download.nvidia.com/compute/cuda/3_1/toolkit/%{name}_%{version}_linux_64_fedora12.run | |
15 | # Source1-md5: 704b9b937526b758cf8e33817de64d35 | |
427302e9 JR |
16 | URL: http://www.nvidia.com/object/cuda_home.html |
17 | Requires: %{name}-libs = %{version}-%{release} | |
0c85644f | 18 | %{?with_prof:Requires: qt4-assistant} |
427302e9 JR |
19 | Requires: xorg-driver-video-nvidia-libs >= 1:190.53-4 |
20 | ExclusiveArch: %{ix86} %{x8664} | |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %description | |
261c7aa8 JR |
24 | The CUDA™ architecture enables developers to leverage the massively |
25 | parallel processing power of NVIDIA GPUs, delivering the performance | |
26 | of NVIDIA’s world-renowned graphics processor technology to general | |
27 | purpose GPU Computing. | |
427302e9 | 28 | |
261c7aa8 JR |
29 | With the CUDA architecture and tools, developers are achieving |
30 | dramatic speedups in fields such as medical imaging and natural | |
31 | resource exploration, and creating breakthrough applications in areas | |
32 | such as image recognition and real-time HD video playback and | |
33 | encoding. | |
34 | ||
35 | CUDA enables this unprecedented performance via standard APIs such | |
36 | OpenCL and DirectCompute, and high level programming languages such as | |
37 | C/C++, Fortran, Java, Python, and the Microsoft .NET Framework. | |
38 | ||
39 | ##description -l pl.UTF-8 | |
427302e9 JR |
40 | |
41 | %package libs | |
42 | Summary: NVIDIA CUDA libraries | |
43 | Summary(pl.UTF-8): Biblioteki NVIDIA CUDA | |
44 | Group: Libraries | |
45 | ||
46 | %description libs | |
47 | NVIDIA CUDA libraries. | |
48 | ||
49 | %description libs -l pl.UTF-8 | |
50 | Biblioteki NVIDIA CUDA. | |
51 | ||
52 | %prep | |
53 | %setup -qcT | |
54 | %ifarch %{ix86} | |
55 | /bin/sh %{SOURCE0} --noexec --keep | |
56 | %else | |
57 | /bin/sh %{SOURCE1} --noexec --keep | |
58 | %endif | |
59 | ||
2e3575d5 | 60 | cp -a pkg/computeprof/doc pkg/computeprof/computeprof |
427302e9 JR |
61 | |
62 | %build | |
63 | ||
64 | %install | |
65 | rm -rf $RPM_BUILD_ROOT | |
5d95f0df | 66 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/cuda/prof/{doc,bin}} \ |
0084e931 JR |
67 | $RPM_BUILD_ROOT{%{_mandir}/man{1,3},%{_includedir}/cuda} \ |
68 | $RPM_BUILD_ROOT%{_sysconfdir} | |
427302e9 JR |
69 | |
70 | install pkg/bin/* $RPM_BUILD_ROOT%{_bindir} | |
71 | cp -a pkg/%{_lib}/* $RPM_BUILD_ROOT%{_libdir} | |
72 | install pkg/man/man1/* $RPM_BUILD_ROOT%{_mandir}/man1 | |
73 | install pkg/man/man3/* $RPM_BUILD_ROOT%{_mandir}/man3 | |
74 | cp -a pkg/include/* $RPM_BUILD_ROOT%{_includedir}/cuda | |
75 | ||
5d95f0df | 76 | cp -a pkg/open64 $RPM_BUILD_ROOT%{_libdir}/cuda |
427302e9 | 77 | |
0084e931 JR |
78 | mv $RPM_BUILD_ROOT%{_bindir}/nvcc{,.bin} |
79 | cat <<EOF >$RPM_BUILD_ROOT%{_sysconfdir}/nvcc.conf | |
80 | INCLUDES="-I/usr/include/cuda" | |
81 | LIBRARIES="-lcudart" | |
82 | ||
83 | CUDAFE_FLAGS= | |
84 | OPENCC_FLAGS= | |
85 | PTXAS_FLAGS= | |
86 | EOF | |
87 | ||
88 | cat <<EOF >$RPM_BUILD_ROOT%{_bindir}/nvcc | |
89 | #!/bin/sh | |
90 | ||
91 | . %{_sysconfdir}/nvcc.conf | |
92 | ||
6c89600a JR |
93 | export INCLUDES LIBRARIES CUDAFE_FLAGS OPENCC_FLAGS PTXAS_FLAG |
94 | ||
0084e931 JR |
95 | exec %{_bindir}/nvcc.bin "\$@" |
96 | EOF | |
97 | ||
2e3575d5 JR |
98 | %if %{with prof} |
99 | cp -a pkg/computeprof/doc/computeprof.{html,q*} $RPM_BUILD_ROOT%{_libdir}/cuda/prof/doc | |
100 | cp -a pkg/computeprof/doc/help.png $RPM_BUILD_ROOT%{_libdir}/cuda/prof/doc | |
101 | install pkg/computeprof/bin/computeprof $RPM_BUILD_ROOT%{_libdir}/cuda/prof/bin | |
5d95f0df JR |
102 | |
103 | ln -s %{_libdir}/qt4/bin/assistant $RPM_BUILD_ROOT%{_libdir}/cuda/prof/bin/assistant | |
2e3575d5 JR |
104 | ln -s %{_libdir}/cuda/prof/bin/computeprof $RPM_BUILD_ROOT%{_bindir}/computeprof |
105 | %endif | |
106 | ||
5d95f0df | 107 | ln -s %{_libdir}/cuda/open64/bin/nvopencc $RPM_BUILD_ROOT%{_bindir}/nvopencc |
427302e9 JR |
108 | |
109 | %clean | |
110 | rm -rf $RPM_BUILD_ROOT | |
111 | ||
112 | %post libs -p /sbin/ldconfig | |
113 | %postun libs -p /sbin/ldconfig | |
114 | ||
115 | %files | |
116 | %defattr(644,root,root,755) | |
117 | %doc pkg/doc/* pkg/bin/nvcc.profile | |
0084e931 | 118 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nvcc.conf |
427302e9 JR |
119 | %attr(755,root,root) %{_bindir}/bin2c |
120 | %attr(755,root,root) %{_bindir}/cuda-gdb | |
2e3575d5 | 121 | %attr(755,root,root) %{_bindir}/cuda-memcheck |
427302e9 | 122 | %attr(755,root,root) %{_bindir}/cudafe* |
427302e9 JR |
123 | %attr(755,root,root) %{_bindir}/fatbin |
124 | %attr(755,root,root) %{_bindir}/filehash | |
125 | %attr(755,root,root) %{_bindir}/nvcc | |
0084e931 | 126 | %attr(755,root,root) %{_bindir}/nvcc.bin |
5d95f0df | 127 | %attr(755,root,root) %{_bindir}/nvopencc |
427302e9 JR |
128 | %attr(755,root,root) %{_bindir}/ptxas |
129 | %{_includedir}/cuda | |
5d95f0df | 130 | %dir %{_libdir}/cuda |
2e3575d5 JR |
131 | %if %{with prof} |
132 | %doc pkg/computeprof/CUDA_Visual_Profiler_Release_Notes.txt pkg/computeprof/computeprof | |
5d95f0df JR |
133 | %dir %{_libdir}/cuda/prof |
134 | %dir %{_libdir}/cuda/prof/bin | |
2e3575d5 | 135 | %attr(755,root,root) %{_bindir}/computeprof |
5d95f0df JR |
136 | %attr(755,root,root) %{_libdir}/cuda/prof/bin/* |
137 | %{_libdir}/cuda/prof/doc | |
2e3575d5 | 138 | %endif |
5d95f0df JR |
139 | %dir %{_libdir}/cuda/open64 |
140 | %dir %{_libdir}/cuda/open64/bin | |
141 | %dir %{_libdir}/cuda/open64/lib | |
142 | %attr(755,root,root) %{_libdir}/cuda/open64/bin/* | |
143 | %attr(755,root,root) %{_libdir}/cuda/open64/lib/* | |
427302e9 JR |
144 | %attr(755,root,root) %{_libdir}/lib*.so |
145 | %{_mandir}/man1/* | |
146 | %{_mandir}/man3/* | |
147 | ||
148 | %files libs | |
149 | %defattr(644,root,root,755) | |
2e3575d5 | 150 | %attr(755,root,root) %ghost %{_libdir}/lib*.so.3 |
427302e9 | 151 | %attr(755,root,root) %{_libdir}/lib*.so.*.* |