Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > by-pkgid > 590d840ba3d0bde6ee80de960364e5e0 > files > 8

lapack-3.0-14mdk.src.rpm

%define name 		lapack
%define version 	3.0
%define release 	%mkrel 14
%define snapshot	2001-10-10

%define major 		3
%define libname_orig	lib%{name}
%define libname 	%mklibname %{name} %{major}
%define blaslibname_orig	libblas
%define blaslibname	%mklibname blas %{major}

#%define make_testing	1
#%{?_without_testing: %global make_testing 0}

Summary: 	Fortran 77 LAPACK and BLAS libraries for linear algebra

Name: 		%{name}
Version: 	%{version}
Release: 	%{release}
License: 	Redistributable
Group:		Sciences/Mathematics
Source0: 	%{name}.tar.bz2
Source1:	blas.tar.bz2
Source2: 	manpages.tar.bz2
Source3: 	BlasMakefileMaker.bz2
Source4: 	LapackMakefileMaker.bz2
Patch0:		lapack-3.0-%{snapshot}.patch.bz2
Patch1:		lapack-3.0-makecfg.patch.bz2
Patch2:		lapack-3.0-blas-full-makefile.patch.bz2
Patch3:		lapack-makefile-gfortran.patch.bz2
URL: 		http://www.netlib.org/lapack/
BuildRoot: 	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

BuildRequires: 	python
BuildRequires:	gcc-gfortran

%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.
LAPACK includes also the Fortran77 default BLAS library.  BLAS (Basic
Linear Algebra Subprograms) is a standard library for numerical algebra.
BLAS provides a number of basic algorithms for linear algebra.

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

%package -n	liblapack-docs
Summary:	Documentation for the LAPACK/BLAS numerical linear algebra libraries
Group:		Books/Other
Provides:	libblas-docs

%description -n	liblapack-docs
The blas-man package contains documentation for LAPACK and BLAS 
(Basic Linear Algebra Subprograms) routines in the form of man pages.

%package -n	%{libname}
Summary: 	Fortran 77 LAPACK libraries for linear algebra
Group:		Sciences/Mathematics
Provides:	%{libname_orig} = %{version}-%{release}

%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.

The lapack package provides the dynamic libraries for LAPACK.

%package -n	%{libname}-devel
Summary: 	LAPACK static library
Group:		Sciences/Mathematics
Requires: 	%{libname} = %{version}
Provides: 	%{libname_orig}-devel = %{version}-%{release}
Provides:	%{name}-devel = %{version}-%{release}
Obsoletes: 	%{name}-devel

%description -n	%{libname}-devel
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.

This package contains the headers and development libraries
necessary to develop or compile applications.

%package -n	%{blaslibname}
Summary:	The BLAS (Basic Linear Algebra Subprograms) library
Group:		Sciences/Mathematics
Provides:	%{blaslibname_orig} = %{version}-%{release}

%description -n	%{blaslibname}
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	%{blaslibname}-devel
Summary:	BLAS static library
Group:		Sciences/Mathematics
Requires:	%{blaslibname} = %{version}
Provides:	%{blaslibname_orig}-devel = %{version}-%{release}
Obsoletes:	%{blaslibname_orig}-devel
Provides:	blas-devel = %{version}-%{release}
Obsoletes:	blas-devel

%description -n	%{blaslibname}-devel
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.

This package contains the headers and development libraries
necessary to develop or compile applications.

%prep
%setup -q -n LAPACK
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%setup -q -D -T -a 1 -n LAPACK/BLAS/SRC
%setup -q -D -T -a 2 -n LAPACK
bzcat %SOURCE3 > BLAS/SRC/BlasMakefileMaker
(cd BLAS/SRC; python BlasMakefileMaker)
bzcat %SOURCE4 > SRC/LapackMakefileMaker
(cd SRC; python LapackMakefileMaker)
find . -type f | xargs touch

%build
export FFLAGS="%optflags -ffloat-store"
export FC=gfortran

%__cc $RPM_OPT_FLAGS -o equivalence equivalence.c

# Test and install some files in $(srcdir)
%make install

pushd BLAS/SRC
%make FFLAGS="$FFLAGS" -fMakefile.blas-%{version} static
%make -fMakefile.blas-%{version} object-clean
%make FFLAGS="$FFLAGS -fPIC" -fMakefile.blas-%{version} shared
ln -s libblas.so.%{major}.0 libblas.so
popd

pushd SRC
%make FFLAGS="$FFLAGS" -fMakefile.lapack-%{version} static
%make -fMakefile.lapack-%{version} object-clean
%make FFLAGS="$FFLAGS -fPIC" -fMakefile.lapack-%{version} shared
popd

#%if %{make_testing}
#make testing
#%endif

%install
rm -fr $RPM_BUILD_ROOT
install -d -m 755 $RPM_BUILD_ROOT%{_bindir} \
                  $RPM_BUILD_ROOT%{_libdir} \
                  $RPM_BUILD_ROOT%{_mandir}/man3

install -m 755 equivalence $RPM_BUILD_ROOT%{_bindir}/

install -m 755 SRC/liblapack.so.3.0 $RPM_BUILD_ROOT%{_libdir}/
install -m 644 SRC/liblapack.a $RPM_BUILD_ROOT%{_libdir}/

for i in man/manl/*; do j=`ls $i | sed s/\\\.l/\\\.3/`; mv -f $i $j; done
install -m 644 man/manl/* $RPM_BUILD_ROOT%{_mandir}/man3/

install -m 755 BLAS/SRC/libblas.so.3.0 $RPM_BUILD_ROOT%{_libdir}/
install -m 644 BLAS/SRC/libblas.a $RPM_BUILD_ROOT%{_libdir}/
install -m 644 blas/man/manl/* $RPM_BUILD_ROOT%{_mandir}/man3/

/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
ln -s liblapack.so.%{major} $RPM_BUILD_ROOT%{_libdir}/liblapack.so
ln -s libblas.so.%{major} $RPM_BUILD_ROOT%{_libdir}/libblas.so

%check
make testing

%clean
rm -fr $RPM_BUILD_ROOT

%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig

%post   -n %{blaslibname} -p /sbin/ldconfig
%postun -n %{blaslibname} -p /sbin/ldconfig

%files -n liblapack-docs
%defattr(-, root, root)
%{_mandir}/man3/*

%files
%defattr(-, root, root)
%doc README 
%{_bindir}/*

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

%files -n %{libname}-devel
%defattr(-, root, root)
%{_libdir}/liblapack.so
%{_libdir}/liblapack.a

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

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

%changelog
* 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.