%define major %(echo %version | cut -d. -f 1) %ifarch arm %define enable_native_atlas 0 %else %define enable_native_atlas 1 %endif %if %enable_native_atlas %ifarch %ix86 %define types base 3dnow sse sse2 sse3 %define mode 32 %define pr_sse2 35 %endif %ifarch x86_64 %define types base sse2 %define mode 64 %define pr_sse2 63 %endif %else %ifarch %ix86 arm %define types base %define mode 32 %endif %ifarch x86_64 %define types base %define mode 64 %endif %endif %define pr_base 32 %define pr_3dnow 33 %define pr_sse 34 %define pr_sse3 36 Name: libatlas Version: 3.8.4 Release: 3mamba Summary: ATLAS - Automatically Tuned Linear Algebra Software Group: System/Libraries Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://math-atlas.sourceforge.net/ Source0: http://downloads.sourceforge.net/project/math-atlas/Stable/%{version}/atlas%{version}.tar.bz2 Source1: ATLAS-README # http://sourceforge.net/cvs/?group_id=23725 Source2: PPRO32.tgz Source3: K7323DNow.tgz Source4: USII64.tgz Source5: USII32.tgz Patch0: libatlas-3.8.4-shared.patch Patch1: libatlas-3.8.4-fix-melf-link-flags.patch # ARM patch diffed from: # http://www.vesperix.com/arm/atlas-arm/source/atlas-%{version}-arm.tar.gz Patch2: atlas-3.8.4-arm.patch License: BSD ## AUTOBUILDREQ-BEGIN BuildRequires: gcc-fortran BuildRequires: glibc-devel ## AUTOBUILDREQ-END BuildRequires: libblas-devel >= 3.4.2-3mamba BuildRequires: liblapack-devel >= 3.4.2-5mamba BuildRequires: libxblas-devel BuildRequires: libgomp-devel #ExclusiveArch: ix86 amd64 x86_64 BuildRoot: %{_tmppath}/%{name}-%{version}-root %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. %package devel Group: Development/Libraries Summary: Development libraries for ATLAS Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} Requires: chkconfig %description devel ATLAS - Automatically Tuned Linear Algebra Software. This package contains the libraries and headers for development with ATLAS. %if %enable_native_atlas %ifarch x86_64 %package sse2 Group: System/Libraries Summary: ATLAS libraries for SSE2 extensions %description sse2 ATLAS - Automatically Tuned Linear Algebra Software. This package contains the ATLAS libraries compiled with optimizations for the SSE2 extensions to the x86_64 architecture. %package sse2-devel Group: Development/Libraries Summary: Development libraries for ATLAS with SSE2 extensions Requires: %{name}-sse2 = %{?epoch:%epoch:}%{version}-%{release} Requires: chkconfig %description sse2-devel This package contains shared and static versions of the ATLAS libraries compiled with optimizations for the SSE2 extensions to the x86_64 architecture. %endif %ifarch %ix86 %package 3dnow Group: System/Libraries Summary: ATLAS libraries for 3DNow extensions %description 3dnow ATLAS - Automatically Tuned Linear Algebra Software. This package contains the ATLAS libraries compiled with optimizations for the 3DNow extension to the ix86 architecture. %package 3dnow-devel Group: Development/Libraries Summary: Development libraries for ATLAS with 3DNow extensions Requires: %{name}-3dnow = %{version}-%{release} Requires: chkconfig %description 3dnow-devel ATLAS - Automatically Tuned Linear Algebra Software. This package contains headers and shared versions of the ATLAS libraries compiled with optimizations for the 3DNow extensions to the ix86 architecture. %package sse Group: System/Libraries Summary: ATLAS libraries for SSE extensions %description sse ATLAS - Automatically Tuned Linear Algebra Software. This package contains the ATLAS libraries compiled with optimizations for the SSE(1) extensions to the ix86 architecture. %package sse-devel Group: Development/Libraries Summary: Development libraries for ATLAS with SSE extensions Requires: %{name}-sse = %{version}-%{release} Requires: chkconfig %description sse-devel ATLAS - Automatically Tuned Linear Algebra Software. This package contains headers and shared versions of the ATLAS libraries compiled with optimizations for the SSE(1) extensions to the ix86 architecture. %package sse2 Group: System/Libraries Summary: ATLAS libraries for SSE2 extensions %description sse2 ATLAS - Automatically Tuned Linear Algebra Software. This package contains ATLAS shared libraries compiled with optimizations for the SSE2 extensions to the ix86 architecture. %package sse2-devel Group: Development/Libraries Summary: Development libraries for ATLAS with SSE2 extensions Requires: %{name}-sse2 = %{?epoch:%epoch:}%{version}-%{release} Requires: chkconfig %description sse2-devel ATLAS - Automatically Tuned Linear Algebra Software. This package contains ATLAS shared libraries compiled with optimizations for the SSE2 extensions to the ix86 architecture. %package sse3 Group: System/Libraries Summary: ATLAS libraries for SSE3 extensions %description sse3 ATLAS - Automatically Tuned Linear Algebra Software. This package contains the ATLAS libraries compiled with optimizations for the SSE3. %package sse3-devel Group: Development/Libraries Summary: Development libraries for ATLAS with SSE3 extensions Requires: %{name}-sse3 = %{?epoch:%epoch:}%{version}-%{release} Requires: chkconfig %description sse3-devel ATLAS - Automatically Tuned Linear Algebra Software. This package contains development libraries for ATLAS with SSE3 extensions to the ix86 architecture. %endif %endif %package doc Summary: Documentation for %{name} Group: Documentation Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} %description doc ATLAS - Automatically Tuned Linear Algebra Software. This package contains the documentation for %{name}. %prep %setup -q -c -a0 #-D -T #:<< __EOF cd ATLAS %patch0 -p1 %patch1 -p1 %ifarch arm %patch2 -p1 %endif cp %{SOURCE1} openmamba-README sed -i "s|@VER_REL@|%{version}-%{release}|" openmamba-README %ifnarch arm cp %{SOURCE2} CONFIG/ARCHS/ cp %{SOURCE3} CONFIG/ARCHS/ cp %{SOURCE4} CONFIG/ARCHS/ cp %{SOURCE5} CONFIG/ARCHS/ %endif %build #:<< _EOF cd ATLAS for type in %{types}; do if [ "$type" = "base" ]; then libname=atlas else libname=atlas-${type} fi mkdir -p %{_arch}_${type} cd %{_arch}_${type} ../configure -b %{mode} -D c -DWALL -Fa alg '-g -Wa,--noexecstack -fPIC'\ %ifarch arm -Si archdef 0 -Si cputhrchk 0 \ %endif --prefix=%{buildroot}%{_prefix} \ --incdir=%{buildroot}%{_includedir} \ --libdir=%{buildroot}%{_libdir}/${libname} \ --with-netlib-lapack=%{_libdir}/liblapack.a sed -i "s|LDFLAGS = \(.*\)|LDFLAGS = \1 -Wl,--allow-multiple-definition -lxblas|" Make.inc # -Si cputhrchk 0 %ifarch x86_64 if [ "$type" = "sse2" ]; then sed -i 's#ARCH =.*#ARCH = HAMMER64SSE2#' Make.inc sed -i 's#-DATL_SSE3##' Make.inc sed -i 's#-msse3#-msse2#' Make.inc fi %endif %ifarch %ix86 if [ "$type" = "base" ]; then sed -i 's#ARCH =.*#ARCH = PPRO32#' Make.inc sed -i 's#-DATL_SSE3 -DATL_SSE2 -DATL_SSE1##' Make.inc sed -i 's#-mfpmath=sse -msse3#-mfpmath=387#' Make.inc elif [ "$type" = "3dnow" ]; then sed -i 's#ARCH =.*#ARCH = K7323DNow#' Make.inc sed -i 's#-DATL_SSE3 -DATL_SSE2 -DATL_SSE1##' Make.inc sed -i 's#-mfpmath=sse -msse3#-mfpmath=387#' Make.inc elif [ "$type" = "sse" ]; then sed -i 's#ARCH =.*#ARCH = PIII32SSE1#' Make.inc sed -i 's#-DATL_SSE3 -DATL_SSE2##' Make.inc sed -i 's#-msse3#-msse#' Make.inc elif [ "$type" = "sse2" ]; then sed -i 's#ARCH =.*#ARCH = P432SSE2#' Make.inc sed -i 's#-DATL_SSE3##' Make.inc sed -i 's#-msse3#-msse2#' Make.inc elif [ "$type" = "sse3" ]; then sed -i 's#ARCH =.*#ARCH = P4E32SSE3#' Make.inc fi %endif make build || make build || make build cd lib make shared #%ifarch x86_64 # LDFLAGS= #%endif make ptshared #%ifarch x86_64 # LDFLAGS= #%endif cd .. done %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" cd ATLAS for type in %{types}; do cd %{_arch}_${type} make DESTDIR=%{buildroot} install mv %{buildroot}%{_includedir}/atlas %{buildroot}%{_includedir}/atlas-%{_arch}-${type} if [ "$type" = "base" ]; then cp -pr lib/*.so* %{buildroot}%{_libdir}/atlas/ rm -f %{buildroot}%{_libdir}/atlas/*.a else cp -pr lib/*.so* %{buildroot}%{_libdir}/atlas-${type}/ rm -f %{buildroot}%{_libdir}/atlas-${type}/*.a fi cd .. mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d if [ "$type" = "base" ]; then echo "%{_libdir}/atlas" \ > %{buildroot}%{_sysconfdir}/ld.so.conf.d/atlas-%{_arch}.conf else echo "%{_libdir}/atlas-${type}" \ > %{buildroot}%{_sysconfdir}/ld.so.conf.d/atlas-%{_arch}-${type}.conf fi done mkdir -p %{buildroot}%{_includedir}/atlas %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %post devel if [ $1 -ge 1 ]; then /usr/sbin/alternatives --install %{_includedir}/atlas atlas-inc \ %{_includedir}/atlas-%{_arch}-base %{pr_base} fi exit 0 %preun devel if [ $1 -eq 0 ]; then /usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-base fi exit 0 %postun devel if [ $1 -eq 0 ]; then /usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-base fi : %if %enable_native_atlas %ifarch x86_64 %post sse2 -p /sbin/ldconfig %postun sse2 -p /sbin/ldconfig %post sse2-devel if [ $1 -ge 1 ]; then /usr/sbin/alternatives --install %{_includedir}/atlas atlas-inc \ %{_includedir}/atlas-%{_arch}-sse2 %{pr_sse2} fi exit 0 %preun sse2-devel if [ $1 -eq 0 ]; then /usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-sse2 fi exit 0 %postun sse2-devel if [ $1 -eq 0 ]; then /usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-sse2 fi : %endif %ifarch %ix86 %post 3dnow -p /sbin/ldconfig %postun 3dnow -p /sbin/ldconfig %post 3dnow-devel if [ $1 -ge 1 ]; then /usr/sbin/alternatives --install %{_includedir}/atlas atlas-inc \ %{_includedir}/atlas-%{_arch}-3dnow %{pr_3dnow} fi exit 0 %preun 3dnow-devel if [ $1 -eq 0 ]; then /usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-3dnow fi exit 0 %postun 3dnow-devel if [ $1 -eq 0 ]; then /usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-3dnow fi : %post sse -p /sbin/ldconfig %postun sse -p /sbin/ldconfig %post sse-devel if [ $1 -ge 1 ]; then /usr/sbin/alternatives --install %{_includedir}/atlas atlas-inc \ %{_includedir}/atlas-%{_arch}-sse %{pr_sse} fi exit 0 %preun sse-devel if [ $1 -eq 0 ]; then /usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-sse fi exit 0 %postun sse-devel if [ $1 -eq 0 ]; then /usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-sse fi : %post sse2 -p /sbin/ldconfig %postun sse2 -p /sbin/ldconfig %post sse2-devel if [ $1 -ge 1 ]; then /usr/sbin/alternatives --install %{_includedir}/atlas atlas-inc \ %{_includedir}/atlas-%{_arch}-sse2 %{pr_sse2} fi exit 0 %preun sse2-devel if [ $1 -eq 0 ]; then /usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-sse2 fi exit 0 %postun sse2-devel if [ $1 -eq 0 ]; then /usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-sse2 fi : %post sse3 -p /sbin/ldconfig %postun sse3 -p /sbin/ldconfig %post sse3-devel if [ $1 -ge 1 ]; then /usr/sbin/alternatives --install %{_includedir}/atlas atlas-inc \ %{_includedir}/atlas-%{_arch}-sse3 %{pr_sse3} fi exit 0 %preun sse3-devel if [ $1 -eq 0 ]; then /usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-sse3 fi exit 0 %postun sse3-devel if [ $1 -eq 0 ]; then /usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-sse3 fi : %endif %endif %files %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/ld.so.conf.d/atlas-%{_arch}.conf %dir %{_libdir}/atlas %{_libdir}/atlas/*.so.* %doc ATLAS/*README %files devel %defattr(-,root,root) %dir %{_includedir}/atlas-%{_arch}-base %{_includedir}/atlas-%{_arch}-base/* %{_includedir}/*.h %{_libdir}/atlas/*.so %if %enable_native_atlas %ifarch x86_64 %files sse2 %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/ld.so.conf.d/atlas-%{_arch}-sse2.conf %dir %{_libdir}/atlas-sse2 %{_libdir}/atlas-sse2/*.so.* %files sse2-devel %defattr(-,root,root) %{_libdir}/atlas-sse2/*.so %{_includedir}/atlas-%{_arch}-sse2/ %{_includedir}/*.h %ghost %{_includedir}/atlas %endif %ifarch %ix86 %files 3dnow %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/ld.so.conf.d/atlas-%{_arch}-3dnow.conf %dir %{_libdir}/atlas-3dnow %{_libdir}/atlas-3dnow/*.so.* %files 3dnow-devel %defattr(-,root,root) %{_libdir}/atlas-3dnow/*.so %{_includedir}/atlas-%{_arch}-3dnow/ %{_includedir}/*.h %ghost %{_includedir}/atlas %files sse %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/ld.so.conf.d/atlas-%{_arch}-sse.conf %dir %{_libdir}/atlas-sse %{_libdir}/atlas-sse/*.so.* %files sse-devel %defattr(-,root,root) %{_libdir}/atlas-sse/*.so %{_includedir}/atlas-%{_arch}-sse/ %{_includedir}/*.h %ghost %{_includedir}/atlas %files sse2 %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/ld.so.conf.d/atlas-%{_arch}-sse2.conf %dir %{_libdir}/atlas-sse2 %{_libdir}/atlas-sse2/*.so.* %files sse2-devel %defattr(-,root,root) %{_libdir}/atlas-sse2/*.so %{_includedir}/atlas-%{_arch}-sse2/ %{_includedir}/*.h %ghost %{_includedir}/atlas %files sse3 %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/ld.so.conf.d/atlas-%{_arch}-sse3.conf %dir %{_libdir}/atlas-sse3 %{_libdir}/atlas-sse3/*.so.* %files sse3-devel %defattr(-,root,root) %{_libdir}/atlas-sse3/*.so %{_includedir}/atlas-%{_arch}-sse3/ %{_includedir}/*.h %ghost %{_includedir}/atlas %endif %endif %files doc %defattr(-,root,root) %doc ATLAS/doc %changelog * Mon Aug 26 2013 Silvan Calarco 3.8.4-3mamba - rebuilt with liblapack-3.4.2-5mamba implementing extended precision routines (xblas) * Thu Aug 22 2013 Silvan Calarco 3.8.4-2mamba - rebuild with liblapack-3.4.2-3mamba providing static library * Wed Aug 14 2013 Silvan Calarco 3.8.4-1mamba - update to 3.8.4 * Wed Jan 05 2011 gil 3.8.3-2mamba - rebuilt devel * Sat May 09 2009 gil 3.8.3-1mamba - update to 3.8.3 * Sat Oct 04 2008 gil 3.8.2-1mamba - package created by autospec