Deji Akingunola 9b078f
%define enable_native_atlas 0
Deji Akingunola 9b078f
Quentin Spencer cdd562
Name:           atlas
Deji Akingunola 9b078f
Version:        3.8.3
Deji Akingunola 9b078f
Release:        1%{?dist}
Quentin Spencer cdd562
Summary:        Automatically Tuned Linear Algebra Software
Quentin Spencer cdd562
Quentin Spencer cdd562
Group:          System Environment/Libraries
Quentin Spencer cdd562
License:        BSD
Quentin Spencer cdd562
URL:            http://math-atlas.sourceforge.net/
Deji Akingunola 9b078f
Source0:        http://downloads.sourceforge.net/math-atlas/%{name}%{version}.tar.bz2
Quentin Spencer 2c4ed2
Source1:        README.Fedora
Deji Akingunola 9b078f
Patch0:		atlas-fedora_shared.patch
Quentin Spencer cdd562
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Quentin Spencer cdd562
Deji Akingunola 9b078f
BuildRequires:  gcc-gfortran lapack-devel
Quentin Spencer cdd562
Quentin Spencer cdd562
%description
Quentin Spencer cdd562
The ATLAS (Automatically Tuned Linear Algebra Software) project is an
Quentin Spencer cdd562
ongoing research effort focusing on applying empirical techniques in
Quentin Spencer cdd562
order to provide portable performance. At present, it provides C and
Quentin Spencer cdd562
Fortran77 interfaces to a portably efficient BLAS implementation, as
Quentin Spencer cdd562
well as a few routines from LAPACK.
Quentin Spencer cdd562
Quentin Spencer 2c4ed2
The performance improvements in ATLAS are obtained largely via
Quentin Spencer cdd562
compile-time optimizations and tend to be specific to a given hardware
Quentin Spencer cdd562
configuration. In order to package ATLAS for Fedora some compromises
Quentin Spencer 2c4ed2
are necessary so that good performance can be obtained on a variety
Quentin Spencer cdd562
of hardware. This set of ATLAS binary packages is therefore not
Quentin Spencer 2c4ed2
necessarily optimal for any specific hardware configuration.  However,
Quentin Spencer 2c4ed2
the source package can be used to compile customized ATLAS packages;
Quentin Spencer 2c4ed2
see the documentation for information.
Quentin Spencer cdd562
Quentin Spencer cdd562
%package devel
Quentin Spencer cdd562
Summary:        Development libraries for ATLAS
Quentin Spencer cdd562
Group:          Development/Libraries
Quentin Spencer cdd562
Requires:       %{name} = %{version}-%{release}
Quentin Spencer cdd562
Quentin Spencer cdd562
%description devel
Quentin Spencer cdd562
This package contains the static libraries and headers for development
Quentin Spencer cdd562
with ATLAS (Automatically Tuned Linear Algebra Software).
Quentin Spencer cdd562
Deji Akingunola 9b078f
%define types base
Quentin Spencer cdd562
Deji Akingunola 9b078f
%if "%{?enable_native_atlas}" == "0"
Quentin Spencer cdd562
############## Subpackages for architecture extensions #################
Quentin Spencer cdd562
#
Quentin Spencer cdd562
# Because a set of ATLAS libraries is a ~5 MB package, separate packages
Deji Akingunola 9b078f
# are created for SSE, SSE2, and SSE3 extensions to ix86.
Quentin Spencer 2cec08
Quentin Spencer cdd562
%ifarch i386
Deji Akingunola 9b078f
%define types sse sse2 sse3
Quentin Spencer cdd562
Quentin Spencer cdd562
%package sse
Quentin Spencer cdd562
Summary:        ATLAS libraries for SSE extensions
Quentin Spencer cdd562
Group:          System Environment/Libraries
Deji Akingunola 9b078f
Obsoletes:	%{name}-3dnow < 3.7
Deji Akingunola 9b078f
Provides:	%{name}-3dnow = %{version}-%{release}
Deji Akingunola 9b078f
Quentin Spencer cdd562
%description sse
Quentin Spencer cdd562
This package contains the ATLAS (Automatically Tuned Linear Algebra
Deji Akingunola 9b078f
Software) libraries compiled with optimizations for the SSE(1) extensions
Deji Akingunola 9b078f
to the ix86 architecture. Fedora also produces ATLAS build with SSE2 and SSE3
Deji Akingunola 9b078f
extensions.
Deji Akingunola 9b078f
Quentin Spencer cdd562
%package sse-devel
Quentin Spencer cdd562
Summary:        Development libraries for ATLAS with SSE extensions
Quentin Spencer cdd562
Group:          Development/Libraries
Quentin Spencer ee675c
Requires:       %{name}-sse = %{version}-%{release}
Deji Akingunola 9b078f
Obsoletes:	%{name}-3dnow-devel < 3.7
Deji Akingunola 9b078f
Provides:	%{name}-3dnow-devel = %{version}-%{release}
Deji Akingunola 9b078f
Quentin Spencer cdd562
%description sse-devel
Quentin Spencer cdd562
This package contains headers and static versions of the ATLAS
Quentin Spencer cdd562
(Automatically Tuned Linear Algebra Software) libraries compiled with
Deji Akingunola 9b078f
optimizations for the SSE(1) extensions to the ix86 architecture.
Quentin Spencer cdd562
Quentin Spencer cdd562
%package sse2
Quentin Spencer cdd562
Summary:        ATLAS libraries for SSE2 extensions
Quentin Spencer cdd562
Group:          System Environment/Libraries
Deji Akingunola 9b078f
Obsoletes:	%{name} < 3.7
Deji Akingunola 9b078f
Provides:	%{name} = %{version}-%{release}
Deji Akingunola 9b078f
Quentin Spencer cdd562
%description sse2
Quentin Spencer cdd562
This package contains the ATLAS (Automatically Tuned Linear Algebra
Quentin Spencer cdd562
Software) libraries compiled with optimizations for the SSE2
Deji Akingunola 9b078f
extensions to the ix86 architecture. Fedora also produces ATLAS build with
Deji Akingunola 9b078f
SSE(1) and SSE3 extensions.
Deji Akingunola 9b078f
Quentin Spencer cdd562
%package sse2-devel
Quentin Spencer cdd562
Summary:        Development libraries for ATLAS with SSE2 extensions
Quentin Spencer cdd562
Group:          Development/Libraries
Quentin Spencer ee675c
Requires:       %{name}-sse2 = %{version}-%{release}
Deji Akingunola 9b078f
Obsoletes:	%{name}-devel < 3.7
Deji Akingunola 9b078f
Provides:	%{name}-devel = %{version}-%{release}
Deji Akingunola 9b078f
Quentin Spencer cdd562
%description sse2-devel
Quentin Spencer cdd562
This package contains headers and static versions of the ATLAS
Quentin Spencer cdd562
(Automatically Tuned Linear Algebra Software) libraries compiled with
Quentin Spencer cdd562
optimizations for the SSE2 extensions to the ix86 architecture.
Quentin Spencer cdd562
Deji Akingunola 9b078f
%package sse3
Quentin Spencer cdd562
Summary:        ATLAS libraries for 3DNow extensions
Quentin Spencer cdd562
Group:          System Environment/Libraries
Deji Akingunola 9b078f
Deji Akingunola 9b078f
%description sse3
Quentin Spencer cdd562
This package contains the ATLAS (Automatically Tuned Linear Algebra
Deji Akingunola 9b078f
Software) libraries compiled with optimizations for the SSE3.
Deji Akingunola 9b078f
Fedora also produces ATLAS build with SSE(1) and SSE2 extensions.
Deji Akingunola 9b078f
Deji Akingunola 9b078f
%package sse3-devel
Quentin Spencer cdd562
Summary:        Development libraries for ATLAS with 3DNow extensions
Quentin Spencer cdd562
Group:          Development/Libraries
Deji Akingunola 9b078f
Requires:       %{name}-sse3 = %{version}-%{release}
Quentin Spencer cdd562
Deji Akingunola 9b078f
%description sse3-devel
Quentin Spencer cdd562
This package contains headers and static versions of the ATLAS
Quentin Spencer cdd562
(Automatically Tuned Linear Algebra Software) libraries compiled with
Deji Akingunola 9b078f
optimizations for the sse3 extensions to the ix86 architecture.
Quentin Spencer cdd562
Quentin Spencer cdd562
%endif
Quentin Spencer cdd562
%endif
Quentin Spencer cdd562
Deji Akingunola 9b078f
%ifarch x86_64 ppc64
Deji Akingunola 9b078f
%define mode 64
Deji Akingunola 9b078f
%else
Deji Akingunola 9b078f
%define mode 32
Quentin Spencer cdd562
%endif
Quentin Spencer cdd562
Quentin Spencer cdd562
%prep
Quentin Spencer cdd562
%setup -q -n ATLAS
Deji Akingunola 9b078f
%patch0 -p0 -b .shared
Quentin Spencer cdd562
cp %{SOURCE1} doc
Quentin Spencer cdd562
Quentin Spencer cdd562
%build
Deji Akingunola 9b078f
for type in %{types}; do
Deji Akingunola 9b078f
	if [ "$type" = "base" ]; then
Deji Akingunola 9b078f
		libname=atlas
Deji Akingunola 9b078f
	else
Deji Akingunola 9b078f
		libname=atlas-${type}
Deji Akingunola 9b078f
	fi
Deji Akingunola 9b078f
	mkdir -p %{_arch}_${type}
Deji Akingunola 9b078f
	pushd %{_arch}_${type}
Deji Akingunola 9b078f
	../configure -b %{mode} -D c -DWALL -Fa alg '-Wa,--noexecstack -fPIC'\
Deji Akingunola 9b078f
	--prefix=%{buildroot}%{_prefix}			\
Deji Akingunola 9b078f
	--incdir=%{buildroot}%{_includedir}		\
Deji Akingunola 9b078f
	--libdir=%{buildroot}%{_libdir}/${libname}	\
Deji Akingunola 9b078f
	--with-netlib-lapack=%{_libdir}/liblapack_pic.a
Deji Akingunola 9b078f
Deji Akingunola 9b078f
	if [ "$type" = "sse" ]; then
Deji Akingunola 9b078f
		sed -i 's#ARCH =.*#ARCH = PIII32SSE1#' Make.inc
Deji Akingunola 9b078f
		sed -i 's#-DATL_SSE3 -DATL_SSE2##' Make.inc 
Deji Akingunola 9b078f
	elif [ "$type" = "sse2" ]; then
Deji Akingunola 9b078f
		sed -i 's#ARCH =.*#ARCH = P432SSE2#' Make.inc
Deji Akingunola 9b078f
		sed -i 's#-DATL_SSE3##' Make.inc 
Deji Akingunola 9b078f
	elif [ "$type" = "sse3" ]; then
Deji Akingunola 9b078f
		sed -i 's#ARCH =.*#ARCH = P4E32SSE3#' Make.inc
Deji Akingunola 9b078f
	fi
Deji Akingunola 9b078f
	make build
Deji Akingunola 9b078f
	cd lib
Deji Akingunola 9b078f
	make shared
Deji Akingunola 9b078f
	make ptshared
Deji Akingunola 9b078f
	popd
Quentin Spencer cdd562
done
Quentin Spencer cdd562
Quentin Spencer cdd562
%install
Deji Akingunola 9b078f
rm -rf %{buildroot}
Deji Akingunola 9b078f
for type in %{types}; do
Deji Akingunola 9b078f
	pushd %{_arch}_${type}
Deji Akingunola 9b078f
	make DESTDIR=%{buildroot} install
Deji Akingunola 9b078f
	if [ "$type" = "base" ]; then
Deji Akingunola 9b078f
		cp -pr lib/*.so* %{buildroot}%{_libdir}/atlas/
Deji Akingunola 9b078f
	else
Deji Akingunola 9b078f
		cp -pr lib/*.so* %{buildroot}%{_libdir}/atlas-${type}/
Deji Akingunola 9b078f
	fi
Deji Akingunola 9b078f
	popd
Deji Akingunola 9b078f
Deji Akingunola 9b078f
	mkdir -p %{buildroot}/etc/ld.so.conf.d
Deji Akingunola 9b078f
	if [ "$type" = "base" ]; then
Deji Akingunola 9b078f
		echo "%{_libdir}/atlas"		\
Deji Akingunola 9b078f
		> %{buildroot}/etc/ld.so.conf.d/atlas-%{_arch}.conf
Deji Akingunola 9b078f
	else
Deji Akingunola 9b078f
		echo "%{_libdir}/atlas-${type}"	\
Deji Akingunola 9b078f
		> %{buildroot}/etc/ld.so.conf.d/atlas-${type}.conf
Deji Akingunola 9b078f
	fi
Quentin Spencer cdd562
done
Deji Akingunola 9b078f
%ifarch i386 && %if "%{?enable_native_atlas}" == "0"
Deji Akingunola 9b078f
cp -pr %{buildroot}%{_libdir}/atlas-sse2 %{buildroot}%{_libdir}/atlas
Deji Akingunola 9b078f
echo "%{_libdir}/atlas"	>> %{buildroot}/etc/ld.so.conf.d/atlas-sse2.conf
Deji Akingunola 9b078f
%endif
Quentin Spencer cdd562
Quentin Spencer cdd562
%clean
Deji Akingunola 9b078f
rm -rf %{buildroot}
Deji Akingunola 9b078f
Deji Akingunola 9b078f
%ifnarch i386 || %if "%{?enable_native_atlas}" == "1"
Quentin Spencer cdd562
Quentin Spencer cdd562
%post -p /sbin/ldconfig
Quentin Spencer cdd562
Quentin Spencer cdd562
%postun -p /sbin/ldconfig
Quentin Spencer cdd562
Quentin Spencer cdd562
%files
Quentin Spencer cdd562
%defattr(-,root,root,-)
Deji Akingunola 9b078f
%doc doc/README.Fedora
Quentin Spencer cdd562
%dir %{_libdir}/atlas
Quentin Spencer 2c4ed2
%{_libdir}/atlas/*.so.*
Quentin Spencer cdd562
%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}.conf
Quentin Spencer cdd562
Quentin Spencer cdd562
%files devel
Quentin Spencer cdd562
%defattr(-,root,root,-)
Deji Akingunola 9b078f
%doc doc
Quentin Spencer cdd562
%{_libdir}/atlas/*.so
Quentin Spencer 2c4ed2
%{_libdir}/atlas/*.a
Quentin Spencer cdd562
%{_includedir}/atlas
Deji Akingunola 9b078f
%{_includedir}/*.h
Quentin Spencer cdd562
Deji Akingunola 9b078f
%else
Deji Akingunola 9b078f
Deji Akingunola 9b078f
%post -n atlas-sse -p /sbin/ldconfig
Deji Akingunola 9b078f
Deji Akingunola 9b078f
%postun -n atlas-sse -p /sbin/ldconfig
Deji Akingunola 9b078f
Deji Akingunola 9b078f
%post -n atlas-sse2 -p /sbin/ldconfig
Deji Akingunola 9b078f
Deji Akingunola 9b078f
%postun -n atlas-sse2 -p /sbin/ldconfig
Deji Akingunola 9b078f
Deji Akingunola 9b078f
%post -n atlas-sse3 -p /sbin/ldconfig
Deji Akingunola 9b078f
Deji Akingunola 9b078f
%postun -n atlas-sse3 -p /sbin/ldconfig
Quentin Spencer cdd562
Quentin Spencer 2c4ed2
%files sse
Quentin Spencer 2c4ed2
%defattr(-,root,root,-)
Deji Akingunola 9b078f
%doc doc/README.Fedora
Deji Akingunola 9b078f
%dir %{_libdir}/atlas-sse
Deji Akingunola 9b078f
%{_libdir}/atlas-sse/*.so.*
Quentin Spencer ee675c
%config(noreplace) /etc/ld.so.conf.d/atlas-sse.conf
Quentin Spencer cdd562
Quentin Spencer cdd562
%files sse-devel
Quentin Spencer cdd562
%defattr(-,root,root,-)
Deji Akingunola 9b078f
%doc doc
Deji Akingunola 9b078f
%{_libdir}/atlas-sse/*.so
Deji Akingunola 9b078f
%{_libdir}/atlas-sse/*.a
Quentin Spencer cdd562
%{_includedir}/atlas
Deji Akingunola 9b078f
%{_includedir}/*.h
Quentin Spencer cdd562
Quentin Spencer 2c4ed2
%files sse2
Quentin Spencer 2c4ed2
%defattr(-,root,root,-)
Deji Akingunola 9b078f
%doc doc/README.Fedora
Deji Akingunola 9b078f
%dir %{_libdir}/atlas-sse2
Deji Akingunola 9b078f
%dir %{_libdir}/atlas
Deji Akingunola 9b078f
%{_libdir}/atlas-sse2/*.so.*
Deji Akingunola 9b078f
%{_libdir}/atlas/*.so.*
Deji Akingunola 9b078f
%config(noreplace) /etc/ld.so.conf.d/atlas-sse2.conf
Quentin Spencer cdd562
Quentin Spencer cdd562
%files sse2-devel
Quentin Spencer cdd562
%defattr(-,root,root,-)
Deji Akingunola 9b078f
%doc doc
Deji Akingunola 9b078f
%{_libdir}/atlas-sse2/*.so
Deji Akingunola 9b078f
%{_libdir}/atlas-sse2/*.a
Deji Akingunola 9b078f
%{_libdir}/atlas/*.so
Deji Akingunola 9b078f
%{_libdir}/atlas/*.a
Quentin Spencer cdd562
%{_includedir}/atlas
Deji Akingunola 9b078f
%{_includedir}/*.h
Quentin Spencer cdd562
Deji Akingunola 9b078f
%files sse3
Quentin Spencer 2c4ed2
%defattr(-,root,root,-)
Deji Akingunola 9b078f
%doc doc/README.Fedora
Deji Akingunola 9b078f
%dir %{_libdir}/atlas-sse3
Deji Akingunola 9b078f
%{_libdir}/atlas-sse3/*.so.*
Deji Akingunola 9b078f
%config(noreplace) /etc/ld.so.conf.d/atlas-sse3.conf
Quentin Spencer cdd562
Deji Akingunola 9b078f
%files sse3-devel
Quentin Spencer cdd562
%defattr(-,root,root,-)
Deji Akingunola 9b078f
%doc doc
Deji Akingunola 9b078f
%{_libdir}/atlas-sse3/*.so
Deji Akingunola 9b078f
%{_libdir}/atlas-sse3/*.a
Quentin Spencer cdd562
%{_includedir}/atlas
Deji Akingunola 9b078f
%{_includedir}/*.h
Quentin Spencer cdd562
Quentin Spencer cdd562
%endif
Quentin Spencer cdd562
Deji Akingunola 9b078f
%changelog
Deji Akingunola 9b078f
* Tue Mar 03 2009 Deji Akingunola <dakingun@gmail.com> - 3.8.3-1
Deji Akingunola 9b078f
- Update to version 3.8.3
Deji Akingunola 9b078f
- Branch for EL-5 (EPEL)
Quentin Spencer cdd562
Deji Akingunola 9b078f
* Mon Jun  4 2007 Orion Poplawski <orion@cora.nwra.com> 3.6.0-12
Deji Akingunola 9b078f
- Rebuild for ppc64
Quentin Spencer cdd562
Quentin Spencer 2cec08
* Fri Sep  8 2006 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-11
Quentin Spencer 2cec08
- Rebuild for FC6.
Quentin Spencer 2cec08
- Remove outdated comments from spec file.
Quentin Spencer 2cec08
Quentin Spencer 9e15ab
* Mon Feb 13 2006 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-10
Quentin Spencer 9e15ab
- Rebuild for Fedora Extras 5.
Quentin Spencer 9e15ab
- Add --noexecstack to compilation of assembly kernels. These were
Quentin Spencer 9e15ab
  previously marked executable, which caused problems with selinux.
Quentin Spencer 9e15ab
Quentin Spencer dc9c22
* Mon Dec 19 2005 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-9
Quentin Spencer dc9c22
- Rebuild for gcc 4.1.
Quentin Spencer dc9c22
Quentin Spencer ee675c
* Mon Oct 10 2005 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-8
Quentin Spencer ee675c
- Make all devel subpackages depend on their non-devel counterparts.
Quentin Spencer ee675c
- Add /etc/ld.so.conf.d files for -sse and -3dnow, because they don't
Quentin Spencer ee675c
  seem to get picked up automatically.
Quentin Spencer ee675c
Quentin Spencer e97db9
* Wed Oct 05 2005 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-7
Quentin Spencer e97db9
- Forgot to add the new patch to sources.
Quentin Spencer e97db9
Quentin Spencer cdd562
* Tue Oct 04 2005 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-6
Quentin Spencer 2c4ed2
- Use new Debian patch, and enable shared libs (they previously failed
Quentin Spencer 2c4ed2
  to build on gcc 4).
Quentin Spencer 2c4ed2
- Minor updates to description and README.Fedora file.
Quentin Spencer 2c4ed2
- Fix buildroot name to match FE preferred form.
Quentin Spencer 2c4ed2
- Fixes for custom optimized builds.
Quentin Spencer 2c4ed2
- Add dist tag.
Quentin Spencer cdd562
Quentin Spencer cdd562
* Wed Sep 28 2005 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-5
Quentin Spencer cdd562
- fix files lists.
Quentin Spencer cdd562
Quentin Spencer cdd562
* Mon Sep 26 2005 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-4
Quentin Spencer cdd562
- generate library symlinks earlier for the benefit of later linking steps.
Quentin Spencer cdd562
Quentin Spencer cdd562
* Wed Sep 14 2005 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-3
Quentin Spencer cdd562
- Change lapack dependency to lapack-devel, and use lapack_pic.a for
Quentin Spencer cdd562
  building liblapack.so.
Quentin Spencer cdd562
Quentin Spencer cdd562
* Wed Sep 14 2005 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-2
Quentin Spencer cdd562
- Add "bit" macro to correctly build on x86_64.
Quentin Spencer cdd562
Quentin Spencer cdd562
* Tue Aug 16 2005 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-1
Quentin Spencer cdd562
- Initial version.