File superlu.spec of Package superlu

#
# 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
BuildRequires:  gcc-fortran tcsh
License:        BSD-3-Clause
Group:          Development/Libraries/C and C++
Provides:       blas2
Summary:        SuperLU matrix solver
Version:        3.0
Release:        141
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
Url:            http://crd.lbl.gov/~xiaoye/SuperLU/
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.



Authors:
--------
    xiaoye@nersc.gov

%prep
%setup -n SuperLU_%{version}
%patch -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1

%build
#cd ../SuperLU
make  -C CBLAS #%{?_smp_mflags}
make #%{?_smp_mflags}

%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/

%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/*

%changelog
openSUSE Build Service is sponsored by