%global debug_package %{nil} %global __jar_repack 0 # Tweak to have debuginfo - part 1/2 %if 0%{?fedora} >= 7 || 0%{?rhel} >= 6 %define __debug_install_post %{_builddir}/%{?buildsubdir}/find-debuginfo.sh %{_builddir}/%{?buildsubdir}\ %{nil} %endif %if 0%{?fedora} %global pkgver fedora14 %endif %if 0%{?rhel} == 6 %global pkgver rhel6.0 %endif %if 0%{?rhel} == 5 %global pkgver rhel5.5 %endif Summary: NVIDIA CUDA Toolkit libraries Name: cudatoolkit Version: 4.1.21 Release: 1%{?dist} License: Redistributable, no modification permitted Group: Development/Languages URL: http://www.nvidia.com/cuda %if !0%{?rhel} Source0: http://developer.download.nvidia.com/compute/cuda/4_1/RC2/toolkit/%{name}_%{version}_linux_32_%{pkgver}.run %endif Source1: http://developer.download.nvidia.com/compute/cuda/4_1/RC2/toolkit/%{name}_%{version}_linux_64_%{pkgver}.run BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: chrpath ExclusiveArch: i686 x86_64 Requires: %{name}-libs = %{version}-%{release} Provides: cuda = %{version}-%{release} # Filter out provides %if 0%{?fedora} >= 15 %define __provides_exclude_from (%{_datadir}|%{_libdir}/cuda/libnvvp) %else %filter_provides_in (%{_datadir}|%{_libdir}/cuda/libnvvp) %endif %description NVIDIA(R)CUDA(TM) is a general purpose parallel computing architecture that leverages the parallel compute engine in NVIDIA graphics processing units (GPUs) to solve many complex computational problems in a fraction of the time required on a CPU. It includes the CUDA Instruction Set Architecture (ISA) and the parallel compute engine in the GPU. To program to the CUDATM architecture, developers can, today, use C, one of the most widely used high-level programming languages, which can then be run at great performance on a CUDATM enabled processor. Other languages will be supported in the future, including FORTRAN and C++. This package contains the libraries and attendant files needed to run programs that make use of CUDA. %package libs Summary: Libraries for %{name} Group: Development/Libraries %description libs This package contains libraries needed for running CUDA based applications. %ifarch x86_64 %package libs-32bit Summary: 32bit Libraries for %{name} Group: Development/Libraries %description libs-32bit This package contains libraries needed for running 32-bit CUDA based applications. %endif %package doc Summary: Documentation for CUDA Toolkit Group: Documentation %description doc Documentation for CUDA Toolkit %package extras Summary: Extra packages for CUDA Toolkit Group: Development/Tools %description extras Extra packages for CUDA Toolkit. Currently this includes CUPTI (CUDA Profiler Tools Interface) and Debugger interfaces %package profiler Summary: nVidia Visual Profiler Group: Development/Tools Requires: jre %description profiler nVidia Visual Profiler. %prep %setup -q -T -c %{name}-%{version} %build # Nothing to build echo "Nothing to build" %install rm -rf $RPM_BUILD_ROOT export TMPDIR=/var/tmp mkdir -p $RPM_BUILD_ROOT%{_libdir}/cuda %ifarch %{ix86} echo no | bash %{SOURCE0} -- --prefix=$RPM_BUILD_ROOT%{_libdir}/cuda %else echo no | bash %{SOURCE1} -- --prefix=$RPM_BUILD_ROOT%{_libdir}/cuda %endif # fix utf8 #iconv -f ISO88591 -t UTF8 < doc/NVIDIA_CUDA_Programming_Guide_Revision_History.txt > doc/NVIDIA_CUDA_Programming_Guide_Revision_History.txt.utf8 #touch -r doc/NVIDIA_CUDA_Programming_Guide_Revision_History.txt doc/NVIDIA_CUDA_Programming_Guide_Revision_History.txt.utf8 #mv -f doc/NVIDIA_CUDA_Programming_Guide_Revision_History.txt.utf8 doc/NVIDIA_CUDA_Programming_Guide_Revision_History.txt # Tweak to have debuginfo - part 2/2 %if 0%{?fedora} >= 7 || 0%{?rhel} >= 6 cp -p %{_prefix}/lib/rpm/find-debuginfo.sh . sed -i -e 's|strict=true|strict=false|' find-debuginfo.sh %endif # move to proper locations mkdir -p $RPM_BUILD_ROOT%{_includedir} mkdir -p $RPM_BUILD_ROOT%{_bindir} mkdir -p $RPM_BUILD_ROOT%{_datadir}/cuda mkdir -p $RPM_BUILD_ROOT%{_mandir} pushd $RPM_BUILD_ROOT%{_libdir}/cuda mv include $RPM_BUILD_ROOT%{_includedir}/cuda ln -s ../../include/cuda include mv doc src $RPM_BUILD_ROOT%{_datadir}/cuda pushd bin for x in * do mv $x $RPM_BUILD_ROOT%{_bindir} ln -s ../../../bin/$x $x done popd popd # Don't need the wrapper ln -sf ../%{_lib}/cuda/libnvvp/nvvp $RPM_BUILD_ROOT%{_bindir}/nvvp # Use system jre rm -rf $RPM_BUILD_ROOT%{_libdir}/cuda/libnvvp/jre ln -s ../../jvm/jre $RPM_BUILD_ROOT%{_libdir}/cuda/libnvvp/jre #Linker mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d echo %{_libdir}/cuda/%{_lib} > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/cuda-%{_arch}.conf %ifarch x86_64 echo %{_libdir}/cuda/lib > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/cuda-i386.conf %endif %clean rm -rf $RPM_BUILD_ROOT %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig %ifarch x86_64 %post libs-32bit -p /sbin/ldconfig %postun libs-32bit -p /sbin/ldconfig %endif %files %{_bindir}/bin2c %{_bindir}/cudafe %{_bindir}/cudafe++ %{_bindir}/cuda-gdb %{_bindir}/cuda-memcheck %{_bindir}/cuobjdump %{_bindir}/fatbin %{_bindir}/fatbinary %{_bindir}/filehash %{_bindir}/nvcc %{_bindir}/nvcc.profile %{_bindir}/ptxas %{_includedir}/cuda %dir %{_datadir}/cuda %{_datadir}/cuda/src %dir %{_libdir}/cuda %{_libdir}/cuda/bin %{_libdir}/cuda/include %{_libdir}/cuda/open64 %{_libdir}/cuda/nvvm %{_libdir}/cuda/tools %files libs %config(noreplace) %{_sysconfdir}/ld.so.conf.d/cuda-%{_arch}.conf %{_libdir}/cuda/%{_lib} %ifarch x86_64 %files libs-32bit %config(noreplace) %{_sysconfdir}/ld.so.conf.d/cuda-i386.conf %{_libdir}/cuda/lib %endif %files extras %{_libdir}/cuda/extras %files profiler %{_bindir}/nvvp %{_libdir}/cuda/libnvvp %files doc %{_datadir}/cuda/doc %changelog * Fri Dec 9 2011 Orion Poplawski - 4.1.21-1 - Update to 4.1.21 (RC2) * Tue Sep 28 2011 Orion Poplawski - 4.0.17-2 - Filter out provides * Thu May 26 2011 Orion Poplawski - 4.0.17-1 - Update to 4.0.17 (4.0 Final) * Thu Apr 7 2011 Orion Poplawski - 4.0.13-1 - Update to 4.0.13 (RC2) - Install primarily to %%{_libdir}cuda - Add computeprof subpackage - Add libs-32bit package on x86_64 for 32-bit libraries - Moves documentation to doc subpackage * Fri Apr 17 2009 Milos Jakubicek - 2.1-3 - Added ExclusiveArch for i386/i586 and x86_64 - Full source URL - Versioned provides: cuda - Proper ldconfig call for -libs subpackage - Headers moved into cudart subdirectory - Removed initscript which seems to be not necessary - Using alternatives to enable coexistence of multiple versions due to a versioned dependency on nvidia driver * Sun Apr 13 2009 Milos Jakubicek - 2.1-2 - Added %%{dist} tag - Removed -devel subpackage - Enable multilib by splitting the libraries into a -libs subpackage - Added R: -libs subpackage - Fixed installation on 32bit archs, safe usage of mv/rm/rmmod commands (|| :) - Fixed init script in order to enable uninstallation even if the module is not loaded - Changed RPM group - Proper macro usage - Preserving all timestamps - Enable debuginfo by making it not so strict (not requiring build id) * Sat Mar 21 2009 Milos Jakubicek - 2.1-1 - Initial package based on Mandriva package made by Lev Givon.