# # spec file for package superlu # # Copyright (c) 2015 SUSE LINUX 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: http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_4.3.tar.gz Source: superlu_%{version}-bsd.tar.bz2 Source1: superlu_ug.pdf Source2: README.SUSE Source3: baselibs.conf # 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 # PATCH-FIX-OPENSUSE superlu-4.3-remove-hsl.patch [bnc#796236] # The Harwell Subroutine Library (HSL) routine m64ad.c have been removed # from the original sources for legal reasons. This patch disables the inclusion of # this routine in the library which, however, remains fully functionnal Patch3: superlu-4.3-disable-hsl.patch 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 %patch3 -p1 # superlu_ug.pdf in %%doc cp %SOURCE1 %SOURCE2 ./ %build make lib mkdir tmp (cd tmp; ar -x ../lib/libsuperlu_%{version}.a) gfortran -shared -Wl,-soname,libsuperlu.so.4 -o lib/libsuperlu.so tmp/*.o %install mkdir -p %{buildroot}%{_libdir} mkdir -p %{buildroot}%{_includedir} install -m644 SRC/*.h %{buildroot}%{_includedir} install -m755 lib/libsuperlu.so %{buildroot}%{_libdir}/libsuperlu.so.%{version} 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 ln -s examples/ EXAMPLE export LD_LIBRARY_PATH=%{buildroot}%{_libdir} make testing echo -ne "\nTest results\n" for i in stest dtest ctest ztest; do cat TESTING/$i.out done %post -n libsuperlu4 -p /sbin/ldconfig %postun -n libsuperlu4 -p /sbin/ldconfig %files -n libsuperlu4 %defattr(-,root,root,-) %doc README MATLAB README.SUSE %{_libdir}/*.so.* %files devel %defattr(-,root,root,-) %doc DOC/html examples README.fortran superlu_ug.pdf %{_includedir}/*.h %{_libdir}/*.so %changelog