Quentin Spencer cdd5623
Name:           atlas
Quentin Spencer cdd5623
Version:        3.6.0
Quentin Spencer 9e15abc
Release:        10%{?dist}
Quentin Spencer cdd5623
Summary:        Automatically Tuned Linear Algebra Software
Quentin Spencer cdd5623
Quentin Spencer cdd5623
Group:          System Environment/Libraries
Quentin Spencer cdd5623
License:        BSD
Quentin Spencer cdd5623
URL:            http://math-atlas.sourceforge.net/
Quentin Spencer cdd5623
Source0:        http://prdownloads.sourceforge.net/math-atlas/%{name}%{version}.tar.bz2
Quentin Spencer 2c4ed29
Source1:        README.Fedora
Quentin Spencer 2c4ed29
Patch0:         http://ftp.debian.org/debian/pool/main/a/atlas3/%{name}3_%{version}-20.diff.gz
Quentin Spencer 2c4ed29
Patch1:         %{name}-%{version}-gfortran.patch
Quentin Spencer cdd5623
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Quentin Spencer cdd5623
Quentin Spencer cdd5623
Requires:       /etc/ld.so.conf.d
Quentin Spencer cdd5623
Requires(post): /sbin/ldconfig
Quentin Spencer cdd5623
Requires(postun): /sbin/ldconfig
Quentin Spencer cdd5623
BuildRequires:  gcc-gfortran lapack-devel expect sharutils gawk
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%define ver_major 3
Quentin Spencer cdd5623
%define ver %{ver_major}.0
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%description
Quentin Spencer cdd5623
The ATLAS (Automatically Tuned Linear Algebra Software) project is an
Quentin Spencer cdd5623
ongoing research effort focusing on applying empirical techniques in
Quentin Spencer cdd5623
order to provide portable performance. At present, it provides C and
Quentin Spencer cdd5623
Fortran77 interfaces to a portably efficient BLAS implementation, as
Quentin Spencer cdd5623
well as a few routines from LAPACK.
Quentin Spencer cdd5623
Quentin Spencer 2c4ed29
The performance improvements in ATLAS are obtained largely via
Quentin Spencer cdd5623
compile-time optimizations and tend to be specific to a given hardware
Quentin Spencer cdd5623
configuration. In order to package ATLAS for Fedora some compromises
Quentin Spencer 2c4ed29
are necessary so that good performance can be obtained on a variety
Quentin Spencer cdd5623
of hardware. This set of ATLAS binary packages is therefore not
Quentin Spencer 2c4ed29
necessarily optimal for any specific hardware configuration.  However,
Quentin Spencer 2c4ed29
the source package can be used to compile customized ATLAS packages;
Quentin Spencer 2c4ed29
see the documentation for information.
Quentin Spencer cdd5623
Quentin Spencer cdd5623
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%package devel
Quentin Spencer cdd5623
Summary:        Development libraries for ATLAS
Quentin Spencer cdd5623
Group:          Development/Libraries
Quentin Spencer cdd5623
Requires:       %{name} = %{version}-%{release}
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%description devel
Quentin Spencer cdd5623
This package contains the static libraries and headers for development
Quentin Spencer cdd5623
with ATLAS (Automatically Tuned Linear Algebra Software).
Quentin Spencer cdd5623
Quentin Spencer cdd5623
Quentin Spencer cdd5623
############## Subpackages for architecture extensions #################
Quentin Spencer cdd5623
#
Quentin Spencer cdd5623
# Because a set of ATLAS libraries is a ~5 MB package, separate packages
Quentin Spencer cdd5623
# are created for SSE, SSE2, and 3DNow extensions to ix86 and AltiVec
Quentin Spencer cdd5623
# extensions to PowerPC.
Quentin Spencer cdd5623
#
Quentin Spencer cdd5623
# The current version does not compile shared libraries for the extended
Quentin Spencer cdd5623
# architectures on gcc 4 (errors generated by assembly kernels), so
Quentin Spencer cdd5623
# some of these subpackages are currently disabled and will be enabled
Quentin Spencer cdd5623
# in the future when they compile properly (probably in the 3.8.0 release).
Quentin Spencer cdd5623
%ifarch i386
Quentin Spencer cdd5623
%define archt i386
Quentin Spencer cdd5623
%define types base sse sse2 3dnow
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%package sse
Quentin Spencer cdd5623
Summary:        ATLAS libraries for SSE extensions
Quentin Spencer cdd5623
Group:          System Environment/Libraries
Quentin Spencer cdd5623
%description sse
Quentin Spencer cdd5623
This package contains the ATLAS (Automatically Tuned Linear Algebra
Quentin Spencer cdd5623
Software) libraries compiled with optimizations for the SSE extensions
Quentin Spencer cdd5623
to the ix86 architecture.
Quentin Spencer cdd5623
%package sse-devel
Quentin Spencer cdd5623
Summary:        Development libraries for ATLAS with SSE extensions
Quentin Spencer cdd5623
Group:          Development/Libraries
Quentin Spencer ee675c2
Requires:       %{name}-sse = %{version}-%{release}
Quentin Spencer cdd5623
%description sse-devel
Quentin Spencer cdd5623
This package contains headers and static versions of the ATLAS
Quentin Spencer cdd5623
(Automatically Tuned Linear Algebra Software) libraries compiled with
Quentin Spencer cdd5623
optimizations for the SSE extensions to the ix86 architecture.
Quentin Spencer cdd5623
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%package sse2
Quentin Spencer cdd5623
Summary:        ATLAS libraries for SSE2 extensions
Quentin Spencer cdd5623
Group:          System Environment/Libraries
Quentin Spencer cdd5623
%description sse2
Quentin Spencer cdd5623
This package contains the ATLAS (Automatically Tuned Linear Algebra
Quentin Spencer cdd5623
Software) libraries compiled with optimizations for the SSE2
Quentin Spencer cdd5623
extensions to the ix86 architecture.
Quentin Spencer cdd5623
%package sse2-devel
Quentin Spencer cdd5623
Summary:        Development libraries for ATLAS with SSE2 extensions
Quentin Spencer cdd5623
Group:          Development/Libraries
Quentin Spencer ee675c2
Requires:       %{name}-sse2 = %{version}-%{release}
Quentin Spencer cdd5623
%description sse2-devel
Quentin Spencer cdd5623
This package contains headers and static versions of the ATLAS
Quentin Spencer cdd5623
(Automatically Tuned Linear Algebra Software) libraries compiled with
Quentin Spencer cdd5623
optimizations for the SSE2 extensions to the ix86 architecture.
Quentin Spencer cdd5623
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%package 3dnow
Quentin Spencer cdd5623
Summary:        ATLAS libraries for 3DNow extensions
Quentin Spencer cdd5623
Group:          System Environment/Libraries
Quentin Spencer cdd5623
%description 3dnow
Quentin Spencer cdd5623
This package contains the ATLAS (Automatically Tuned Linear Algebra
Quentin Spencer cdd5623
Software) libraries compiled with optimizations for the 3DNow
Quentin Spencer cdd5623
extensions to the ix86 architecture.
Quentin Spencer cdd5623
%package 3dnow-devel
Quentin Spencer cdd5623
Summary:        Development libraries for ATLAS with 3DNow extensions
Quentin Spencer cdd5623
Group:          Development/Libraries
Quentin Spencer ee675c2
Requires:       %{name}-3dnow = %{version}-%{release}
Quentin Spencer cdd5623
%description 3dnow-devel
Quentin Spencer cdd5623
This package contains headers and static versions of the ATLAS
Quentin Spencer cdd5623
(Automatically Tuned Linear Algebra Software) libraries compiled with
Quentin Spencer cdd5623
optimizations for the 3DNow extensions to the ix86 architecture.
Quentin Spencer cdd5623
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%endif
Quentin Spencer cdd5623
%ifarch ppc
Quentin Spencer cdd5623
%define archt powerpc
Quentin Spencer cdd5623
%define types base altivec
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%package altivec
Quentin Spencer cdd5623
Summary:        ATLAS libraries for AltiVec extensions
Quentin Spencer cdd5623
Group:          System Environment/Libraries
Quentin Spencer cdd5623
%description altivec
Quentin Spencer cdd5623
This package contains the ATLAS (Automatically Tuned Linear Algebra
Quentin Spencer cdd5623
Software) libraries compiled with optimizations for the AltiVec
Quentin Spencer cdd5623
extensions to the PowerPC architecture.
Quentin Spencer cdd5623
%package altivec-devel
Quentin Spencer cdd5623
Summary:        Development libraries for ATLAS with AltiVec extensions
Quentin Spencer cdd5623
Group:          Development/Libraries
Quentin Spencer ee675c2
Requires:       %{name}-altivec = %{version}-%{release}
Quentin Spencer cdd5623
%description altivec-devel
Quentin Spencer cdd5623
This package contains headers and static versions of the ATLAS
Quentin Spencer cdd5623
(Automatically Tuned Linear Algebra Software) libraries compiled with
Quentin Spencer cdd5623
optimizations for the AltiVec extensions to the PowerPC architecture.
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%endif
Quentin Spencer cdd5623
%ifarch x86_64
Quentin Spencer cdd5623
%define archt amd64
Quentin Spencer cdd5623
%define types base
Quentin Spencer cdd5623
%define bit 2
Quentin Spencer cdd5623
%else
Quentin Spencer cdd5623
%define bit 1
Quentin Spencer cdd5623
%endif
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%if "%{?enable_custom_atlas}" == "1"
Quentin Spencer cdd5623
# This flag enables building customized ATLAS libraries with all
Quentin Spencer cdd5623
# compile-time optimizations. Note that compilation will take a very
Quentin Spencer cdd5623
# long time, and that the resulting binaries are not guaranteed to
Quentin Spencer cdd5623
# work well or even at all on other hardware.
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%define archt %{_arch}
Quentin Spencer cdd5623
%define types custom
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%package custom
Quentin Spencer cdd5623
Summary:        Custom-compiled ATLAS libraries
Quentin Spencer cdd5623
Group:          System Environment/Libraries
Quentin Spencer cdd5623
%description custom
Quentin Spencer cdd5623
This package contains the ATLAS (Automatically Tuned Linear Algebra
Quentin Spencer cdd5623
Software) libraries compiled with all compile-time optimizations enabled.
Quentin Spencer cdd5623
%package custom-devel
Quentin Spencer cdd5623
Summary:        Development libraries for ATLAS with AltiVec extensions
Quentin Spencer cdd5623
Group:          Development/Libraries
Quentin Spencer ee675c2
Requires:       %{name}-custom = %{version}-%{release}
Quentin Spencer cdd5623
%description custom-devel
Quentin Spencer cdd5623
This package contains headers and static versions of the ATLAS
Quentin Spencer cdd5623
(Automatically Tuned Linear Algebra Software) libraries compiled with
Quentin Spencer cdd5623
all compile-time optimizations enabled.
Quentin Spencer cdd5623
%endif
Quentin Spencer cdd5623
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%prep
Quentin Spencer cdd5623
%setup -q -n ATLAS
Quentin Spencer cdd5623
%patch0 -p1
Quentin Spencer cdd5623
%patch1 -p0
Quentin Spencer cdd5623
cp %{SOURCE1} doc
Quentin Spencer cdd5623
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%build
Quentin Spencer cdd5623
# The following build procedure is more or less copied from the Debian
Quentin Spencer cdd5623
# sources, where the output of a previously recorded build is
Quentin Spencer cdd5623
# replayed, so as to bypass the compile-time optimizations and produce
Quentin Spencer cdd5623
# predictable results independent of the hardware on which it is
Quentin Spencer cdd5623
# compiled. This forces builds to be sequential, so SMP builds are not
Quentin Spencer cdd5623
# supported.
Quentin Spencer cdd5623
chmod +x debian/config.expect debian/ab
Quentin Spencer cdd5623
sed -i debian/ab -e s/g77/gfortran/
Quentin Spencer cdd5623
Quentin Spencer cdd5623
########## Static Libraries ##########################################
Quentin Spencer cdd5623
for TYPE in %{types}; do
Quentin Spencer cdd5623
  if [ "$TYPE" = "3dnow" ]; then
Quentin Spencer cdd5623
    TDN=y
Quentin Spencer cdd5623
  else
Quentin Spencer cdd5623
    TDN=n
Quentin Spencer cdd5623
  fi
Quentin Spencer cdd5623
  BUILD_DIR=Linux_${TYPE}_static
Quentin Spencer cdd5623
  ARCH_DIR=$BUILD_DIR CACHE_SIZE= BIT=%{bit} \
Quentin Spencer cdd5623
    DEFAULTS=y TDNCOMP=$TDN debian/config.expect
Quentin Spencer cdd5623
  cat Make.$BUILD_DIR |\
Quentin Spencer cdd5623
	sed -e "s, TOPdir = \(.*\), TOPdir = `pwd`,1" \
Quentin Spencer cdd5623
	    -e "s, FLAPACKlib = , FLAPACKlib = %{_libdir}/liblapack.a,1" >foo
Quentin Spencer cdd5623
  mv foo Make.$BUILD_DIR
Quentin Spencer cdd5623
  make killall arch=$BUILD_DIR
Quentin Spencer cdd5623
  make startup arch=$BUILD_DIR
Quentin Spencer cdd5623
Quentin Spencer cdd5623
  if [ "$TYPE" = "custom" ]; then
Quentin Spencer 2c4ed29
    BUILD_DATA_DIR=atlas-$TYPE-%{archt}
Quentin Spencer 2c4ed29
    if [ -a %{_sourcedir}/$BUILD_DATA_DIR.tgz ]; then
Quentin Spencer 2c4ed29
      tar zxf %{_sourcedir}/$BUILD_DATA_DIR.tgz
Quentin Spencer cdd5623
    else
Quentin Spencer cdd5623
      make install arch=$BUILD_DIR >out 2>&1 &
Quentin Spencer cdd5623
      pid=$!
Quentin Spencer cdd5623
      echo Waiting on $pid
Quentin Spencer cdd5623
      tail -f --pid $pid out &
Quentin Spencer cdd5623
      wait $pid
Quentin Spencer cdd5623
      rm -rf ${BUILD_DATA_DIR}
Quentin Spencer cdd5623
      mkdir -p ${BUILD_DATA_DIR}
Quentin Spencer cdd5623
      cat out | sed -e "s,`pwd`,TOPDIR,g" -e "s,$BUILD_DIR,CARCH,g" | \
Quentin Spencer cdd5623
		gzip -9 | uuencode - >${BUILD_DATA_DIR}/build.uu
Quentin Spencer cdd5623
      rm -f out
Quentin Spencer cdd5623
      mkdir -p ${BUILD_DATA_DIR}/include
Quentin Spencer cdd5623
      cp include/$BUILD_DIR/* ${BUILD_DATA_DIR}/include
Quentin Spencer cdd5623
      mkdir -p ${BUILD_DATA_DIR}/mm
Quentin Spencer cdd5623
      cp tune/blas/gemm/$BUILD_DIR/res/* ${BUILD_DATA_DIR}/mm
Quentin Spencer cdd5623
      mkdir -p ${BUILD_DATA_DIR}/mv
Quentin Spencer cdd5623
      cp tune/blas/gemv/$BUILD_DIR/res/* ${BUILD_DATA_DIR}/mv
Quentin Spencer cdd5623
      mkdir -p ${BUILD_DATA_DIR}/r1
Quentin Spencer cdd5623
      cp tune/blas/ger/$BUILD_DIR/res/* ${BUILD_DATA_DIR}/r1
Quentin Spencer cdd5623
      mkdir -p ${BUILD_DATA_DIR}/l1
Quentin Spencer cdd5623
      cp tune/blas/level1/$BUILD_DIR/res/* ${BUILD_DATA_DIR}/l1
Quentin Spencer 2c4ed29
      tar zcf %{_sourcedir}/${BUILD_DATA_DIR}.tgz ${BUILD_DATA_DIR}
Quentin Spencer cdd5623
    fi
Quentin Spencer cdd5623
  else
Quentin Spencer cdd5623
    BUILD_DATA_DIR=debian/%{archt}/${TYPE}
Quentin Spencer cdd5623
  fi
Quentin Spencer cdd5623
Quentin Spencer cdd5623
  cp ${BUILD_DATA_DIR}/mm/* tune/blas/gemm/$BUILD_DIR/res
Quentin Spencer cdd5623
  cp ${BUILD_DATA_DIR}/mv/* tune/blas/gemv/$BUILD_DIR/res
Quentin Spencer cdd5623
  cp ${BUILD_DATA_DIR}/r1/* tune/blas/ger/$BUILD_DIR/res
Quentin Spencer cdd5623
  cp ${BUILD_DATA_DIR}/l1/* tune/blas/level1/$BUILD_DIR/res
Quentin Spencer cdd5623
  cp ${BUILD_DATA_DIR}/include/* include/$BUILD_DIR
Quentin Spencer cdd5623
Quentin Spencer cdd5623
  cat ${BUILD_DATA_DIR}/build.uu | uudecode | zcat - | \
Quentin Spencer cdd5623
	sed -e s/g77/gfortran/ -e s/-DAdd__/-DAdd_/ | debian/ab topdir=`pwd` \
Quentin Spencer 9e15abc
	carch=$BUILD_DIR fpic="-Wa,--noexecstack" debug= | bash -x -e
Quentin Spencer cdd5623
  mv lib/$BUILD_DIR/liblapack.a lib/$BUILD_DIR/liblapack_atlas.a
Quentin Spencer cdd5623
Quentin Spencer cdd5623
  # Create replacement for BLAS and LAPACK Libraries
Quentin Spencer cdd5623
  mkdir tmp
Quentin Spencer cdd5623
  pushd tmp
Quentin Spencer cdd5623
    ar x ../lib/$BUILD_DIR/libatlas.a
Quentin Spencer cdd5623
    ar x ../lib/$BUILD_DIR/libf77blas.a
Quentin Spencer cdd5623
    ar x ../lib/$BUILD_DIR/libcblas.a
Quentin Spencer cdd5623
  popd
Quentin Spencer cdd5623
  rm -f lib/$BUILD_DIR/libblas.a
Quentin Spencer cdd5623
  ar r lib/$BUILD_DIR/libblas.a tmp/*.o
Quentin Spencer cdd5623
  rm -rf tmp
Quentin Spencer cdd5623
Quentin Spencer cdd5623
  mkdir tmp
Quentin Spencer cdd5623
  pushd tmp
Quentin Spencer cdd5623
    ar x %{_libdir}/liblapack.a
Quentin Spencer cdd5623
    ar x ../lib/$BUILD_DIR/liblapack_atlas.a
Quentin Spencer cdd5623
    ar x ../lib/$BUILD_DIR/libcblas.a
Quentin Spencer cdd5623
  popd
Quentin Spencer cdd5623
  rm -f lib/$BUILD_DIR/liblapack.a
Quentin Spencer cdd5623
  ar r lib/$BUILD_DIR/liblapack.a tmp/*.o
Quentin Spencer cdd5623
  rm -rf tmp
Quentin Spencer cdd5623
Quentin Spencer cdd5623
  ########## Shared Libraries ##########################################
Quentin Spencer cdd5623
  BUILD_DIR=Linux_${TYPE}_shared
Quentin Spencer cdd5623
  ARCH_DIR=$BUILD_DIR CACHE_SIZE= BIT=%{bit} \
Quentin Spencer cdd5623
      DEFAULTS=y TDNCOMP=$TDN debian/config.expect
Quentin Spencer cdd5623
  cat Make.$BUILD_DIR |\
Quentin Spencer cdd5623
	sed -e "s, TOPdir = \(.*\), TOPdir = `pwd`,1" \
Quentin Spencer 2c4ed29
	    -e "s, FLAPACKlib = , FLAPACKlib = %{_libdir}/liblapack_pic.a,1" \
Quentin Spencer cdd5623
	    -e "s, F77FLAGS = \(.*\), F77FLAGS = \1 -fPIC,1" \
Quentin Spencer cdd5623
	    -e "s, CCFLAGS = \(.*\), CCFLAGS = \1 -fPIC,1" \
Quentin Spencer cdd5623
	    -e "s, MMFLAGS = \(.*\), MMFLAGS = \1 -fPIC,1" \
Quentin Spencer cdd5623
	    -e "s, XCCFLAGS = \(.*\), XCCFLAGS = \1 -fPIC,1" >foo
Quentin Spencer cdd5623
  mv foo Make.$BUILD_DIR
Quentin Spencer cdd5623
  make killall arch=$BUILD_DIR
Quentin Spencer cdd5623
  make startup arch=$BUILD_DIR
Quentin Spencer cdd5623
Quentin Spencer cdd5623
  cp ${BUILD_DATA_DIR}/mm/* tune/blas/gemm/$BUILD_DIR/res
Quentin Spencer cdd5623
  cp ${BUILD_DATA_DIR}/mv/* tune/blas/gemv/$BUILD_DIR/res
Quentin Spencer cdd5623
  cp ${BUILD_DATA_DIR}/r1/* tune/blas/ger/$BUILD_DIR/res
Quentin Spencer cdd5623
  cp ${BUILD_DATA_DIR}/l1/* tune/blas/level1/$BUILD_DIR/res
Quentin Spencer cdd5623
  cp ${BUILD_DATA_DIR}/include/* include/$BUILD_DIR
Quentin Spencer cdd5623
Quentin Spencer cdd5623
  cat ${BUILD_DATA_DIR}/build.uu | uudecode | zcat - | \
Quentin Spencer cdd5623
	sed -e s/g77/gfortran/ -e s/-DAdd__/-DAdd_/ | debian/ab topdir=`pwd` \
Quentin Spencer 9e15abc
	carch=$BUILD_DIR fpic="-Wa,--noexecstack -fPIC" debug= | bash -x -e
Quentin Spencer cdd5623
  mv lib/$BUILD_DIR/liblapack.a lib/$BUILD_DIR/liblapack_atlas.a
Quentin Spencer cdd5623
Quentin Spencer cdd5623
  mkdir tmp
Quentin Spencer cdd5623
  pushd tmp
Quentin Spencer cdd5623
    ar x ../lib/$BUILD_DIR/libatlas.a
Quentin Spencer cdd5623
    rm -f ilaenv.o
Quentin Spencer cdd5623
  popd
Quentin Spencer cdd5623
  cc -shared -Wl,-soname=libatlas.so.%{ver_major} \
Quentin Spencer cdd5623
	-o lib/$BUILD_DIR/libatlas.so.%{ver} tmp/*.o -lm
Quentin Spencer cdd5623
  ln -s libatlas.so.%{ver} lib/$BUILD_DIR/libatlas.so.%{ver_major}
Quentin Spencer cdd5623
  ln -s libatlas.so.%{ver} lib/$BUILD_DIR/libatlas.so
Quentin Spencer cdd5623
  rm -rf tmp
Quentin Spencer cdd5623
Quentin Spencer cdd5623
  mkdir tmp
Quentin Spencer cdd5623
  pushd tmp
Quentin Spencer cdd5623
    ar x ../lib/$BUILD_DIR/libcblas.a
Quentin Spencer cdd5623
    rm -f ilaenv.o
Quentin Spencer cdd5623
  popd
Quentin Spencer cdd5623
  cc -shared -Wl,-soname=libcblas.so.%{ver_major} \
Quentin Spencer cdd5623
	-o lib/$BUILD_DIR/libcblas.so.%{ver} tmp/*.o -L lib/$BUILD_DIR -latlas
Quentin Spencer cdd5623
  ln -s libcblas.so.%{ver} lib/$BUILD_DIR/libcblas.so.%{ver_major}
Quentin Spencer cdd5623
  ln -s libcblas.so.%{ver} lib/$BUILD_DIR/libcblas.so
Quentin Spencer cdd5623
  rm -rf tmp
Quentin Spencer cdd5623
Quentin Spencer cdd5623
  mkdir tmp
Quentin Spencer cdd5623
  pushd tmp
Quentin Spencer cdd5623
    ar x ../lib/$BUILD_DIR/libf77blas.a
Quentin Spencer cdd5623
    rm -f ilaenv.o
Quentin Spencer cdd5623
  popd
Quentin Spencer cdd5623
  cc -shared -Wl,-soname=libf77blas.so.%{ver_major} \
Quentin Spencer cdd5623
	-o lib/$BUILD_DIR/libf77blas.so.%{ver} tmp/*.o \
Quentin Spencer cdd5623
	-L lib/$BUILD_DIR -latlas -lgfortran
Quentin Spencer cdd5623
  ln -s libf77blas.so.%{ver} lib/$BUILD_DIR/libf77blas.so.%{ver_major}
Quentin Spencer cdd5623
  ln -s libf77blas.so.%{ver} lib/$BUILD_DIR/libf77blas.so
Quentin Spencer cdd5623
  rm -rf tmp
Quentin Spencer cdd5623
Quentin Spencer cdd5623
  mkdir tmp
Quentin Spencer cdd5623
  pushd tmp
Quentin Spencer cdd5623
    ar x ../lib/$BUILD_DIR/liblapack_atlas.a
Quentin Spencer cdd5623
    rm -f ilaenv.o
Quentin Spencer cdd5623
  popd
Quentin Spencer cdd5623
  cc -shared -Wl,-soname=liblapack_atlas.so.%{ver_major} \
Quentin Spencer cdd5623
	-o lib/$BUILD_DIR/liblapack_atlas.so.%{ver} tmp/*.o \
Quentin Spencer cdd5623
	-L lib/$BUILD_DIR -lcblas -lf77blas
Quentin Spencer cdd5623
  ln -s liblapack_atlas.so.%{ver} lib/$BUILD_DIR/liblapack_atlas.so.%{ver_major}
Quentin Spencer cdd5623
  ln -s liblapack_atlas.so.%{ver} lib/$BUILD_DIR/liblapack_atlas.so
Quentin Spencer cdd5623
  rm -rf tmp
Quentin Spencer cdd5623
Quentin Spencer cdd5623
  # Create replacement for BLAS and LAPACK Libraries
Quentin Spencer cdd5623
  mkdir tmp
Quentin Spencer cdd5623
  pushd tmp
Quentin Spencer cdd5623
    ar x ../lib/$BUILD_DIR/libatlas.a
Quentin Spencer cdd5623
    ar x ../lib/$BUILD_DIR/libf77blas.a
Quentin Spencer cdd5623
    ar x ../lib/$BUILD_DIR/libcblas.a
Quentin Spencer cdd5623
  popd
Quentin Spencer cdd5623
  cc -shared -Wl,-soname=libblas.so.%{ver_major} \
Quentin Spencer cdd5623
	-o lib/$BUILD_DIR/libblas.so.%{ver} tmp/*.o -lgfortran
Quentin Spencer cdd5623
  ln -s libblas.so.%{ver} lib/$BUILD_DIR/libblas.so.%{ver_major}
Quentin Spencer cdd5623
  ln -s libblas.so.%{ver} lib/$BUILD_DIR/libblas.so
Quentin Spencer cdd5623
  rm -rf tmp
Quentin Spencer cdd5623
Quentin Spencer cdd5623
  mkdir tmp
Quentin Spencer cdd5623
  pushd tmp
Quentin Spencer cdd5623
    ar x %{_libdir}/liblapack_pic.a
Quentin Spencer cdd5623
    ar x ../lib/$BUILD_DIR/liblapack_atlas.a
Quentin Spencer cdd5623
    ar x ../lib/$BUILD_DIR/libcblas.a
Quentin Spencer cdd5623
  popd
Quentin Spencer cdd5623
  cc -shared -Wl,-soname=liblapack.so.%{ver_major} \
Quentin Spencer cdd5623
	-o lib/$BUILD_DIR/liblapack.so.%{ver} tmp/*.o \
Quentin Spencer cdd5623
	-L lib/$BUILD_DIR -lblas -lgfortran
Quentin Spencer cdd5623
  ln -s liblapack.so.%{ver} lib/$BUILD_DIR/liblapack.so.%{ver_major}
Quentin Spencer cdd5623
  ln -s liblapack.so.%{ver} lib/$BUILD_DIR/liblapack.so
Quentin Spencer cdd5623
  rm -rf tmp
Quentin Spencer cdd5623
done
Quentin Spencer cdd5623
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%install
Quentin Spencer cdd5623
rm -rf $RPM_BUILD_ROOT
Quentin Spencer 2c4ed29
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
Quentin Spencer 2c4ed29
mkdir -p $RPM_BUILD_ROOT%{_includedir}/atlas
Quentin Spencer 2c4ed29
cp -a include/*.h $RPM_BUILD_ROOT%{_includedir}/atlas
Quentin Spencer 2c4ed29
Quentin Spencer 2c4ed29
LIBNAMES="libatlas libcblas libf77blas liblapack_atlas libblas liblapack"
Quentin Spencer cdd5623
for TYPE in %{types}; do
Quentin Spencer cdd5623
  if [ "$TYPE" = "base" ]; then
Quentin Spencer 2c4ed29
    EXTDIR="atlas"
Quentin Spencer 2c4ed29
    echo "%{_libdir}/atlas" \
Quentin Spencer ee675c2
      > $RPM_BUILD_ROOT/etc/ld.so.conf.d/atlas-%{_arch}.conf
Quentin Spencer 2c4ed29
  elif [ "$TYPE" = "custom" ]; then
Quentin Spencer 2c4ed29
    EXTDIR="atlas-custom"
Quentin Spencer 2c4ed29
    echo "%{_libdir}/atlas-custom" \
Quentin Spencer ee675c2
      > $RPM_BUILD_ROOT/etc/ld.so.conf.d/atlas-custom-%{_arch}.conf
Quentin Spencer 2c4ed29
  else
Quentin Spencer 2c4ed29
    EXTDIR=$TYPE
Quentin Spencer ee675c2
    if [ "$TYPE" != "sse2" ]; then
Quentin Spencer ee675c2
      echo "/usr/lib/$TYPE" \
Quentin Spencer ee675c2
        > $RPM_BUILD_ROOT/etc/ld.so.conf.d/atlas-$TYPE.conf
Quentin Spencer ee675c2
    fi
Quentin Spencer cdd5623
  fi
Quentin Spencer cdd5623
Quentin Spencer cdd5623
  mkdir -p $RPM_BUILD_ROOT%{_libdir}/${EXTDIR}
Quentin Spencer 2c4ed29
  for LIB in $LIBNAMES; do
Quentin Spencer 2c4ed29
    LIBS="lib/Linux_${TYPE}_static/$LIB.a lib/Linux_${TYPE}_shared/$LIB.so*"
Quentin Spencer cdd5623
    cp -a $LIBS ${RPM_BUILD_ROOT}%{_libdir}/${EXTDIR}
Quentin Spencer cdd5623
  done
Quentin Spencer cdd5623
done
Quentin Spencer cdd5623
Quentin Spencer cdd5623
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%clean
Quentin Spencer cdd5623
rm -rf $RPM_BUILD_ROOT
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%post -p /sbin/ldconfig
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%postun -p /sbin/ldconfig
Quentin Spencer cdd5623
Quentin Spencer 2c4ed29
%ifarch i386
Quentin Spencer 2c4ed29
Quentin Spencer 2c4ed29
%post -n atlas-sse -p /sbin/ldconfig
Quentin Spencer cdd5623
Quentin Spencer 2c4ed29
%postun -n atlas-sse -p /sbin/ldconfig
Quentin Spencer 2c4ed29
Quentin Spencer 2c4ed29
%post -n atlas-sse2 -p /sbin/ldconfig
Quentin Spencer 2c4ed29
Quentin Spencer 2c4ed29
%postun -n atlas-sse2 -p /sbin/ldconfig
Quentin Spencer 2c4ed29
Quentin Spencer 2c4ed29
%post -n atlas-3dnow -p /sbin/ldconfig
Quentin Spencer 2c4ed29
Quentin Spencer 2c4ed29
%postun -n atlas-3dnow -p /sbin/ldconfig
Quentin Spencer 2c4ed29
Quentin Spencer 2c4ed29
%endif
Quentin Spencer 2c4ed29
%ifarch ppc
Quentin Spencer 2c4ed29
Quentin Spencer 2c4ed29
%post -n atlas-altivec -p /sbin/ldconfig
Quentin Spencer 2c4ed29
Quentin Spencer 2c4ed29
%postun -n atlas-altivec -p /sbin/ldconfig
Quentin Spencer 2c4ed29
Quentin Spencer 2c4ed29
%endif
Quentin Spencer cdd5623
%if "%{?enable_custom_atlas}" == "1"
Quentin Spencer cdd5623
Quentin Spencer 2c4ed29
%post -n atlas-custom -p /sbin/ldconfig
Quentin Spencer 2c4ed29
Quentin Spencer 2c4ed29
%postun -n atlas-custom -p /sbin/ldconfig
Quentin Spencer 2c4ed29
Quentin Spencer 2c4ed29
%files custom
Quentin Spencer 2c4ed29
%defattr(-,root,root,-)
Quentin Spencer 2c4ed29
%doc debian/copyright doc/README.Fedora
Quentin Spencer 2c4ed29
%dir %{_libdir}/atlas-custom
Quentin Spencer 2c4ed29
%{_libdir}/atlas-custom/*.so.*
Quentin Spencer 2c4ed29
%config(noreplace) /etc/ld.so.conf.d/atlas-custom-%{_arch}.conf
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%files custom-devel
Quentin Spencer cdd5623
%defattr(-,root,root,-)
Quentin Spencer cdd5623
%doc debian/copyright doc
Quentin Spencer 2c4ed29
%dir %{_libdir}/atlas-custom
Quentin Spencer 2c4ed29
%{_libdir}/atlas-custom/*.so
Quentin Spencer 2c4ed29
%{_libdir}/atlas-custom/*.a
Quentin Spencer cdd5623
%{_includedir}/atlas
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%else
Quentin Spencer cdd5623
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%files
Quentin Spencer cdd5623
%defattr(-,root,root,-)
Quentin Spencer cdd5623
%doc debian/copyright doc/README.Fedora
Quentin Spencer cdd5623
%dir %{_libdir}/atlas
Quentin Spencer 2c4ed29
%{_libdir}/atlas/*.so.*
Quentin Spencer cdd5623
%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}.conf
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%files devel
Quentin Spencer cdd5623
%defattr(-,root,root,-)
Quentin Spencer cdd5623
%doc debian/copyright doc
Quentin Spencer cdd5623
%{_libdir}/atlas/*.so
Quentin Spencer 2c4ed29
%{_libdir}/atlas/*.a
Quentin Spencer cdd5623
%{_includedir}/atlas
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%ifarch i386
Quentin Spencer cdd5623
Quentin Spencer 2c4ed29
%files sse
Quentin Spencer 2c4ed29
%defattr(-,root,root,-)
Quentin Spencer 2c4ed29
%doc debian/copyright doc/README.Fedora
Quentin Spencer 2c4ed29
%dir %{_libdir}/sse
Quentin Spencer 2c4ed29
%{_libdir}/sse/*.so.*
Quentin Spencer ee675c2
%config(noreplace) /etc/ld.so.conf.d/atlas-sse.conf
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%files sse-devel
Quentin Spencer cdd5623
%defattr(-,root,root,-)
Quentin Spencer cdd5623
%doc debian/copyright doc
Quentin Spencer cdd5623
%dir %{_libdir}/sse
Quentin Spencer 2c4ed29
%{_libdir}/sse/*.so
Quentin Spencer cdd5623
%{_libdir}/sse/*.a
Quentin Spencer cdd5623
%{_includedir}/atlas
Quentin Spencer cdd5623
Quentin Spencer cdd5623
Quentin Spencer 2c4ed29
%files sse2
Quentin Spencer 2c4ed29
%defattr(-,root,root,-)
Quentin Spencer 2c4ed29
%doc debian/copyright doc/README.Fedora
Quentin Spencer 2c4ed29
%dir %{_libdir}/sse2
Quentin Spencer 2c4ed29
%{_libdir}/sse2/*.so.*
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%files sse2-devel
Quentin Spencer cdd5623
%defattr(-,root,root,-)
Quentin Spencer cdd5623
%doc debian/copyright doc
Quentin Spencer cdd5623
%dir %{_libdir}/sse2
Quentin Spencer 2c4ed29
%{_libdir}/sse2/*.so
Quentin Spencer cdd5623
%{_libdir}/sse2/*.a
Quentin Spencer cdd5623
%{_includedir}/atlas
Quentin Spencer cdd5623
Quentin Spencer cdd5623
Quentin Spencer 2c4ed29
%files 3dnow
Quentin Spencer 2c4ed29
%defattr(-,root,root,-)
Quentin Spencer 2c4ed29
%doc debian/copyright doc/README.Fedora
Quentin Spencer 2c4ed29
%dir %{_libdir}/3dnow
Quentin Spencer 2c4ed29
%{_libdir}/3dnow/*.so.*
Quentin Spencer ee675c2
%config(noreplace) /etc/ld.so.conf.d/atlas-3dnow.conf
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%files 3dnow-devel
Quentin Spencer cdd5623
%defattr(-,root,root,-)
Quentin Spencer cdd5623
%doc debian/copyright doc
Quentin Spencer cdd5623
%dir %{_libdir}/3dnow
Quentin Spencer 2c4ed29
%{_libdir}/3dnow/*.so
Quentin Spencer cdd5623
%{_libdir}/3dnow/*.a
Quentin Spencer cdd5623
%{_includedir}/atlas
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%endif
Quentin Spencer cdd5623
%ifarch ppc
Quentin Spencer cdd5623
Quentin Spencer 2c4ed29
%files altivec
Quentin Spencer 2c4ed29
%defattr(-,root,root,-)
Quentin Spencer 2c4ed29
%doc debian/copyright doc/README.Fedora
Quentin Spencer 2c4ed29
%dir %{_libdir}/altivec
Quentin Spencer 2c4ed29
%{_libdir}/altivec/*.so.*
Quentin Spencer ee675c2
%config(noreplace) /etc/ld.so.conf.d/atlas-altivec.conf
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%files altivec-devel
Quentin Spencer cdd5623
%defattr(-,root,root,-)
Quentin Spencer cdd5623
%doc debian/copyright doc
Quentin Spencer cdd5623
%dir %{_libdir}/altivec
Quentin Spencer 2c4ed29
%{_libdir}/altivec/*.so
Quentin Spencer cdd5623
%{_libdir}/altivec/*.a
Quentin Spencer cdd5623
%{_includedir}/atlas
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%endif
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%endif
Quentin Spencer cdd5623
Quentin Spencer cdd5623
%changelog
Quentin Spencer 9e15abc
* Mon Feb 13 2006 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-10
Quentin Spencer 9e15abc
- Rebuild for Fedora Extras 5.
Quentin Spencer 9e15abc
- Add --noexecstack to compilation of assembly kernels. These were
Quentin Spencer 9e15abc
  previously marked executable, which caused problems with selinux.
Quentin Spencer 9e15abc
Quentin Spencer dc9c228
* Mon Dec 19 2005 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-9
Quentin Spencer dc9c228
- Rebuild for gcc 4.1.
Quentin Spencer dc9c228
Quentin Spencer ee675c2
* Mon Oct 10 2005 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-8
Quentin Spencer ee675c2
- Make all devel subpackages depend on their non-devel counterparts.
Quentin Spencer ee675c2
- Add /etc/ld.so.conf.d files for -sse and -3dnow, because they don't
Quentin Spencer ee675c2
  seem to get picked up automatically.
Quentin Spencer ee675c2
Quentin Spencer e97db93
* Wed Oct 05 2005 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-7
Quentin Spencer e97db93
- Forgot to add the new patch to sources.
Quentin Spencer e97db93
Quentin Spencer cdd5623
* Tue Oct 04 2005 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-6
Quentin Spencer 2c4ed29
- Use new Debian patch, and enable shared libs (they previously failed
Quentin Spencer 2c4ed29
  to build on gcc 4).
Quentin Spencer 2c4ed29
- Minor updates to description and README.Fedora file.
Quentin Spencer 2c4ed29
- Fix buildroot name to match FE preferred form.
Quentin Spencer 2c4ed29
- Fixes for custom optimized builds.
Quentin Spencer 2c4ed29
- Add dist tag.
Quentin Spencer cdd5623
Quentin Spencer cdd5623
* Wed Sep 28 2005 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-5
Quentin Spencer cdd5623
- fix files lists.
Quentin Spencer cdd5623
Quentin Spencer cdd5623
* Mon Sep 26 2005 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-4
Quentin Spencer cdd5623
- generate library symlinks earlier for the benefit of later linking steps.
Quentin Spencer cdd5623
Quentin Spencer cdd5623
* Wed Sep 14 2005 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-3
Quentin Spencer cdd5623
- Change lapack dependency to lapack-devel, and use lapack_pic.a for
Quentin Spencer cdd5623
  building liblapack.so.
Quentin Spencer cdd5623
Quentin Spencer cdd5623
* Wed Sep 14 2005 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-2
Quentin Spencer cdd5623
- Add "bit" macro to correctly build on x86_64.
Quentin Spencer cdd5623
Quentin Spencer cdd5623
* Tue Aug 16 2005 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-1
Quentin Spencer cdd5623
- Initial version.