Blob Blame History Raw
# SuperLU compat package
%global archname superlu
%global pkgname SuperLU
%global shlibname libsuperlu43

Name:			%{pkgname}43
Version:		4.3
Release:		6%{?dist}
Summary:		Subroutines to solve sparse linear systems

License:		BSD and GPLv2+
# 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

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.

%setup -q -n %{pkgname}_%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1

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
   [ "$(file $file | awk '{print $2}')" = ELF ] && rm $file || :
cp -p MAKE_INC/make.linux
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/!'					\
	-e 's!-shared!& %{__global_ldflags}!'						\
%if 0%{?fedora} >= 21
	-e "s|-L/usr/lib -lblas|-L%{_libdir}/atlas -lsatlas|"				\
	-e "s|-L/usr/lib -lblas|-L%{_libdir}/atlas -lf77blas|"				\

make %{?_smp_mflags} superlulib

mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}%{_includedir}/%{name}

install -p SRC/{version} %{buildroot}%{_libdir}
install -p SRC/*.h %{buildroot}%{_includedir}/%{name}
chmod -x %{buildroot}%{_includedir}/%{name}/*.h

cp -Pp SRC/ %{buildroot}%{_libdir}/%{shlibname}.so

for _test in c d s z
  chmod +x ${_test}test.csh

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files devel

%files doc

* Wed Aug 02 2017 Fedora Release Engineering <> - 4.3-6
- Rebuilt for

* Wed Jul 26 2017 Fedora Release Engineering <> - 4.3-5
- Rebuilt for

* Fri Feb 10 2017 Fedora Release Engineering <> - 4.3-4
- Rebuilt for

* 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