# # Conditional build: %bcond_with prof # package computeprof (requires Qt < 4.7) # Summary: NVIDIA CUDA Toolkit Summary(pl.UTF-8): Zestaw narzędzi NVIDIA CUDA Name: cudatoolkit Version: 3.1 Release: 3 License: nVidia Binary Group: Applications Source0: http://developer.download.nvidia.com/compute/cuda/3_1/toolkit/%{name}_%{version}_linux_32_fedora12.run # Source0-md5: da98863cf8d538a083dd8958133f76a9 Source1: http://developer.download.nvidia.com/compute/cuda/3_1/toolkit/%{name}_%{version}_linux_64_fedora12.run # Source1-md5: 704b9b937526b758cf8e33817de64d35 URL: http://www.nvidia.com/object/cuda_home.html Requires: %{name}-libs = %{version}-%{release} %{?with_prof:Requires: qt4-assistant} Requires: xorg-driver-video-nvidia-libs >= 1:190.53-4 ExclusiveArch: %{ix86} %{x8664} BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description The CUDA™ architecture enables developers to leverage the massively parallel processing power of NVIDIA GPUs, delivering the performance of NVIDIA’s world-renowned graphics processor technology to general purpose GPU Computing. With the CUDA architecture and tools, developers are achieving dramatic speedups in fields such as medical imaging and natural resource exploration, and creating breakthrough applications in areas such as image recognition and real-time HD video playback and encoding. CUDA enables this unprecedented performance via standard APIs such OpenCL and DirectCompute, and high level programming languages such as C/C++, Fortran, Java, Python, and the Microsoft .NET Framework. ##description -l pl.UTF-8 %package libs Summary: NVIDIA CUDA libraries Summary(pl.UTF-8): Biblioteki NVIDIA CUDA Group: Libraries %description libs NVIDIA CUDA libraries. %description libs -l pl.UTF-8 Biblioteki NVIDIA CUDA. %prep %setup -qcT %ifarch %{ix86} /bin/sh %{SOURCE0} --noexec --keep %else /bin/sh %{SOURCE1} --noexec --keep %endif cp -a pkg/computeprof/doc pkg/computeprof/computeprof %build %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/cuda/prof/{doc,bin}} \ $RPM_BUILD_ROOT{%{_mandir}/man{1,3},%{_includedir}/cuda} \ $RPM_BUILD_ROOT%{_sysconfdir} install pkg/bin/* $RPM_BUILD_ROOT%{_bindir} cp -a pkg/%{_lib}/* $RPM_BUILD_ROOT%{_libdir} install pkg/man/man1/* $RPM_BUILD_ROOT%{_mandir}/man1 install pkg/man/man3/* $RPM_BUILD_ROOT%{_mandir}/man3 cp -a pkg/include/* $RPM_BUILD_ROOT%{_includedir}/cuda cp -a pkg/open64 $RPM_BUILD_ROOT%{_libdir}/cuda mv $RPM_BUILD_ROOT%{_bindir}/nvcc{,.bin} cat <$RPM_BUILD_ROOT%{_sysconfdir}/nvcc.conf INCLUDES="-I/usr/include/cuda" LIBRARIES="-lcudart" CUDAFE_FLAGS= OPENCC_FLAGS= PTXAS_FLAGS= EOF cat <$RPM_BUILD_ROOT%{_bindir}/nvcc #!/bin/sh . %{_sysconfdir}/nvcc.conf export INCLUDES LIBRARIES CUDAFE_FLAGS OPENCC_FLAGS PTXAS_FLAG exec %{_bindir}/nvcc.bin "\$@" EOF %if %{with prof} cp -a pkg/computeprof/doc/computeprof.{html,q*} $RPM_BUILD_ROOT%{_libdir}/cuda/prof/doc cp -a pkg/computeprof/doc/help.png $RPM_BUILD_ROOT%{_libdir}/cuda/prof/doc install pkg/computeprof/bin/computeprof $RPM_BUILD_ROOT%{_libdir}/cuda/prof/bin ln -s %{_libdir}/qt4/bin/assistant $RPM_BUILD_ROOT%{_libdir}/cuda/prof/bin/assistant ln -s %{_libdir}/cuda/prof/bin/computeprof $RPM_BUILD_ROOT%{_bindir}/computeprof %endif ln -s %{_libdir}/cuda/open64/bin/nvopencc $RPM_BUILD_ROOT%{_bindir}/nvopencc %clean rm -rf $RPM_BUILD_ROOT %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig %files %defattr(644,root,root,755) %doc pkg/doc/* pkg/bin/nvcc.profile %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nvcc.conf %attr(755,root,root) %{_bindir}/bin2c %attr(755,root,root) %{_bindir}/cuda-gdb %attr(755,root,root) %{_bindir}/cuda-memcheck %attr(755,root,root) %{_bindir}/cudafe* %attr(755,root,root) %{_bindir}/fatbin %attr(755,root,root) %{_bindir}/filehash %attr(755,root,root) %{_bindir}/nvcc %attr(755,root,root) %{_bindir}/nvcc.bin %attr(755,root,root) %{_bindir}/nvopencc %attr(755,root,root) %{_bindir}/ptxas %{_includedir}/cuda %dir %{_libdir}/cuda %if %{with prof} %doc pkg/computeprof/CUDA_Visual_Profiler_Release_Notes.txt pkg/computeprof/computeprof %dir %{_libdir}/cuda/prof %dir %{_libdir}/cuda/prof/bin %attr(755,root,root) %{_bindir}/computeprof %attr(755,root,root) %{_libdir}/cuda/prof/bin/* %{_libdir}/cuda/prof/doc %endif %dir %{_libdir}/cuda/open64 %dir %{_libdir}/cuda/open64/bin %dir %{_libdir}/cuda/open64/lib %attr(755,root,root) %{_libdir}/cuda/open64/bin/* %attr(755,root,root) %{_libdir}/cuda/open64/lib/* %attr(755,root,root) %{_libdir}/lib*.so %{_mandir}/man1/* %{_mandir}/man3/* %files libs %defattr(644,root,root,755) %attr(755,root,root) %ghost %{_libdir}/lib*.so.3 %attr(755,root,root) %{_libdir}/lib*.so.*.*