# SuperLU compat package %global archname superlu %global pkgname SuperLU %global shlibname libsuperlu43 Name: %{pkgname}43 Version: 4.3 Release: 3%{?dist} Summary: Subroutines to solve sparse linear systems License: BSD and GPLv2+ URL: http://crd-legacy.lbl.gov/~xiaoye/%{pkgname}/ Source0: http://crd-legacy.lbl.gov/~xiaoye/%{pkgname}/%{archname}_%{version}.tar.gz # Build with -fPIC Patch0: %{pkgname}-add-fpic.patch # Build shared library Patch1: %{pkgname}-build-shared-lib3.patch # Fixes FTBFS if "-Werror=format-security" flag is used (#1037343) Patch2: %{pkgname}-fix-format-security.patch # Fixes testsuite Patch3: %{pkgname}-fix-testsuite.patch # remove non-free mc64 functionality # patch obtained from the debian package Patch4: %{pkgname}-removemc64.patch BuildRequires: atlas-devel BuildRequires: csh %description SuperLU contains a set of subroutines to solve a sparse linear system A*X=B. It uses Gaussian elimination with partial pivoting (GEPP). The columns of A may be preordered before factorization; the preordering for sparsity is completely separate from the factorization. This is compat package (upstream release version 4.3) for dependencies. %package devel Summary: Header files and libraries for SuperLU development Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains the header files and libraries for use with %{name} package. This is compat package (upstream release version 4.3) for dependencies. %package doc Summary: Documentation and Examples for SuperLU Requires: %{name}%{?_isa} = %{version}-%{release} %description doc The %{name}-doc package contains all the help documentation along with C and FORTRAN examples . This is compat package (upstream release version 4.3) for dependencies. %prep %setup -q -n %{pkgname}_%{version} %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 rm -fr SRC/mc64ad.f.bak rm FORTRAN/*.old FORTRAN/*.bak find . -type f | sed -e "/TESTING/d" | xargs chmod a-x # Remove the shippped executables from EXAMPLE find EXAMPLE -type f | while read file do [ "$(file $file | awk '{print $2}')" = ELF ] && rm $file || : done cp -p MAKE_INC/make.linux make.inc sed -i -e "s|-O3|$RPM_OPT_FLAGS|" \ -e "s|\$(SUPERLULIB) ||" \ -e "s|\$(HOME)/Codes/%{pkgname}_%{version}|%{_builddir}/%{pkgname}_%{version}|" \ -e 's!lib/libsuperlu_4.3.a$!SRC/libsuperlu.so!' \ -e 's!-shared!& %{__global_ldflags}!' \ %if 0%{?fedora} >= 21 -e "s|-L/usr/lib -lblas|-L%{_libdir}/atlas -lsatlas|" \ %else -e "s|-L/usr/lib -lblas|-L%{_libdir}/atlas -lf77blas|" \ %endif make.inc %build make %{?_smp_mflags} superlulib make -C TESTING %install mkdir -p %{buildroot}%{_libdir} mkdir -p %{buildroot}%{_includedir}/%{name} install -p SRC/libsuperlu.so.%{version} %{buildroot}%{_libdir} install -p SRC/*.h %{buildroot}%{_includedir}/%{name} chmod -x %{buildroot}%{_includedir}/%{name}/*.h cp -Pp SRC/libsuperlu.so %{buildroot}%{_libdir}/%{shlibname}.so %check pushd TESTING for _test in c d s z do chmod +x ${_test}test.csh ./${_test}test.csh done popd %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %doc README %{_libdir}/libsuperlu.so.%{version} %files devel %{_includedir}/%{name}/ %{_libdir}/%{shlibname}.so %files doc %doc DOC EXAMPLE FORTRAN %changelog * Sun Mar 27 2016 Mukundan Ragavan - 4.3-3 - Add -doc subpackage - Add GPLv2 to the license field * Sun Mar 27 2016 Mukundan Ragavan - 4.3-2 - Renamed the package to SuperLU43 - Renamed devel shared lib to libsuperlu43 - Removed conflicts since the latest version and this can co-exist * Sat Mar 26 2016 Mukundan Ragavan - 4.3-1 - Initial build of compat package