# # spec file for package lapack # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Name: lapack BuildRequires: doxygen gcc-fortran python Summary: Linear Algebra Package Version: 3.4.0 Release: 3 License: Public Domain, Freeware Group: Development/Libraries/Parallel Source0: lapack-%{version}.tar.bz2 Source99: lapack-rpmlintrc Patch1: lapack-3.2.2.patch Url: http://www.netlib.org/lapack/ Requires: blas = %{version} Requires: liblapack3 = %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build %description LAPACK provides routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems. The associated matrix factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur) are also provided, as are related computations such as reordering of the Schur factorizations and estimating condition numbers. Dense and banded matrices are handled, but not general sparse matrices. In all areas, similar functionality is provided for real and complex matrices, in both single and double precision. Authors: -------- Jack Dongarra %package -n blas License: Public Domain, Freeware Summary: Basic Linear Algebra Subprograms Group: Productivity/Scientific/Math Requires: libblas3 >= %{version} %description -n blas BLAS (Basic Linear Algebra Subprograms) is a standard library for numerical algebra. BLAS provides a number of basic algorithms for linear algebra. BLAS is fast and well-tested, was written in FORTRAN 77 and built with gfortran. BLAS manual pages are available in the blas-man package. Authors: -------- UTK %package -n blas-man License: Public Domain, Freeware Summary: Documentation for BLAS (Basic Linear Algebra Subprograms) Group: Productivity/Scientific/Math Provides: blasman = %{version}-%{release} Obsoletes: blasman < %{version} %if 0%{?suse_version} >= 1120 BuildArch: noarch %endif %description -n blas-man The blas-man package contains documentation for BLAS (Basic Linear Algebra subprograms) routines, in the form of man pages. Authors: -------- UTK %package man License: Public Domain, Freeware Summary: Manpages for LAPACK Group: Development/Libraries/Parallel Provides: lapack-manpages = %{version}-%{release} Obsoletes: lapack-manpages < %{version} %if 0%{?suse_version} >= 1120 BuildArch: noarch %endif %description man Manpages for LAPACK Authors: -------- Lapack team %package -n liblapack3 License: Public Domain, Freeware Summary: LAPACK Shared Library Group: Development/Libraries/Parallel %description -n liblapack3 LAPACK provides routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems. The associated matrix factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur) are also provided, as are related computations such as reordering of the Schur factorizations and estimating condition numbers. Dense and banded matrices are handled, but not general sparse matrices. In all areas, similar functionality is provided for real and complex matrices, in both single and double precision. Authors: -------- Jack Dongarra %package -n libblas3 License: Public Domain, Freeware Summary: BLAS Shared Library Group: Productivity/Scientific/Math %description -n libblas3 BLAS (Basic Linear Algebra Subprograms) is a standard library for numerical algebra. BLAS provides a number of basic algorithms for linear algebra. Authors: -------- UTK %prep %setup -q %patch1 %build case "$RPM_ARCH" in i[0-9]86) PRECFLAGS="-ffloat-store" ;; *) PRECFLAGS="" ;; esac export PRECFLAGS cp make.inc.example make.inc make cleanlib make %{?jobs:-j%jobs} blaslib \ OPTS="$RPM_OPT_FLAGS -fPIC" \ NOOPT="$RPM_OPT_FLAGS -O0 -fPIC" mv librefblas.a libblas_pic.a mkdir tmp ( cd tmp; ar x ../libblas_pic.a ) gfortran -shared -Wl,-soname=libblas.so.3 -o libblas.so.%version tmp/*.o ln -s libblas.so.%version libblas.so rm -rf tmp make cleanlib make %{?jobs:-j%jobs} blaslib \ OPTS="$RPM_OPT_FLAGS" \ NOOPT="$RPM_OPT_FLAGS -O0" make blas_testing \ OPTS="$RPM_OPT_FLAGS $PRECFLAGS" \ NOOPT="$RPM_OPT_FLAGS $PRECFLAGS -O0" if grep -B15 -A15 FAIL BLAS/*.out; then echo echo "blas_testing FAILED" echo false else true # No failures fi mv librefblas.a libblas.a make cleanlib make %{?jobs:-j%jobs} lapacklib \ OPTS="$RPM_OPT_FLAGS -fPIC" \ NOOPT="$RPM_OPT_FLAGS -O0 -fPIC" mv liblapack.a liblapack_pic.a mkdir tmp ( cd tmp; ar x ../liblapack_pic.a ) gfortran -shared -Wl,-soname=liblapack.so.3 -o liblapack.so.%version tmp/*.o -L. -lblas ln -s liblapack.so.%version liblapack.so rm -rf tmp make cleanlib make %{?jobs:-j%jobs} lapacklib \ OPTS="$RPM_OPT_FLAGS" \ NOOPT="$RPM_OPT_FLAGS -O0" ln -s libblas.a librefblas.a make lapack_testing \ OPTS="$RPM_OPT_FLAGS $PRECFLAGS" \ NOOPT="$RPM_OPT_FLAGS $PRECFLAGS -O0" if grep -B15 -A15 FAIL TESTING/*.out; then echo echo "lapack_testing FAILED" echo false else true # No failures fi # Create man pages - and do some cleanup make man rm -f DOCS/man/man3/*tst* rm -f DOCS/man/man3/TST* rm -f DOCS/man/man3/MYSUB.3 rm -f DOCS/man/man3/INSTALL_lsame.f.3 rm -f DOCS/man/man3/xerbla.f.3 rm -f DOCS/man/man3/xerbla_array.f.3 rm -f DOCS/man/man3/*_.3 rm -f DOCS/man/man3/dsecnd_*.3 rm -f DOCS/man/man3/DSECND.3 rm -f DOCS/man/man3/second_*3 rm -f DOCS/man/man3/SECOND.3 rm -f DOCS/man/man3/LAPACK_version.f.3 rm -f DOCS/man/man3/SRC_ilaver.f.3 rm -f DOCS/man/man3/SRC_xerbla.f.3 rm -f DOCS/man/man3/SRC_xerbla_array.f.3 rm -f DOCS/man/man3/SLAMC2.3.gz rm -f DOCS/man/man3/SLAMC3.3.gz rm -f DOCS/man/man3/SLAMC4.3.gz rm -f DOCS/man/man3/SLAMC5.3.gz rm -f DOCS/man/man3/DLAMC2.3.gz rm -f DOCS/man/man3/DLAMC3.3.gz rm -f DOCS/man/man3/DLAMC4.3.gz rm -f DOCS/man/man3/DLAMC5.3.gz mv DOCS/man/man3/BLAS_SRC_lsame.f.3 DOCS/man/man3/lsame.f.3 mv DOCS/man/man3/BLAS_SRC_xerbla.f.3 DOCS/man/man3/xerbla.f.3 mv DOCS/man/man3/BLAS_SRC_xerbla_array.f.3 DOCS/man/man3/xerbla_array.f.3 mv DOCS/man/man3/INSTALL_ilaver.f.3 DOCS/man/man3/ilaver.f.3 %install install -d $RPM_BUILD_ROOT/%{_libdir} install -m 644 libblas.a $RPM_BUILD_ROOT/%{_libdir} install -m 644 libblas_pic.a $RPM_BUILD_ROOT/%{_libdir} install -m 644 liblapack.a $RPM_BUILD_ROOT/%{_libdir} install -m 644 liblapack_pic.a $RPM_BUILD_ROOT/%{_libdir} install -m 755 libblas.so.%version $RPM_BUILD_ROOT/%{_libdir} ln -s libblas.so.%version $RPM_BUILD_ROOT/%{_libdir}/libblas.so.3 ln -s libblas.so.%version $RPM_BUILD_ROOT/%{_libdir}/libblas.so install -m 755 liblapack.so.%version $RPM_BUILD_ROOT/%{_libdir} ln -s liblapack.so.%version $RPM_BUILD_ROOT/%{_libdir}/liblapack.so.3 ln -s liblapack.so.%version $RPM_BUILD_ROOT/%{_libdir}/liblapack.so install -d $RPM_BUILD_ROOT%{_mandir}/man3 install -m 0644 DOCS/man/man3/*.3 $RPM_BUILD_ROOT%{_mandir}/man3/ find BLAS/SRC/ -name \*.f -type f -printf "%{_mandir}/man3/%f.3.gz\n" \ > blasmans find BLAS/SRC/ -name \*.f -type f -printf "%f\n" \ | tr 'a-z' 'A-Z' |sed -e 's#\(.*\).F#'%{_mandir}/man3/'\1.3.gz#' \ >> blasmans find SRC/ -name \*.f -type f -printf "%{_mandir}/man3/%f.3.gz\n" \ | grep -v -E 'lsame.f|sceil.f|xerbla.f|xerbla_array.f' \ | sort -u > lapackmans find SRC/ -name \*.f -type f -printf "%f\n" \ | grep -v -E 'sceil.f|xerbla.f|xerbla_array.f' \ | tr 'a-z' 'A-Z' |sed -e 's#\(.*\).F#'%{_mandir}/man3/'\1.3.gz#' \ | sort -u >> lapackmans echo %{_mandir}/man3/SLAMC1.3.gz >> lapackmans echo %{_mandir}/man3/SLAMC2.3.gz >> lapackmans echo %{_mandir}/man3/SLAMC3.3.gz >> lapackmans echo %{_mandir}/man3/SLAMC4.3.gz >> lapackmans echo %{_mandir}/man3/SLAMC5.3.gz >> lapackmans echo %{_mandir}/man3/SLAMCH.3.gz >> lapackmans echo %{_mandir}/man3/DLAMC1.3.gz >> lapackmans echo %{_mandir}/man3/DLAMC2.3.gz >> lapackmans echo %{_mandir}/man3/DLAMC3.3.gz >> lapackmans echo %{_mandir}/man3/DLAMC4.3.gz >> lapackmans echo %{_mandir}/man3/DLAMC5.3.gz >> lapackmans echo %{_mandir}/man3/DLAMCH.3.gz >> lapackmans echo %{_mandir}/man3/slamch.f.3.gz >> lapackmans echo %{_mandir}/man3/slamchf77.f.3.gz >> lapackmans echo %{_mandir}/man3/dlamch.f.3.gz >> lapackmans echo %{_mandir}/man3/dlamchf77.f.3.gz >> lapackmans ln -s SLAMC1.3.gz $RPM_BUILD_ROOT/%{_mandir}/man3/SLAMC2.3.gz ln -s SLAMC1.3.gz $RPM_BUILD_ROOT/%{_mandir}/man3/SLAMC4.3.gz ln -s SLAMC1.3.gz $RPM_BUILD_ROOT/%{_mandir}/man3/SLAMC5.3.gz ln -s SLAMCH.3.gz $RPM_BUILD_ROOT/%{_mandir}/man3/SLAMC3.3.gz ln -s DLAMC1.3.gz $RPM_BUILD_ROOT/%{_mandir}/man3/DLAMC2.3.gz ln -s DLAMC1.3.gz $RPM_BUILD_ROOT/%{_mandir}/man3/DLAMC4.3.gz ln -s DLAMC1.3.gz $RPM_BUILD_ROOT/%{_mandir}/man3/DLAMC5.3.gz ln -s DLAMCH.3.gz $RPM_BUILD_ROOT/%{_mandir}/man3/DLAMC3.3.gz %post -n libblas3 -p /sbin/ldconfig %postun -n libblas3 -p /sbin/ldconfig %post -n liblapack3 -p /sbin/ldconfig %postun -n liblapack3 -p /sbin/ldconfig %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %{_libdir}/liblapack.so %{_libdir}/liblapack.a %{_libdir}/liblapack_pic.a %files -n liblapack3 %defattr(-,root,root) %{_libdir}/liblapack.so.%version %{_libdir}/liblapack.so.3 %files -n blas %defattr(-,root,root) %{_libdir}/libblas.so %{_libdir}/libblas.a %{_libdir}/libblas_pic.a %files -n libblas3 %defattr(-,root,root) %{_libdir}/libblas.so.%version %{_libdir}/libblas.so.3 %files -n blas-man -f blasmans %defattr(-,root,root) %files man -f lapackmans %defattr(-,root,root) %changelog