# # spec file for package superlu # # Copyright (c) 2012 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/ # Name: superlu Summary: A general purpose library for the direct solution of linear equations License: BSD-3-Clause Group: Development/Libraries/C and C++ Version: 4.3 Release: 0 Source: ftp://ftp.netlib.org/scalapack/prototype/superlu_%{version}.tar.bz2 Source1: superlu_ug.pdf # PATCH-FEATURE-OPENSUSE superlu-4.3.diff : add compiler and build flags in make.inc Patch: superlu-4.3.diff # PATCH-FIX-UPSTREAM superlu-4.3-include.patch : avoid implicit declaration warnings Patch1: superlu-4.3-include.patch # PATCH-FIX-UPSTREAM superlu-4.3-dont-opt-away.diff Patch2: superlu-4.3-dont-opt-away.diff Url: http://crd.lbl.gov/~xiaoye/SuperLU/ BuildRequires: blas BuildRequires: fdupes BuildRequires: gcc-fortran BuildRequires: tcsh BuildRoot: %{_tmppath}/%{name}-%{version}-build %description SuperLU is an algorithm that uses group theory to optimize LU decomposition of sparse matrices. It's the fastest direct solver for linear systems that the author is aware of. Docu can be found on http://www.netlib.org. %package -n libsuperlu4 Summary: SuperLU matrix solver Group: System/Libraries %description -n libsuperlu4 SuperLU is an algorithm that uses group theory to optimize LU decomposition of sparse matrices. It's the fastest direct solver for linear systems that the author is aware of. Docu can be found on http://www.netlib.org. %package devel Summary: Development files for %{name} Group: Development/Libraries/C and C++ Provides: superlu = %{version} Obsoletes: superlu < %{version} Requires: libsuperlu4 = %{version} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep %setup -q -n SuperLU_%{version} %patch -p1 %patch1 -p1 %patch2 -p1 # superlu_ug.pdf in %%doc cp %SOURCE1 ./ %build make mkdir tmp (cd tmp; ar -x ../lib/libsuperlu_%{version}.a) gfortran -shared -Wl,-soname,libsuperlu.so.4 -o libsuperlu.so.%{version} tmp/*.o %install mkdir -p %{buildroot}%{_libdir} mkdir -p %{buildroot}%{_includedir} install -m644 SRC/*.h %{buildroot}%{_includedir} install -m755 *.so.* %{buildroot}%{_libdir} ln -s %{_libdir}/libsuperlu.so.%{version} %{buildroot}%{_libdir}/libsuperlu.so.4 ln -s %{_libdir}/libsuperlu.so.4 %{buildroot}%{_libdir}/libsuperlu.so #fix permissions chmod 644 MATLAB/* # remove all build examples cd EXAMPLE make clean rm -rf *itersol* cd .. mv EXAMPLE examples cp FORTRAN/README README.fortran %fdupes -s examples %check cd TESTING ./stest ./ztest cd .. %post -n libsuperlu4 -p /sbin/ldconfig %postun -n libsuperlu4 -p /sbin/ldconfig %files -n libsuperlu4 %defattr(-,root,root,-) %doc README MATLAB %{_libdir}/*.so.* %files devel %defattr(-,root,root,-) %doc DOC/html examples README.fortran superlu_ug.pdf %{_includedir}/*.h %{_libdir}/*.so %changelog