]> git.pld-linux.org Git - packages/cudatoolkit.git/blob - cudatoolkit.spec
- rel 1
[packages/cudatoolkit.git] / cudatoolkit.spec
1 #
2 # Conditional build:
3 %bcond_with     prof            # package computeprof (requires Qt < 4.7)
4
5 Summary:        NVIDIA CUDA Toolkit
6 Summary(pl.UTF-8):      Zestaw narzÄ™dzi NVIDIA CUDA
7 Name:           cudatoolkit
8 Version:        4.0.17
9 Release:        1
10 License:        nVidia Binary
11 Group:          Development/Tools
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
22 URL:            http://www.nvidia.com/object/cuda_home.html
23 Requires:       %{name}-libs = %{version}-%{release}
24 %{?with_prof:Requires:  qt4-assistant}
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 # libcublas and libcusparse indirectly use symbols from libdl
30 %define         skip_post_check_so      libcublas.so.* libcusparse.so.*
31
32 %description
33 The CUDA(tm) architecture enables developers to leverage the massively
34 parallel processing power of NVIDIA GPUs, delivering the performance
35 of NVIDIA's world-renowned graphics processor technology to general
36 purpose GPU Computing.
37
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
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
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
69 %prep
70 %setup -qcT
71 %ifarch %{ix86}
72 /bin/sh %{SOURCE0} --noexec --keep --target toolkit
73 /bin/sh %{SOURCE3} --noexec --keep --target tools
74 %else
75 /bin/sh %{SOURCE1} --noexec --keep --target toolkit
76 /bin/sh %{SOURCE4} --noexec --keep --target tools
77 %endif
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
84
85 %install
86 rm -rf $RPM_BUILD_ROOT
87 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/cuda/prof/{doc,bin}} \
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} \
91         $RPM_BUILD_ROOT%{_sysconfdir}
92
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}
96
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}
108
109 mv $RPM_BUILD_ROOT%{_bindir}/nvcc{,.bin}
110 cat <<'EOF' >$RPM_BUILD_ROOT%{_sysconfdir}/nvcc.conf
111 INCLUDES="-I/usr/include/cuda"
112 LIBRARIES="-lcudart"
113
114 CUDAFE_FLAGS=
115 OPENCC_FLAGS=
116 PTXAS_FLAGS=
117 EOF
118
119 cat <<'EOF' >$RPM_BUILD_ROOT%{_bindir}/nvcc
120 #!/bin/sh
121 . %{_sysconfdir}/nvcc.conf
122
123 export INCLUDES LIBRARIES CUDAFE_FLAGS OPENCC_FLAGS PTXAS_FLAG
124
125 exec %{_bindir}/nvcc.bin "$@"
126 EOF
127
128 %if %{with prof}
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
132
133 ln -s %{_libdir}/qt4/bin/assistant $RPM_BUILD_ROOT%{_libdir}/cuda/prof/bin/assistant
134 ln -s %{_libdir}/cuda/prof/bin/computeprof $RPM_BUILD_ROOT%{_bindir}/computeprof
135 %endif
136
137 ln -s %{_libdir}/cuda/open64/bin/nvopencc $RPM_BUILD_ROOT%{_bindir}/nvopencc
138
139 %clean
140 rm -rf $RPM_BUILD_ROOT
141
142 %post   libs -p /sbin/ldconfig
143 %postun libs -p /sbin/ldconfig
144
145 %files
146 %defattr(644,root,root,755)
147 %doc toolkit/doc/* toolkit/bin/nvcc.profile
148 %doc tools/CUPTI/CUPTI  tools/Debugger/Debugger  tools/NVML/NVML
149 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nvcc.conf
150 %attr(755,root,root) %{_bindir}/bin2c
151 %attr(755,root,root) %{_bindir}/cuda-gdb
152 %attr(755,root,root) %{_bindir}/cuda-memcheck
153 %attr(755,root,root) %{_bindir}/cudafe*
154 %attr(755,root,root) %{_bindir}/cuobjdump
155 %attr(755,root,root) %{_bindir}/fatbin*
156 %attr(755,root,root) %{_bindir}/filehash
157 %attr(755,root,root) %{_bindir}/nvcc
158 %attr(755,root,root) %{_bindir}/nvcc.bin
159 %attr(755,root,root) %{_bindir}/nvopencc
160 %attr(755,root,root) %{_bindir}/ptxas
161 %{_includedir}/cuda
162 %dir %{_libdir}/cuda
163 %if %{with prof}
164 %doc toolkit/computeprof/CUDA_Visual_Profiler_Release_Notes.txt toolkit/computeprof/computeprof
165 %dir %{_libdir}/cuda/prof
166 %dir %{_libdir}/cuda/prof/bin
167 %attr(755,root,root) %{_bindir}/computeprof
168 %attr(755,root,root) %{_libdir}/cuda/prof/bin/*
169 %{_libdir}/cuda/prof/doc
170 %endif
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/*
176 %{_libdir}/libcublas.so
177 %{_libdir}/libcudart.so
178 %{_libdir}/libcufft.so
179 %{_libdir}/libcupti.so
180 %{_libdir}/libcurand.so
181 %{_libdir}/libcusparse.so
182 %{_libdir}/libnpp.so
183 %{_examplesdir}/%{name}-%{version}
184
185 %files libs
186 %defattr(644,root,root,755)
187 %ghost %{_libdir}/libcublas.so.4
188 %attr(755,root,root) %{_libdir}/libcublas.so.*.*.*
189 %ghost %{_libdir}/libcudart.so.4
190 %attr(755,root,root) %{_libdir}/libcudart.so.*.*.*
191 %ghost %{_libdir}/libcufft.so.4
192 %attr(755,root,root) %{_libdir}/libcufft.so.*.*.*
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}
This page took 0.080097 seconds and 3 git commands to generate.