Accepting request 146203 from home:scorot:branches:devel:libraries:c_c++
- Remove unneeded patches + superlu-overflow.patch : Applied upstream + superlu-initialize.diff : Applied upstream + superlu-undef-code.diff : Applied upstream - Updated patches + superlu-4.3.diff + superlu-4.3-include.patch + superlu-4.3-dont-opt-away.diff - Build shared libraries - Put shared libs and devel files in separate packages - Use rpm macros instead of plain directory names - Add %%ckeck - Update to SuperLU 4.3 - Update documentation file %%source1 and put html and examples files in %%doc - Spec file reformating OBS-URL: https://build.opensuse.org/request/show/146203 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/superlu?expand=0&rev=6
This commit is contained in:
120
superlu.spec
120
superlu.spec
@@ -16,24 +16,25 @@
|
||||
#
|
||||
|
||||
|
||||
|
||||
Name: superlu
|
||||
BuildRequires: gcc-fortran tcsh
|
||||
Summary: A general purpose library for the direct solution of linear equations
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Libraries/C and C++
|
||||
Provides: blas2
|
||||
Summary: SuperLU matrix solver
|
||||
Version: 3.0
|
||||
Release: 141
|
||||
Version: 4.3
|
||||
Release: 0
|
||||
Source: ftp://ftp.netlib.org/scalapack/prototype/superlu_%{version}.tar.bz2
|
||||
Source1: superlu_ug.ps.gz
|
||||
Patch: superlu-3.0.diff
|
||||
Patch1: superlu-overflow.patch
|
||||
Patch2: superlu-include.patch
|
||||
Patch3: superlu-dont-opt-away.diff
|
||||
Patch4: superlu-initialize.diff
|
||||
Patch5: superlu-undef-code.diff
|
||||
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
|
||||
@@ -43,45 +44,82 @@ 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.
|
||||
|
||||
Authors:
|
||||
--------
|
||||
xiaoye@nersc.gov
|
||||
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 -n SuperLU_%{version}
|
||||
%setup -q -n SuperLU_%{version}
|
||||
%patch -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
# superlu_ug.pdf in %%doc
|
||||
cp %SOURCE1 ./
|
||||
|
||||
%build
|
||||
#cd ../SuperLU
|
||||
make -C CBLAS #%{?_smp_mflags}
|
||||
make #%{?_smp_mflags}
|
||||
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
|
||||
install -d $RPM_BUILD_ROOT/%{_docdir}/superlu
|
||||
make install_lib LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT
|
||||
make install_blas LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT
|
||||
install -d -m 0755 $RPM_BUILD_ROOT/usr/include/superlu
|
||||
install -m 0644 SRC/*.h $RPM_BUILD_ROOT/usr/include/superlu/
|
||||
cp -pf README $RPM_BUILD_ROOT/%{_docdir}/superlu/README.SuperLU
|
||||
cp -pf %SOURCE1 $RPM_BUILD_ROOT/%{_docdir}/superlu/
|
||||
cp -ax EXAMPLE $RPM_BUILD_ROOT/%{_docdir}/superlu/
|
||||
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
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%docdir %{_docdir}/superlu
|
||||
%doc %{_docdir}/superlu
|
||||
%{_libdir}/libsuperlu.a
|
||||
%{_libdir}/superlu_*.a
|
||||
%{_libdir}/libblas2.a/
|
||||
%{_libdir}/blas2_*.a
|
||||
%dir /usr/include/superlu
|
||||
/usr/include/superlu/*
|
||||
#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
|
||||
|
Reference in New Issue
Block a user