Quentin Spencer cdd562
Name:           atlas
Quentin Spencer cdd562
Version:        3.6.0
Quentin Spencer 2cec08
Release:        11%{?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/
Quentin Spencer cdd562
Source0:        http://prdownloads.sourceforge.net/math-atlas/%{name}%{version}.tar.bz2
Quentin Spencer 2c4ed2
Source1:        README.Fedora
Quentin Spencer 2c4ed2
Patch0:         http://ftp.debian.org/debian/pool/main/a/atlas3/%{name}3_%{version}-20.diff.gz
Quentin Spencer 2c4ed2
Patch1:         %{name}-%{version}-gfortran.patch
Quentin Spencer cdd562
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Quentin Spencer cdd562
Quentin Spencer cdd562
Requires:       /etc/ld.so.conf.d
Quentin Spencer cdd562
Requires(post): /sbin/ldconfig
Quentin Spencer cdd562
Requires(postun): /sbin/ldconfig
Quentin Spencer cdd562
BuildRequires:  gcc-gfortran lapack-devel expect sharutils gawk
Quentin Spencer cdd562
Quentin Spencer cdd562
%define ver_major 3
Quentin Spencer cdd562
%define ver %{ver_major}.0
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
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
Quentin Spencer cdd562
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
Quentin Spencer cdd562
# are created for SSE, SSE2, and 3DNow extensions to ix86 and AltiVec
Quentin Spencer cdd562
# extensions to PowerPC.
Quentin Spencer 2cec08
Quentin Spencer cdd562
%ifarch i386
Quentin Spencer cdd562
%define archt i386
Quentin Spencer cdd562
%define types base sse sse2 3dnow
Quentin Spencer cdd562
Quentin Spencer cdd562
%package sse
Quentin Spencer cdd562
Summary:        ATLAS libraries for SSE extensions
Quentin Spencer cdd562
Group:          System Environment/Libraries
Quentin Spencer cdd562
%description sse
Quentin Spencer cdd562
This package contains the ATLAS (Automatically Tuned Linear Algebra
Quentin Spencer cdd562
Software) libraries compiled with optimizations for the SSE extensions
Quentin Spencer cdd562
to the ix86 architecture.
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}
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
Quentin Spencer cdd562
optimizations for the SSE extensions to the ix86 architecture.
Quentin Spencer cdd562
Quentin Spencer cdd562
Quentin Spencer cdd562
%package sse2
Quentin Spencer cdd562
Summary:        ATLAS libraries for SSE2 extensions
Quentin Spencer cdd562
Group:          System Environment/Libraries
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
Quentin Spencer cdd562
extensions to the ix86 architecture.
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}
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
Quentin Spencer cdd562
Quentin Spencer cdd562
%package 3dnow
Quentin Spencer cdd562
Summary:        ATLAS libraries for 3DNow extensions
Quentin Spencer cdd562
Group:          System Environment/Libraries
Quentin Spencer cdd562
%description 3dnow
Quentin Spencer cdd562
This package contains the ATLAS (Automatically Tuned Linear Algebra
Quentin Spencer cdd562
Software) libraries compiled with optimizations for the 3DNow
Quentin Spencer cdd562
extensions to the ix86 architecture.
Quentin Spencer cdd562
%package 3dnow-devel
Quentin Spencer cdd562
Summary:        Development libraries for ATLAS with 3DNow extensions
Quentin Spencer cdd562
Group:          Development/Libraries
Quentin Spencer ee675c
Requires:       %{name}-3dnow = %{version}-%{release}
Quentin Spencer cdd562
%description 3dnow-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 3DNow extensions to the ix86 architecture.
Quentin Spencer cdd562
Quentin Spencer cdd562
Quentin Spencer cdd562
%endif
Quentin Spencer cdd562
%ifarch ppc
Quentin Spencer cdd562
%define archt powerpc
Quentin Spencer cdd562
%define types base altivec
Quentin Spencer cdd562
Quentin Spencer cdd562
%package altivec
Quentin Spencer cdd562
Summary:        ATLAS libraries for AltiVec extensions
Quentin Spencer cdd562
Group:          System Environment/Libraries
Quentin Spencer cdd562
%description altivec
Quentin Spencer cdd562
This package contains the ATLAS (Automatically Tuned Linear Algebra
Quentin Spencer cdd562
Software) libraries compiled with optimizations for the AltiVec
Quentin Spencer cdd562
extensions to the PowerPC architecture.
Quentin Spencer cdd562
%package altivec-devel
Quentin Spencer cdd562
Summary:        Development libraries for ATLAS with AltiVec extensions
Quentin Spencer cdd562
Group:          Development/Libraries
Quentin Spencer ee675c
Requires:       %{name}-altivec = %{version}-%{release}
Quentin Spencer cdd562
%description altivec-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 AltiVec extensions to the PowerPC architecture.
Quentin Spencer cdd562
Quentin Spencer cdd562
%endif
Quentin Spencer cdd562
%ifarch x86_64
Quentin Spencer cdd562
%define archt amd64
Quentin Spencer cdd562
%define types base
Quentin Spencer cdd562
%define bit 2
Quentin Spencer cdd562
%else
Quentin Spencer cdd562
%define bit 1
Quentin Spencer cdd562
%endif
Quentin Spencer cdd562
Quentin Spencer cdd562
%if "%{?enable_custom_atlas}" == "1"
Quentin Spencer cdd562
# This flag enables building customized ATLAS libraries with all
Quentin Spencer cdd562
# compile-time optimizations. Note that compilation will take a very
Quentin Spencer cdd562
# long time, and that the resulting binaries are not guaranteed to
Quentin Spencer cdd562
# work well or even at all on other hardware.
Quentin Spencer cdd562
Quentin Spencer cdd562
%define archt %{_arch}
Quentin Spencer cdd562
%define types custom
Quentin Spencer cdd562
Quentin Spencer cdd562
%package custom
Quentin Spencer cdd562
Summary:        Custom-compiled ATLAS libraries
Quentin Spencer cdd562
Group:          System Environment/Libraries
Quentin Spencer cdd562
%description custom
Quentin Spencer cdd562
This package contains the ATLAS (Automatically Tuned Linear Algebra
Quentin Spencer cdd562
Software) libraries compiled with all compile-time optimizations enabled.
Quentin Spencer cdd562
%package custom-devel
Quentin Spencer cdd562
Summary:        Development libraries for ATLAS with AltiVec extensions
Quentin Spencer cdd562
Group:          Development/Libraries
Quentin Spencer ee675c
Requires:       %{name}-custom = %{version}-%{release}
Quentin Spencer cdd562
%description custom-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
all compile-time optimizations enabled.
Quentin Spencer cdd562
%endif
Quentin Spencer cdd562
Quentin Spencer cdd562
Quentin Spencer cdd562
%prep
Quentin Spencer cdd562
%setup -q -n ATLAS
Quentin Spencer cdd562
%patch0 -p1
Quentin Spencer cdd562
%patch1 -p0
Quentin Spencer cdd562
cp %{SOURCE1} doc
Quentin Spencer cdd562
Quentin Spencer cdd562
Quentin Spencer cdd562
%build
Quentin Spencer cdd562
# The following build procedure is more or less copied from the Debian
Quentin Spencer cdd562
# sources, where the output of a previously recorded build is
Quentin Spencer cdd562
# replayed, so as to bypass the compile-time optimizations and produce
Quentin Spencer cdd562
# predictable results independent of the hardware on which it is
Quentin Spencer cdd562
# compiled. This forces builds to be sequential, so SMP builds are not
Quentin Spencer cdd562
# supported.
Quentin Spencer cdd562
chmod +x debian/config.expect debian/ab
Quentin Spencer cdd562
sed -i debian/ab -e s/g77/gfortran/
Quentin Spencer cdd562
Quentin Spencer cdd562
########## Static Libraries ##########################################
Quentin Spencer cdd562
for TYPE in %{types}; do
Quentin Spencer cdd562
  if [ "$TYPE" = "3dnow" ]; then
Quentin Spencer cdd562
    TDN=y
Quentin Spencer cdd562
  else
Quentin Spencer cdd562
    TDN=n
Quentin Spencer cdd562
  fi
Quentin Spencer cdd562
  BUILD_DIR=Linux_${TYPE}_static
Quentin Spencer cdd562
  ARCH_DIR=$BUILD_DIR CACHE_SIZE= BIT=%{bit} \
Quentin Spencer cdd562
    DEFAULTS=y TDNCOMP=$TDN debian/config.expect
Quentin Spencer cdd562
  cat Make.$BUILD_DIR |\
Quentin Spencer cdd562
	sed -e "s, TOPdir = \(.*\), TOPdir = `pwd`,1" \
Quentin Spencer cdd562
	    -e "s, FLAPACKlib = , FLAPACKlib = %{_libdir}/liblapack.a,1" >foo
Quentin Spencer cdd562
  mv foo Make.$BUILD_DIR
Quentin Spencer cdd562
  make killall arch=$BUILD_DIR
Quentin Spencer cdd562
  make startup arch=$BUILD_DIR
Quentin Spencer cdd562
Quentin Spencer cdd562
  if [ "$TYPE" = "custom" ]; then
Quentin Spencer 2c4ed2
    BUILD_DATA_DIR=atlas-$TYPE-%{archt}
Quentin Spencer 2c4ed2
    if [ -a %{_sourcedir}/$BUILD_DATA_DIR.tgz ]; then
Quentin Spencer 2c4ed2
      tar zxf %{_sourcedir}/$BUILD_DATA_DIR.tgz
Quentin Spencer cdd562
    else
Quentin Spencer cdd562
      make install arch=$BUILD_DIR >out 2>&1 &
Quentin Spencer cdd562
      pid=$!
Quentin Spencer cdd562
      echo Waiting on $pid
Quentin Spencer cdd562
      tail -f --pid $pid out &
Quentin Spencer cdd562
      wait $pid
Quentin Spencer cdd562
      rm -rf ${BUILD_DATA_DIR}
Quentin Spencer cdd562
      mkdir -p ${BUILD_DATA_DIR}
Quentin Spencer cdd562
      cat out | sed -e "s,`pwd`,TOPDIR,g" -e "s,$BUILD_DIR,CARCH,g" | \
Quentin Spencer cdd562
		gzip -9 | uuencode - >${BUILD_DATA_DIR}/build.uu
Quentin Spencer cdd562
      rm -f out
Quentin Spencer cdd562
      mkdir -p ${BUILD_DATA_DIR}/include
Quentin Spencer cdd562
      cp include/$BUILD_DIR/* ${BUILD_DATA_DIR}/include
Quentin Spencer cdd562
      mkdir -p ${BUILD_DATA_DIR}/mm
Quentin Spencer cdd562
      cp tune/blas/gemm/$BUILD_DIR/res/* ${BUILD_DATA_DIR}/mm
Quentin Spencer cdd562
      mkdir -p ${BUILD_DATA_DIR}/mv
Quentin Spencer cdd562
      cp tune/blas/gemv/$BUILD_DIR/res/* ${BUILD_DATA_DIR}/mv
Quentin Spencer cdd562
      mkdir -p ${BUILD_DATA_DIR}/r1
Quentin Spencer cdd562
      cp tune/blas/ger/$BUILD_DIR/res/* ${BUILD_DATA_DIR}/r1
Quentin Spencer cdd562
      mkdir -p ${BUILD_DATA_DIR}/l1
Quentin Spencer cdd562
      cp tune/blas/level1/$BUILD_DIR/res/* ${BUILD_DATA_DIR}/l1
Quentin Spencer 2c4ed2
      tar zcf %{_sourcedir}/${BUILD_DATA_DIR}.tgz ${BUILD_DATA_DIR}
Quentin Spencer cdd562
    fi
Quentin Spencer cdd562
  else
Quentin Spencer cdd562
    BUILD_DATA_DIR=debian/%{archt}/${TYPE}
Quentin Spencer cdd562
  fi
Quentin Spencer cdd562
Quentin Spencer cdd562
  cp ${BUILD_DATA_DIR}/mm/* tune/blas/gemm/$BUILD_DIR/res
Quentin Spencer cdd562
  cp ${BUILD_DATA_DIR}/mv/* tune/blas/gemv/$BUILD_DIR/res
Quentin Spencer cdd562
  cp ${BUILD_DATA_DIR}/r1/* tune/blas/ger/$BUILD_DIR/res
Quentin Spencer cdd562
  cp ${BUILD_DATA_DIR}/l1/* tune/blas/level1/$BUILD_DIR/res
Quentin Spencer cdd562
  cp ${BUILD_DATA_DIR}/include/* include/$BUILD_DIR
Quentin Spencer cdd562
Quentin Spencer cdd562
  cat ${BUILD_DATA_DIR}/build.uu | uudecode | zcat - | \
Quentin Spencer cdd562
	sed -e s/g77/gfortran/ -e s/-DAdd__/-DAdd_/ | debian/ab topdir=`pwd` \
Quentin Spencer 9e15ab
	carch=$BUILD_DIR fpic="-Wa,--noexecstack" debug= | bash -x -e
Quentin Spencer cdd562
  mv lib/$BUILD_DIR/liblapack.a lib/$BUILD_DIR/liblapack_atlas.a
Quentin Spencer cdd562
Quentin Spencer cdd562
  # Create replacement for BLAS and LAPACK Libraries
Quentin Spencer cdd562
  mkdir tmp
Quentin Spencer cdd562
  pushd tmp
Quentin Spencer cdd562
    ar x ../lib/$BUILD_DIR/libatlas.a
Quentin Spencer cdd562
    ar x ../lib/$BUILD_DIR/libf77blas.a
Quentin Spencer cdd562
    ar x ../lib/$BUILD_DIR/libcblas.a
Quentin Spencer cdd562
  popd
Quentin Spencer cdd562
  rm -f lib/$BUILD_DIR/libblas.a
Quentin Spencer cdd562
  ar r lib/$BUILD_DIR/libblas.a tmp/*.o
Quentin Spencer cdd562
  rm -rf tmp
Quentin Spencer cdd562
Quentin Spencer cdd562
  mkdir tmp
Quentin Spencer cdd562
  pushd tmp
Quentin Spencer cdd562
    ar x %{_libdir}/liblapack.a
Quentin Spencer cdd562
    ar x ../lib/$BUILD_DIR/liblapack_atlas.a
Quentin Spencer cdd562
    ar x ../lib/$BUILD_DIR/libcblas.a
Quentin Spencer cdd562
  popd
Quentin Spencer cdd562
  rm -f lib/$BUILD_DIR/liblapack.a
Quentin Spencer cdd562
  ar r lib/$BUILD_DIR/liblapack.a tmp/*.o
Quentin Spencer cdd562
  rm -rf tmp
Quentin Spencer cdd562
Quentin Spencer cdd562
  ########## Shared Libraries ##########################################
Quentin Spencer cdd562
  BUILD_DIR=Linux_${TYPE}_shared
Quentin Spencer cdd562
  ARCH_DIR=$BUILD_DIR CACHE_SIZE= BIT=%{bit} \
Quentin Spencer cdd562
      DEFAULTS=y TDNCOMP=$TDN debian/config.expect
Quentin Spencer cdd562
  cat Make.$BUILD_DIR |\
Quentin Spencer cdd562
	sed -e "s, TOPdir = \(.*\), TOPdir = `pwd`,1" \
Quentin Spencer 2c4ed2
	    -e "s, FLAPACKlib = , FLAPACKlib = %{_libdir}/liblapack_pic.a,1" \
Quentin Spencer cdd562
	    -e "s, F77FLAGS = \(.*\), F77FLAGS = \1 -fPIC,1" \
Quentin Spencer cdd562
	    -e "s, CCFLAGS = \(.*\), CCFLAGS = \1 -fPIC,1" \
Quentin Spencer cdd562
	    -e "s, MMFLAGS = \(.*\), MMFLAGS = \1 -fPIC,1" \
Quentin Spencer cdd562
	    -e "s, XCCFLAGS = \(.*\), XCCFLAGS = \1 -fPIC,1" >foo
Quentin Spencer cdd562
  mv foo Make.$BUILD_DIR
Quentin Spencer cdd562
  make killall arch=$BUILD_DIR
Quentin Spencer cdd562
  make startup arch=$BUILD_DIR
Quentin Spencer cdd562
Quentin Spencer cdd562
  cp ${BUILD_DATA_DIR}/mm/* tune/blas/gemm/$BUILD_DIR/res
Quentin Spencer cdd562
  cp ${BUILD_DATA_DIR}/mv/* tune/blas/gemv/$BUILD_DIR/res
Quentin Spencer cdd562
  cp ${BUILD_DATA_DIR}/r1/* tune/blas/ger/$BUILD_DIR/res
Quentin Spencer cdd562
  cp ${BUILD_DATA_DIR}/l1/* tune/blas/level1/$BUILD_DIR/res
Quentin Spencer cdd562
  cp ${BUILD_DATA_DIR}/include/* include/$BUILD_DIR
Quentin Spencer cdd562
Quentin Spencer cdd562
  cat ${BUILD_DATA_DIR}/build.uu | uudecode | zcat - | \
Quentin Spencer cdd562
	sed -e s/g77/gfortran/ -e s/-DAdd__/-DAdd_/ | debian/ab topdir=`pwd` \
Quentin Spencer 9e15ab
	carch=$BUILD_DIR fpic="-Wa,--noexecstack -fPIC" debug= | bash -x -e
Quentin Spencer cdd562
  mv lib/$BUILD_DIR/liblapack.a lib/$BUILD_DIR/liblapack_atlas.a
Quentin Spencer cdd562
Quentin Spencer cdd562
  mkdir tmp
Quentin Spencer cdd562
  pushd tmp
Quentin Spencer cdd562
    ar x ../lib/$BUILD_DIR/libatlas.a
Quentin Spencer cdd562
    rm -f ilaenv.o
Quentin Spencer cdd562
  popd
Quentin Spencer cdd562
  cc -shared -Wl,-soname=libatlas.so.%{ver_major} \
Quentin Spencer cdd562
	-o lib/$BUILD_DIR/libatlas.so.%{ver} tmp/*.o -lm
Quentin Spencer cdd562
  ln -s libatlas.so.%{ver} lib/$BUILD_DIR/libatlas.so.%{ver_major}
Quentin Spencer cdd562
  ln -s libatlas.so.%{ver} lib/$BUILD_DIR/libatlas.so
Quentin Spencer cdd562
  rm -rf tmp
Quentin Spencer cdd562
Quentin Spencer cdd562
  mkdir tmp
Quentin Spencer cdd562
  pushd tmp
Quentin Spencer cdd562
    ar x ../lib/$BUILD_DIR/libcblas.a
Quentin Spencer cdd562
    rm -f ilaenv.o
Quentin Spencer cdd562
  popd
Quentin Spencer cdd562
  cc -shared -Wl,-soname=libcblas.so.%{ver_major} \
Quentin Spencer cdd562
	-o lib/$BUILD_DIR/libcblas.so.%{ver} tmp/*.o -L lib/$BUILD_DIR -latlas
Quentin Spencer cdd562
  ln -s libcblas.so.%{ver} lib/$BUILD_DIR/libcblas.so.%{ver_major}
Quentin Spencer cdd562
  ln -s libcblas.so.%{ver} lib/$BUILD_DIR/libcblas.so
Quentin Spencer cdd562
  rm -rf tmp
Quentin Spencer cdd562
Quentin Spencer cdd562
  mkdir tmp
Quentin Spencer cdd562
  pushd tmp
Quentin Spencer cdd562
    ar x ../lib/$BUILD_DIR/libf77blas.a
Quentin Spencer cdd562
    rm -f ilaenv.o
Quentin Spencer cdd562
  popd
Quentin Spencer cdd562
  cc -shared -Wl,-soname=libf77blas.so.%{ver_major} \
Quentin Spencer cdd562
	-o lib/$BUILD_DIR/libf77blas.so.%{ver} tmp/*.o \
Quentin Spencer cdd562
	-L lib/$BUILD_DIR -latlas -lgfortran
Quentin Spencer cdd562
  ln -s libf77blas.so.%{ver} lib/$BUILD_DIR/libf77blas.so.%{ver_major}
Quentin Spencer cdd562
  ln -s libf77blas.so.%{ver} lib/$BUILD_DIR/libf77blas.so
Quentin Spencer cdd562
  rm -rf tmp
Quentin Spencer cdd562
Quentin Spencer cdd562
  mkdir tmp
Quentin Spencer cdd562
  pushd tmp
Quentin Spencer cdd562
    ar x ../lib/$BUILD_DIR/liblapack_atlas.a
Quentin Spencer cdd562
    rm -f ilaenv.o
Quentin Spencer cdd562
  popd
Quentin Spencer cdd562
  cc -shared -Wl,-soname=liblapack_atlas.so.%{ver_major} \
Quentin Spencer cdd562
	-o lib/$BUILD_DIR/liblapack_atlas.so.%{ver} tmp/*.o \
Quentin Spencer cdd562
	-L lib/$BUILD_DIR -lcblas -lf77blas
Quentin Spencer cdd562
  ln -s liblapack_atlas.so.%{ver} lib/$BUILD_DIR/liblapack_atlas.so.%{ver_major}
Quentin Spencer cdd562
  ln -s liblapack_atlas.so.%{ver} lib/$BUILD_DIR/liblapack_atlas.so
Quentin Spencer cdd562
  rm -rf tmp
Quentin Spencer cdd562
Quentin Spencer cdd562
  # Create replacement for BLAS and LAPACK Libraries
Quentin Spencer cdd562
  mkdir tmp
Quentin Spencer cdd562
  pushd tmp
Quentin Spencer cdd562
    ar x ../lib/$BUILD_DIR/libatlas.a
Quentin Spencer cdd562
    ar x ../lib/$BUILD_DIR/libf77blas.a
Quentin Spencer cdd562
    ar x ../lib/$BUILD_DIR/libcblas.a
Quentin Spencer cdd562
  popd
Quentin Spencer cdd562
  cc -shared -Wl,-soname=libblas.so.%{ver_major} \
Quentin Spencer cdd562
	-o lib/$BUILD_DIR/libblas.so.%{ver} tmp/*.o -lgfortran
Quentin Spencer cdd562
  ln -s libblas.so.%{ver} lib/$BUILD_DIR/libblas.so.%{ver_major}
Quentin Spencer cdd562
  ln -s libblas.so.%{ver} lib/$BUILD_DIR/libblas.so
Quentin Spencer cdd562
  rm -rf tmp
Quentin Spencer cdd562
Quentin Spencer cdd562
  mkdir tmp
Quentin Spencer cdd562
  pushd tmp
Quentin Spencer cdd562
    ar x %{_libdir}/liblapack_pic.a
Quentin Spencer cdd562
    ar x ../lib/$BUILD_DIR/liblapack_atlas.a
Quentin Spencer cdd562
    ar x ../lib/$BUILD_DIR/libcblas.a
Quentin Spencer cdd562
  popd
Quentin Spencer cdd562
  cc -shared -Wl,-soname=liblapack.so.%{ver_major} \
Quentin Spencer cdd562
	-o lib/$BUILD_DIR/liblapack.so.%{ver} tmp/*.o \
Quentin Spencer cdd562
	-L lib/$BUILD_DIR -lblas -lgfortran
Quentin Spencer cdd562
  ln -s liblapack.so.%{ver} lib/$BUILD_DIR/liblapack.so.%{ver_major}
Quentin Spencer cdd562
  ln -s liblapack.so.%{ver} lib/$BUILD_DIR/liblapack.so
Quentin Spencer cdd562
  rm -rf tmp
Quentin Spencer cdd562
done
Quentin Spencer cdd562
Quentin Spencer cdd562
Quentin Spencer cdd562
%install
Quentin Spencer cdd562
rm -rf $RPM_BUILD_ROOT
Quentin Spencer 2c4ed2
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
Quentin Spencer 2c4ed2
mkdir -p $RPM_BUILD_ROOT%{_includedir}/atlas
Quentin Spencer 2c4ed2
cp -a include/*.h $RPM_BUILD_ROOT%{_includedir}/atlas
Quentin Spencer 2c4ed2
Quentin Spencer 2c4ed2
LIBNAMES="libatlas libcblas libf77blas liblapack_atlas libblas liblapack"
Quentin Spencer cdd562
for TYPE in %{types}; do
Quentin Spencer cdd562
  if [ "$TYPE" = "base" ]; then
Quentin Spencer 2c4ed2
    EXTDIR="atlas"
Quentin Spencer 2c4ed2
    echo "%{_libdir}/atlas" \
Quentin Spencer ee675c
      > $RPM_BUILD_ROOT/etc/ld.so.conf.d/atlas-%{_arch}.conf
Quentin Spencer 2c4ed2
  elif [ "$TYPE" = "custom" ]; then
Quentin Spencer 2c4ed2
    EXTDIR="atlas-custom"
Quentin Spencer 2c4ed2
    echo "%{_libdir}/atlas-custom" \
Quentin Spencer ee675c
      > $RPM_BUILD_ROOT/etc/ld.so.conf.d/atlas-custom-%{_arch}.conf
Quentin Spencer 2c4ed2
  else
Quentin Spencer 2c4ed2
    EXTDIR=$TYPE
Quentin Spencer ee675c
    if [ "$TYPE" != "sse2" ]; then
Quentin Spencer ee675c
      echo "/usr/lib/$TYPE" \
Quentin Spencer ee675c
        > $RPM_BUILD_ROOT/etc/ld.so.conf.d/atlas-$TYPE.conf
Quentin Spencer ee675c
    fi
Quentin Spencer cdd562
  fi
Quentin Spencer cdd562
Quentin Spencer cdd562
  mkdir -p $RPM_BUILD_ROOT%{_libdir}/${EXTDIR}
Quentin Spencer 2c4ed2
  for LIB in $LIBNAMES; do
Quentin Spencer 2c4ed2
    LIBS="lib/Linux_${TYPE}_static/$LIB.a lib/Linux_${TYPE}_shared/$LIB.so*"
Quentin Spencer cdd562
    cp -a $LIBS ${RPM_BUILD_ROOT}%{_libdir}/${EXTDIR}
Quentin Spencer cdd562
  done
Quentin Spencer cdd562
done
Quentin Spencer cdd562
Quentin Spencer cdd562
Quentin Spencer cdd562
Quentin Spencer cdd562
%clean
Quentin Spencer cdd562
rm -rf $RPM_BUILD_ROOT
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 2c4ed2
%ifarch i386
Quentin Spencer 2c4ed2
Quentin Spencer 2c4ed2
%post -n atlas-sse -p /sbin/ldconfig
Quentin Spencer cdd562
Quentin Spencer 2c4ed2
%postun -n atlas-sse -p /sbin/ldconfig
Quentin Spencer 2c4ed2
Quentin Spencer 2c4ed2
%post -n atlas-sse2 -p /sbin/ldconfig
Quentin Spencer 2c4ed2
Quentin Spencer 2c4ed2
%postun -n atlas-sse2 -p /sbin/ldconfig
Quentin Spencer 2c4ed2
Quentin Spencer 2c4ed2
%post -n atlas-3dnow -p /sbin/ldconfig
Quentin Spencer 2c4ed2
Quentin Spencer 2c4ed2
%postun -n atlas-3dnow -p /sbin/ldconfig
Quentin Spencer 2c4ed2
Quentin Spencer 2c4ed2
%endif
Quentin Spencer 2c4ed2
%ifarch ppc
Quentin Spencer 2c4ed2
Quentin Spencer 2c4ed2
%post -n atlas-altivec -p /sbin/ldconfig
Quentin Spencer 2c4ed2
Quentin Spencer 2c4ed2
%postun -n atlas-altivec -p /sbin/ldconfig
Quentin Spencer 2c4ed2
Quentin Spencer 2c4ed2
%endif
Quentin Spencer cdd562
%if "%{?enable_custom_atlas}" == "1"
Quentin Spencer cdd562
Quentin Spencer 2c4ed2
%post -n atlas-custom -p /sbin/ldconfig
Quentin Spencer 2c4ed2
Quentin Spencer 2c4ed2
%postun -n atlas-custom -p /sbin/ldconfig
Quentin Spencer 2c4ed2
Quentin Spencer 2c4ed2
%files custom
Quentin Spencer 2c4ed2
%defattr(-,root,root,-)
Quentin Spencer 2c4ed2
%doc debian/copyright doc/README.Fedora
Quentin Spencer 2c4ed2
%dir %{_libdir}/atlas-custom
Quentin Spencer 2c4ed2
%{_libdir}/atlas-custom/*.so.*
Quentin Spencer 2c4ed2
%config(noreplace) /etc/ld.so.conf.d/atlas-custom-%{_arch}.conf
Quentin Spencer cdd562
Quentin Spencer cdd562
%files custom-devel
Quentin Spencer cdd562
%defattr(-,root,root,-)
Quentin Spencer cdd562
%doc debian/copyright doc
Quentin Spencer 2c4ed2
%dir %{_libdir}/atlas-custom
Quentin Spencer 2c4ed2
%{_libdir}/atlas-custom/*.so
Quentin Spencer 2c4ed2
%{_libdir}/atlas-custom/*.a
Quentin Spencer cdd562
%{_includedir}/atlas
Quentin Spencer cdd562
Quentin Spencer cdd562
%else
Quentin Spencer cdd562
Quentin Spencer cdd562
Quentin Spencer cdd562
%files
Quentin Spencer cdd562
%defattr(-,root,root,-)
Quentin Spencer cdd562
%doc debian/copyright 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,-)
Quentin Spencer cdd562
%doc debian/copyright doc
Quentin Spencer cdd562
%{_libdir}/atlas/*.so
Quentin Spencer 2c4ed2
%{_libdir}/atlas/*.a
Quentin Spencer cdd562
%{_includedir}/atlas
Quentin Spencer cdd562
Quentin Spencer cdd562
%ifarch i386
Quentin Spencer cdd562
Quentin Spencer 2c4ed2
%files sse
Quentin Spencer 2c4ed2
%defattr(-,root,root,-)
Quentin Spencer 2c4ed2
%doc debian/copyright doc/README.Fedora
Quentin Spencer 2c4ed2
%dir %{_libdir}/sse
Quentin Spencer 2c4ed2
%{_libdir}/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,-)
Quentin Spencer cdd562
%doc debian/copyright doc
Quentin Spencer cdd562
%dir %{_libdir}/sse
Quentin Spencer 2c4ed2
%{_libdir}/sse/*.so
Quentin Spencer cdd562
%{_libdir}/sse/*.a
Quentin Spencer cdd562
%{_includedir}/atlas
Quentin Spencer cdd562
Quentin Spencer cdd562
Quentin Spencer 2c4ed2
%files sse2
Quentin Spencer 2c4ed2
%defattr(-,root,root,-)
Quentin Spencer 2c4ed2
%doc debian/copyright doc/README.Fedora
Quentin Spencer 2c4ed2
%dir %{_libdir}/sse2
Quentin Spencer 2c4ed2
%{_libdir}/sse2/*.so.*
Quentin Spencer cdd562
Quentin Spencer cdd562
%files sse2-devel
Quentin Spencer cdd562
%defattr(-,root,root,-)
Quentin Spencer cdd562
%doc debian/copyright doc
Quentin Spencer cdd562
%dir %{_libdir}/sse2
Quentin Spencer 2c4ed2
%{_libdir}/sse2/*.so
Quentin Spencer cdd562
%{_libdir}/sse2/*.a
Quentin Spencer cdd562
%{_includedir}/atlas
Quentin Spencer cdd562
Quentin Spencer cdd562
Quentin Spencer 2c4ed2
%files 3dnow
Quentin Spencer 2c4ed2
%defattr(-,root,root,-)
Quentin Spencer 2c4ed2
%doc debian/copyright doc/README.Fedora
Quentin Spencer 2c4ed2
%dir %{_libdir}/3dnow
Quentin Spencer 2c4ed2
%{_libdir}/3dnow/*.so.*
Quentin Spencer ee675c
%config(noreplace) /etc/ld.so.conf.d/atlas-3dnow.conf
Quentin Spencer cdd562
Quentin Spencer cdd562
%files 3dnow-devel
Quentin Spencer cdd562
%defattr(-,root,root,-)
Quentin Spencer cdd562
%doc debian/copyright doc
Quentin Spencer cdd562
%dir %{_libdir}/3dnow
Quentin Spencer 2c4ed2
%{_libdir}/3dnow/*.so
Quentin Spencer cdd562
%{_libdir}/3dnow/*.a
Quentin Spencer cdd562
%{_includedir}/atlas
Quentin Spencer cdd562
Quentin Spencer cdd562
%endif
Quentin Spencer cdd562
%ifarch ppc
Quentin Spencer cdd562
Quentin Spencer 2c4ed2
%files altivec
Quentin Spencer 2c4ed2
%defattr(-,root,root,-)
Quentin Spencer 2c4ed2
%doc debian/copyright doc/README.Fedora
Quentin Spencer 2c4ed2
%dir %{_libdir}/altivec
Quentin Spencer 2c4ed2
%{_libdir}/altivec/*.so.*
Quentin Spencer ee675c
%config(noreplace) /etc/ld.so.conf.d/atlas-altivec.conf
Quentin Spencer cdd562
Quentin Spencer cdd562
%files altivec-devel
Quentin Spencer cdd562
%defattr(-,root,root,-)
Quentin Spencer cdd562
%doc debian/copyright doc
Quentin Spencer cdd562
%dir %{_libdir}/altivec
Quentin Spencer 2c4ed2
%{_libdir}/altivec/*.so
Quentin Spencer cdd562
%{_libdir}/altivec/*.a
Quentin Spencer cdd562
%{_includedir}/atlas
Quentin Spencer cdd562
Quentin Spencer cdd562
%endif
Quentin Spencer cdd562
Quentin Spencer cdd562
%endif
Quentin Spencer cdd562
Quentin Spencer cdd562
%changelog
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.