Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > be5f6c53b31fda78aadc8faf0601a9e2 > files > 6

lapack-3.1.1-3mdv2009.0.src.rpm

#lapack
%define major 3.1
%define libname %mklibname %{name} %{major}
%define oldmajor 3.0
%define oldlibname %mklibname %{name} %{oldmajor}
%define develname %mklibname -d %{name}

# blas
%define libblasname %mklibname blas %{major}
%define develblasname %mklibname blas -d

Summary:	LAPACK libraries for linear algebra
Name:		lapack
Version:	3.1.1
Release:	%mkrel 3
License:	BSD-like
Group:		Sciences/Mathematics
URL:		http://www.netlib.org/lapack/
Source0:	http://www.netlib.org/lapack/%{name}-%{version}.tar.bz2
Source1:	Makefile.lapack
Source2:	Makefile.blas
Source3:	http://www.netlib.org/lapack/lapackqref.ps
Source4:	http://www.netlib.org/blas/blasqr.ps
Patch0:		lapack-3.1.1-make.inc.patch
BuildRequires:	gcc-gfortran
Obsoletes:	%{name} < 3.1.1
BuildRoot:	%{_tmppath}/%{name}-%{version}-buildroot

%description
LAPACK (Linear Algebra PACKage) is a standard library for numerical
linear algebra. LAPACK provides routines for solving systems of
simultaneous linear equations, least-squares solutions of linear
systems of equations, eigenvalue problems, and singular value
problems. Associated matrix factorizations (LU, Cholesky, QR, SVD,
Schur, and generalized Schur) and related computations (i.e.,
reordering of Schur factorizations and estimating condition numbers)
are also included. LAPACK can handle dense and banded matrices, but
not general sparse matrices. Similar functionality is provided for
real and complex matrices in both single and double precision. LAPACK
is coded in Fortran77 and built with gcc.

The lapack package provides the dynamic libraries for LAPACK/BLAS.

%package -n %{libname}
Summary:	LAPACK libraries for linear algebra
Group:		Sciences/Mathematics
Provides:	lib%{name} = %{version}-%{release}
Obsoletes:	%{oldlibname}

%description -n %{libname}
LAPACK (Linear Algebra PACKage) is a standard library for numerical
linear algebra. LAPACK provides routines for solving systems of
simultaneous linear equations, least-squares solutions of linear
systems of equations, eigenvalue problems, and singular value
problems. Associated matrix factorizations (LU, Cholesky, QR, SVD,
Schur, and generalized Schur) and related computations (i.e.,
reordering of Schur factorizations and estimating condition numbers)
are also included. LAPACK can handle dense and banded matrices, but
not general sparse matrices. Similar functionality is provided for
real and complex matrices in both single and double precision. LAPACK
is coded in Fortran77 and built with gcc.

The lapack package provides the dynamic libraries for LAPACK/BLAS.

%package -n %{develname}
Summary:	LAPACK static library
Group:		Sciences/Mathematics
Requires:	%{libname} = %{version}-%{release}
Provides:	%{name}-devel = %{version}-%{release}
Provides:	lib%{name}-devel = %{version}-%{release}
Obsoletes:	%mklibname -d %{name} %{oldmajor}
Obsoletes:	%mklibname -d %{name} %{major}

%description -n	%{develname}
This package contains the headers and development libraries
necessary to develop or compile applications using lapack.

%package -n %{libblasname}
Summary:	The BLAS (Basic Linear Algebra Subprograms) library
Group:		Sciences/Mathematics
Obsoletes:	%{mklibname blas 1.1} < 3.1.1
Provides:	%{mklibname blas 1.1}

%description -n %{libblasname}
BLAS (Basic Linear Algebra Subprograms) is a standard library which
provides a number of basic algorithms for numerical algebra. Man
pages for blas are available in the blas-man package.

%package -n %{develblasname}
Summary:	BLAS development libraries
Group:		Sciences/Mathematics
Requires:	%{libblasname} = %{version}-%{release}
Provides:	blas-devel = %{version}-%{release}
Provides:	libblas-devel = %{version}-%{release}
Obsoletes:	%{mklibname blas 1.1 -d} < 3.1.1
Provides:	%{mklibname blas 1.1 -d}

%description -n %{develblasname}
BLAS development libraries for applications that link statically.

%prep
%setup -q
%patch0 -p1

cp -f INSTALL/make.inc.gfortran make.inc
cp -f %{SOURCE1} SRC/Makefile
cp -f %{SOURCE2} BLAS/SRC/Makefile

%build
export FC=gfortran
export CFLAGS="%{optflags} -funroll-all-loops -ffloat-store"
export FFLAGS=$CFLAGS

# Build BLAS
pushd BLAS/SRC
FFLAGS="$FFLAGS" make dcabs1.o
FFLAGS="$FFLAGS" CFLAGS="$CFLAGS" make static
cp libblas.a ${RPM_BUILD_DIR}/%{name}-%{version}/
make clean
FFLAGS="$FFLAGS -Os -fPIC" make dcabs1.o
FFLAGS="$FFLAGS -fPIC" CFLAGS="$CFLAGS -fPIC" make shared
cp libblas.so.3.1.1 ${RPM_BUILD_DIR}/%{name}-%{version}/
popd

ln -s libblas.so.3.1.1 libblas.so

# Some files don't like -O2, but -Os is fine
RPM_OPT_SIZE_FLAGS=$(echo $RPM_OPT_FLAGS | sed 's|-O2|-Os|')

# Build the static dlamch, dsecnd, lsame, second, slamch bits
pushd INSTALL
make NOOPT="$CFLAGS -Os" OPTS="$CFLAGS"
popd

# Build the static lapack library
pushd SRC
make FFLAGS="$FFLAGS" CFLAGS="$CFLAGS" static
cp liblapack.a ${RPM_BUILD_DIR}/%{name}-%{version}/
popd

# Build the shared dlamch, dsecnd, lsame, second, slamch bits
pushd INSTALL
make clean
make NOOPT="$CFLAGS -Os -fPIC" OPTS="$CFLAGS -fPIC"
popd

# Build the shared lapack library
pushd SRC
make clean
make FFLAGS="$FFLAGS -fPIC" CFLAGS="$CFLAGS -fPIC" shared
cp liblapack.so.3.1.1 ${RPM_BUILD_DIR}/%{name}-%{version}/
popd

# Buuld the static with pic dlamch, dsecnd, lsame, second, slamch bits
pushd INSTALL
make clean
make NOOPT="$CFLAGS -Os -fPIC" OPTS="$CFLAGS -fPIC"
popd

# Build the static with pic lapack library
pushd SRC
make clean
make FFLAGS="$CFLAGS -fPIC" CFLAGS="$CFLAGS -fPIC" static
cp liblapack.a ${RPM_BUILD_DIR}/%{name}-%{version}/liblapack_pic.a
popd

cp %{SOURCE3} lapackqref.ps
cp %{SOURCE4} blasqr.ps

%install
rm -fr %{buildroot}


mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}%{_mandir}/man3

for f in liblapack.so.3.1.1 libblas.so.3.1.1 libblas.a liblapack.a liblapack_pic.a; do
  cp -f $f %{buildroot}%{_libdir}/$f
done

pushd %{buildroot}%{_libdir}
ln -sf liblapack.so.3.1.1 liblapack.so
ln -sf liblapack.so.3.1.1 liblapack.so.3
ln -sf liblapack.so.3.1.1 liblapack.so.3.1
ln -sf libblas.so.3.1.1 libblas.so
ln -sf libblas.so.3.1.1 libblas.so.3
ln -sf libblas.so.3.1.1 libblas.so.3.1
popd

for file in manpages/man/manl/*; do
    install -m 644 $file %{buildroot}%{_mandir}/man3/`basename $file .l`.3
done

%clean
%__rm -fr %{buildroot}

%if %mdkversion < 200900
%post -n %{libname} -p /sbin/ldconfig
%endif

%if %mdkversion < 200900
%postun -n %{libname} -p /sbin/ldconfig
%endif

%files -n %{libname}
%defattr(-,root,root)
%doc README lapackqref.ps
%{_libdir}/liblapack.so.*

%files -n %{develname}
%defattr(-,root,root)
%{_libdir}/liblapack.so
%{_libdir}/liblapack*.a
%{_mandir}/man3/*


%files -n %{libblasname}
%defattr(-,root,root)
%doc blasqr.ps
%{_libdir}/libblas.so.*

%files -n %{develblasname}
%defattr(-,root,root,-)
%{_libdir}/libblas.so
%{_libdir}/libblas*.a


%changelog
* Fri Jul 04 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 3.1.1-3mdv2009.0
+ Revision: 231865
- correct provides for libblas
- obsolete old lapack package

* Fri Jul 04 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 3.1.1-2mdv2009.0
+ Revision: 231702
- fix group and remove dot in summary
- update to new version 3.1.1
- create subpackage for blas library
- use the Fedora's idea to build the package
- fix descriptions
- fix mixture of tabs and spaces
- spec file clean

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request

* Thu Nov 08 2007 Lev Givon <lev@mandriva.org> 3.1.1-1mdv2008.1
+ Revision: 106977
- Update to 3.1.1.

* Wed Oct 24 2007 Lev Givon <lev@mandriva.org> 3.0-24mdv2008.1
+ Revision: 101875
- Update spec file in light of new devel package naming policy.

* Tue Oct 16 2007 Lev Givon <lev@mandriva.org> 3.0-23mdv2008.1
+ Revision: 99434
- Fixed etime issue introduced by new gfortran version.
- Create liblapack_pic.a containing objects compiled with -fPIC
  (needed to build atlas).

* Tue Sep 18 2007 Guillaume Rousse <guillomovitch@mandriva.org> 3.0-21mdv2008.0
+ Revision: 89831
- rebuild

  + Funda Wang <fundawang@mandriva.org>
    - Import lapack



* Sun Sep 10 2006 Emmanuel Andry <eandry@mandriva.org> 3.0-20mdv2007.0
- rebuild

* Mon May 22 2006 Guillaume Rousse <guillomovitch@mandriva.org> 3.0-19mdk
- rebuild for new gfortran

* Thu May 04 2006 Guillaume Rousse <guillomovitch@mandriva.org> 3.0-18mdk
- backportable before 2006.0

* Tue May 02 2006 Guillaume Rousse <guillomovitch@mandriva.org> 3.0-17mdk
- rebuild with a stricter dependency on blas-devel package to use

* Fri Mar 03 2006 Guillaume Rousse <guillomovitch@mandriva.org> 3.0-16mdk
- obsoletes previous release with old partial soname

* Thu Mar 02 2006 Guillaume Rousse <guillomovitch@mandriva.org> 3.0-15mdk
- drop blas sources, and use external blas package  
- spec cleanup

* Fri Aug 12 2005 Austin Acton <austin@mandriva.org> 3.0-14mdk
- rebuild

* Wed Jul 20 2005 Gaetan Lehmann <gaetan.lehmann@jouy.inra.fr> 3.0-13mdk
- * Mon Jul 18 2005 Lev Givon <lev@columbia.edu> 3.0-13mdk
 - build libblas using full BLAS source
 - change man page suffixes from .l to .3
- buildrequires gcc-fortran
- patch3 : use gfortran
- tests done in check section
- fix some lint

* Sat Apr 16 2005 Abel Cheung <deaddog@mandriva.org> 3.0-12mdk
- Use -O2 -ffloat-store to avoid gcc optimization error (#13298)

* Sat Aug 28 2004 Olivier Thauvin <thauvin@aerov.jussieu.fr> 3.0-11mdk
- manpage path: s/manl/man3/

* Wed Jun 23 2004 Abel Cheung <deaddog@deaddog.org> 3.0-10mdk
- don't let liblapack own libblas.so.3
- program is not for development
- enable test by default (if it fails for some arch, please use ifarch)
- lower optimization, otherwise hang indefinitely when running testsuite
- fix shlib-with-non-pic-code, link lapack with shared blas library

* Wed Jan 14 2004 Lenny Cartier <lenny@mandrakesoft.com> 3.0-9mdk
- rebuild

* Fri Dec 20 2002 Olivier Thauvin <thauvin@aerov.jussieu.fr> 3.0-8mdk
- split lippack and libblas
- split doc in separate package

* Wed Oct 02 2002 Lenny Cartier <lenny@mandrakesoft.com> 3.0-7mdk
- rebuild

* Tue Aug 6 2002 Antoine Ginies <aginies@mandrakesoft.com> 3.0-6mdk
- build with gcc 3.2
* Mon Jul 07 2002 Erwan Velu <erwan@mandrakesoft.com> 3.0-5mdk
- Rebuild
* Wed Oct 10 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 3.0-4mdk
- Patch0: Add all patches from the LAPACK site as of 2001-10-10
- Patch1: Makefile fixes for make testing (optional)
- Make rpmlint happy:
  - E: liblapack3-devel obsolete-not-provided lapack-devel

* Thu Aug 09 2001 Lenny Cartier <lenny@mandrakesoft.com> 3.0-3mdk
- rebuild

* Thu Apr 26 2001 Lenny Cartier <lenny@mandrakesoft.com> 3.0-2mdk
- fixes from Pierre-Michel THEVENY <pmt@mnhn.fr> :
	- update sources from netlib
	- add equivalence program
	- rebuilt on Mandrake 8.0 (rpm-4.0)

* Tue Jan 16 2001 Lenny Cartier <lenny@mandrakesoft.com> 3.0-1mdk
- now library policy compliant

* Thu Nov 16 2000 Lenny Cartier <lenny@mandrakesoft.com> 3.0-1mdk
- used srpm provided by Gerard Vermeulen <gvermeul@labs.polycnrs-gre.fr> :
	- Mandrake RPM guidelines
	- split out devel
	- built on Mandrake-7.2

* Sun Aug 20 2000 Gerard Vermeulen <gvermeul@labs.polycnrs-gre.fr> 3.0-6gv
- collapse lapack, blas, lapack-man and blas-man into lapack
- built on Mandrake-7.1

* Thu Jan 03 2000 Gerard Vermeulen <gvermeul@labs.polycnrs-gre.fr>
- built on Mandrake-6.1 by gcc-2.95.2
- zap backwards compatibility
  this will require recompilation of some other packages

* Mon Oct 25 1999 Gerard Vermeulen <gvermeul@labs.polycnrs-gre.fr>
- built on Mandrake-6.1 by gcc-2.95.1

* Fri Oct 08 1999 Gerard Vermeulen <gvermeul@labs.polycnrs-gre.fr>
- link 3.0 libraries also as 2.0.1, hoping for backwards compatibility

* Sun Oct 3 1999 Gerard Vermeulen <gvermeul@labs.polycnrs-gre.fr>
- BUG: the new LAPACK-3.0 routines were missing
- FIX: generate new fast Makefiles by a python program
- Redhat-6.0 and gcc-2.95.1

* Mon Aug 2 1999 Tim Powers <timp@redhat.com>
- updated to v3.0
- built for 6.1

* Mon Apr 12 1999 Michael Maher <mike@redhat.com>
- built package for 6.0

* Sat Oct 24 1998 Jeff Johnson <jbj@redhat.com>
- new description/summary text.

* Fri Jul 17 1998 Jeff Johnson <jbj@redhat.com>
- repackage for powertools.