%define name blas %define version 1.1 %define release %mkrel 7 %define major %{version} %define libname %mklibname %{name} %{major} %if %{mdkversion} <= 1020 %define f77 g77 %define runtime g2c %else %define f77 gfortran %define runtime gfortran %endif Name: %{name} Version: %{version} Release: %{release} Epoch: 0 Summary: Basic Linear Algebra Subprograms library License: BSD-like Group: Sciences/Mathematics URL: http://www.netlib.org/blas/ Source0: http://www.netlib.org/blas/%{name}.tar.bz2 Source1: %{name}.makefile.bz2 Source2: http://www.netlib.org/blas/blasqr.ps.bz2 Source3: http://www.netlib.org/blas/blas3-paper.ps.bz2 Source4: http://www.netlib.org/blas/blas2-paper.ps.bz2 %if %{mdkversion} <= 1020 BuildRequires: gcc-g77 %else BuildRequires: gcc-gfortran %endif BuildRoot: %{_tmppath}/%{name}-%{version} %description The BLAS (Basic Linear Algebra Subprograms) are routines that provide standard building blocks for performing basic vector and matrix operations. The Level 1 BLAS perform scalar, vector and vector-vector operations, the Level 2 BLAS perform matrix-vector operations, and the Level 3 BLAS perform matrix-matrix operations. Because the BLAS are efficient, portable, and widely available, they are commonly used in the development of high quality linear algebra software, LAPACK for example. %package -n %{libname} Summary: Basic Linear Algebra Subprograms library Group: Sciences/Mathematics Provides: lib%{name} = %{epoch}:%{version}-%{release} %description -n %{libname} This package contains the dynamic libraries necessary to run applications. %package -n %{libname}-devel Summary: Basic Linear Algebra Subprograms library Group: Sciences/Mathematics Requires: %{libname} = %{epoch}:%{version} Provides: %{name}-devel = %{epoch}:%{version}-%{release} Provides: lib%{name}-devel = %{epoch}:%{version}-%{release} %description -n %{libname}-devel This package contains the headers and development libraries necessary to develop or compile applications. %prep %setup -q -c bzcat %{SOURCE1} > Makefile bzcat %{SOURCE2} > blasqr.ps bzcat %{SOURCE3} > blas3-paper.ps bzcat %{SOURCE4} > blas2-paper.ps %build %make F77="%{f77}" \ RUNTIME="%{runtime}" \ CFLAGS="%optflags" \ FFLAGS="%optflags -ffloat-store" %install rm -fr %{buildroot} install -d -m 755 %{buildroot}%{_libdir} install -m 755 *.so.* %{buildroot}%{_libdir} install -m 644 *.a %{buildroot}%{_libdir} (cd %{buildroot}%{_libdir} && ln -s lib%{name}.so.%{major} lib%{name}.so) %clean rm -fr %{buildroot} %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %files -n %{libname} %defattr(-,root,root) %{_libdir}/lib%{name}.so.%{major} %files -n %{libname}-devel %defattr(-,root,root) %doc blasqr.ps blas3-paper.ps blas2-paper.ps %{_libdir}/lib%{name}.so %{_libdir}/lib%{name}.a %changelog * Tue Aug 29 2006 Guillaume Rousse <guillomovitch@mandriva.org> 0:1.1-7mdv2007.0 - Rebuild * Fri May 19 2006 Guillaume Rousse <guillomovitch@mandriva.org> 0:1.1-6mdk - rebuild for new fortran library * Thu May 04 2006 Guillaume Rousse <guillomovitch@mandriva.org> 0:1.1-5mdk - backportable before 2006.0 * Thu Mar 02 2006 Guillaume Rousse <guillomovitch@mandriva.org> 0:1.1-4mdk - drop reference to c compiler in makefile - allow older fortran runtime use * Thu Mar 02 2006 Guillaume Rousse <guillomovitch@mandriva.org> 0:1.1-3mdk - drop c interface code - link with fortran runtime * Fri Feb 10 2006 Guillaume Rousse <guillomovitch@mandriva.org> 0:1.1-2mdk - introduce epoch to handle upgrade * Thu Feb 09 2006 Guillaume Rousse <guillomovitch@mandriva.org> 1.1-1mdk - first stand-alone release