%define debug_package %{nil} %define _atlas_pkg ATLAS %define _atlas_builddir_static %{_atlas_pkg}_static %define _atlas_builddir_shared %{_atlas_pkg}_shared %define _soversionmajor 3 %define _soversionminor 0 %define _lapack_pkg lapack-3.1.1 %define _lapack_builddir_static %{_lapack_pkg}_static %define _lapack_builddir_shared %{_lapack_pkg}_shared %define _lapack_make_inc make.inc.64 Name: atlas Version: 3.8.2 Release: 2 Summary: Automatically Tuned Linear Algebra Software Group: System Environment/Libraries License: BSD URL: http://math-atlas.sourceforge.net Source0: %{name}%{version}.tar.bz2 Source1: lapack-3.1.1.tgz Source2: make.inc.64 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExclusiveArch: x86_64 Requires: %{_sysconfdir}/ld.so.conf.d Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig Requires: gawk Requires: grep Requires: coreutils Requires: util-linux BuildRequires: gcc-gfortran gcc coreutils sed %description The ATLAS (Automatically Tuned Linear Algebra Software) project is an ongoing research effort focusing on applying empirical techniques in order to provide portable performance. At present, it provides C and Fortran77 interfaces to a portably efficient BLAS implementation, as well as a few routines from LAPACK. The performance improvements in ATLAS are obtained largely via compile-time optimizations and tend to be specific to a given hardware configuration. In order to package ATLAS for Fedora some compromises are necessary so that good performance can be obtained on a variety of hardware. This set of ATLAS binary packages is therefore not necessarily optimal for any specific hardware configuration. However, the source package can be used to compile customized ATLAS packages; see the documentation for information. %package devel Summary: Development libraries for ATLAS Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel This package contains the static libraries and headers for development with ATLAS (Automatically Tuned Linear Algebra Software). ############## #%if "%{?enable_custom_atlas}" == "1" # This flag enables building customized ATLAS libraries with all # compile-time optimizations. Note that compilation will take a very # long time, and that the resulting binaries are not guaranteed to # work well or even at all on other hardware. #%define archt %{_arch} #%define types custom #%package custom #Summary: Custom-compiled ATLAS libraries #Group: System Environment/Libraries #%description custom #This package contains the ATLAS (Automatically Tuned Linear Algebra #Software) libraries compiled with all compile-time optimizations enabled. #%package custom-devel #Summary: Development libraries for ATLAS with AltiVec extensions #Group: Development/Libraries #Requires: %{name}-custom = %{version}-%{release} #%description custom-devel #This package contains headers and static versions of the ATLAS #(Automatically Tuned Linear Algebra Software) libraries compiled with #all compile-time optimizations enabled. #%endif ################# %prep %setup -c -T %build # Step 0a - Build LAPACK (for static ATLAS lib) cp %{SOURCE1} . cp %{SOURCE2} . tar xzf %{_lapack_pkg}.tgz mv -f %{_lapack_pkg} %{_lapack_builddir_static} cp -f %{_lapack_make_inc} %{_lapack_builddir_static}/make.inc ( cd %{_lapack_builddir_static}; sed -i -e 's/-fPIC//g' make.inc; make lib ) _cwd=`pwd` _lapack_static_lib="${_cwd}/%{_lapack_builddir_static}/lapack_LINUX.a" # Step 0b - Build LAPACK (for shared ATLAS lib) tar xzf %{_lapack_pkg}.tgz mv -f %{_lapack_pkg} %{_lapack_builddir_shared} cp -f %{_lapack_make_inc} %{_lapack_builddir_shared}/make.inc ( cd %{_lapack_builddir_shared}; make lib ) _cwd=`pwd` _lapack_shared_lib="${_cwd}/%{_lapack_builddir_shared}/lapack_LINUX.a" # Step 1a - Build ATLAS (static lib) cp %{SOURCE0} . tar -xjf %{name}%{version}.tar.bz2 cd ATLAS mkdir -p %{_atlas_builddir_static} ( cd %{_atlas_builddir_static}; ../configure -A 17 -Si cputhrchk 0 --with-netlib-lapack=${_lapack_static_lib}; # remove 3DNow opt, if it was detected (amd build machine) sed -i -e 's/-DATL_3DNow//g' Make.inc make build; make check; make time; ) # Step 1b - Build ATLAS (shared lib) mkdir -p %{_atlas_builddir_shared} ( cd %{_atlas_builddir_shared}; ../configure -A 17 -Fa alg -fPIC -Si cputhrchk 0 --with-netlib-lapack=${_lapack_shared_lib}; # remove 3DNow opt, if it was detected (amd build machine) sed -i -e 's/-DATL_3DNow//g' Make.inc make build; make check; make time; cd lib; make shared; for lib in libatlas.so liblapack.so libf77blas.so libcblas.so; do mv $lib ${lib}.%{_soversionmajor}.%{_soversionminor} ln -s ${lib}.%{_soversionmajor}.%{_soversionminor} \ ${lib}.%{_soversionmajor} ln -s ${lib}.%{_soversionmajor}.%{_soversionminor} ${lib} done ) %install rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/ld.so.conf.d/%{name} mkdir -p ${RPM_BUILD_ROOT}%{_includedir}/%{name} mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/%{name} mkdir -p ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-%{version} cd ATLAS/%{_atlas_builddir_shared} cd .. cp -a include/*.h ${RPM_BUILD_ROOT}%{_includedir}/%{name} cp -a doc/* ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-%{version} echo "%{_libdir}/%{name}" > ${RPM_BUILD_ROOT}%{_sysconfdir}/ld.so.conf.d/%{name}.conf ( cd %{_atlas_builddir_static}; cp -a lib/*.a ${RPM_BUILD_ROOT}%{_libdir}/%{name} ) ( cd %{_atlas_builddir_shared}; cp -a lib/*.so* ${RPM_BUILD_ROOT}%{_libdir}/%{name} ) %files %defattr(-,root,root,-) %dir %{_libdir}/%{name} %{_libdir}/%{name}/*.so* %{_sysconfdir}/ld.so.conf.d/%{name}.conf %files devel %defattr(-,root,root,-) %dir %{_libdir}/%{name} %{_defaultdocdir}/%{name}-%{version} #%{_libdir}/%{name}_*/*.so %{_libdir}/%{name}/*.a %{_includedir}/%{name} %post /sbin/ldconfig %postun /sbin/ldconfig %clean rm -rf ${RPM_BUILD_ROOT} %changelog * Tue Dec 30 2008 Mehdi Bozzo-Rey 3.8.2-2 - added lapack support (backport from the platform_hpc kit) * Wed Sep 24 2008 Mehdi Bozzo-Rey 3.8.2-1 - restart from scratch with the latest stable version and fix bugzilla 448110 (for decent x86_64 arch)