Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release-src > by-pkgid > a49aaf6d37aeb8b7dabfc01881ec292b > files > 2

arpack-3.1.5-4.mga5.src.rpm

%define build_parpack 1

# To build PARPACK, we'll need a FORTRAN 77 MPI implementation.
# In Mageia we've yet got MPICH2 and OpenMPI.

%define build_mpich 0
%define build_openmpi 1

%{?_with_parpack: %{expand: %%global build_parpack 1}}
%{?_without_parpack: %{expand: %%global build_parpack 0}}

%{?_with_mpich: %{expand: %%global build_mpich 1}}
%{?_with_openmpi: %{expand: %%global build_openmpi 1}}
%{?_without_mpich: %{expand: %%global build_mpich 0}}
%{?_without_openmpi: %{expand: %%global build_openmpi 0}}

Name:		arpack
Version:	3.1.5
Release:	%mkrel 4
Group:		Sciences/Mathematics
License:	BSD
Summary:	Fortran 77 subroutines for solving large scale eigenvalue problems
URL:		http://forge.scilab.org/index.php/p/arpack-ng/
Source0:	http://forge.scilab.org/index.php/p/arpack-ng/downloads/get/arpack-ng-%{version}.tar.gz
Provides:	%{name}-ng = %{version}-%{release}
BuildRequires:	autoconf
BuildRequires:	gcc-gfortran
BuildRequires:	libblas-devel
BuildRequires:	liblapack-devel

%if %{build_parpack}
%if %{build_mpich}
BuildRequires:	mpi2f77
%endif
%if %{build_openmpi}
BuildRequires:	libopenmpi-devel
%endif
%endif

%define major		2
%define libname		%mklibname %{name} %{major}
%define develname	%mklibname %{name} -d
%if %{build_parpack}
%define plibname	%mklibname p%{name} %{major}
%define pdevelname	%mklibname p%{name} -d
%endif

%description
ARPACK is a collection of Fortran 77 subroutines designed to solve large
scale eigenvalue problems.

The package is designed to compute a few eigenvalues and corresponding
eigenvectors of a general n by n matrix A. It is most appropriate for
large sparse or structured matrices A where structured means that a
matrix-vector product w <- Av requires order n rather than the usual
order n**2 floating point operations. This software is based upon an
algorithmic variant of the Arnoldi process called the Implicitly
Restarted Arnoldi Method (IRAM).

%package -n %{libname}
Summary:	Runtime libraries for ARPACK
Group:		Sciences/Mathematics

%description -n %{libname}
ARPACK is a collection of Fortran 77 subroutines designed to solve
large scale eigenvalue problems. This package contains runtime
libraries needed to run arpack based applications.

%package -n %{develname}
Summary:	Files needed for developing ARPACK based applications
Group:		Sciences/Mathematics
Requires:	%{libname} = %{version}-%{release}
Provides:	%{name}-devel = %{version}-%{release}
Provides:	%{name}-ng-devel = %{version}-%{release}

%description -n %{develname}
ARPACK is a collection of Fortran 77 subroutines designed to solve
large scale eigenvalue problems. This package contains the .so
library links used for building ARPACK based applications.

%if %{build_parpack}

%package -n %{plibname}
Summary:	Runtime libraries for PARPACK
Group:		Sciences/Mathematics

%description -n %{plibname}
ARPACK is a collection of Fortran 77 subroutines designed to solve
large scale eigenvalue problems. This package contains runtime
libraries needed to run arpack based applications.

PARPACK is a parallel version of ARPACK that utilizes MPI.

%package -n %{pdevelname}
Summary:	Files needed for developing ARPACK based applications
Group:		Sciences/Mathematics
#fix libname to plibname here
Requires:	%{plibname} = %{version}-%{release}
Provides:	p%{name}-devel = %{version}-%{release}

%description -n %{pdevelname}
ARPACK is a collection of Fortran 77 subroutines designed to solve
large scale eigenvalue problems. PARPACK is a parallel version of
ARPACK that utilizes MPI. This package contains the .so library 
links used for building PARPACK based applications.

%endif

%prep

# Whoa, a logical XOR implementation for RPM!
%if !(%{build_mpich} || %{build_openmpi}) || (%{build_mpich} && %{build_openmpi})
%{error:either MPICH or OpenMPI should be chosen}
exit 1
%endif

%setup -q -n %{name}-ng-%{version}

# The Autoconf ax_mpi.m4 file doesn't detect correct library sets.
%if %{build_mpich}
export MPILIBS="-lfmpich -lpmpich -lmpich"
%endif
%if %{build_openmpi}
export MPILIBS="-lmpi_mpifh"
%endif

# Fix undefined __stack_chk_fail
sed -i Makefile.am -e "s/\$(LAPACK_LIBS)/\$(LAPACK_LIBS) -lc/"

# libtool forgets about MPI libs when linking PARPACK, fix it
# (and __stack_chk_fail too)
sed -i PARPACK/Makefile.am -e "s/\$(LAPACK_LIBS)/\$(LAPACK_LIBS) $MPILIBS -lc/"

autoreconf -iv

%configure2_5x \
%if %{build_parpack}
--enable-mpi \
%endif
--disable-static

%build
%make

%install
%makeinstall_std

%__rm -f %{buildroot}/%{_libdir}/*.la
%__rm -f %{buildroot}/%{_bindir}/p??drv?

%files
%doc README TODO CHANGES COPYING PARPACK_CHANGES EXAMPLES DOCUMENTS
#{_bindir}/dnsimp

%files -n %{libname}
%{_libdir}/lib%{name}.so.*

%files -n %{develname}
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc

%if %{build_parpack}
%files -n %{plibname}
%{_libdir}/libp%{name}.so.*

%files -n %{pdevelname}
%{_libdir}/libp%{name}.so
%endif


%changelog
* Wed Oct 15 2014 umeabot <umeabot> 3.1.5-4.mga5
+ Revision: 739784
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 3.1.5-3.mga5
+ Revision: 677905
- Mageia 5 Mass Rebuild

* Thu Jun 19 2014 eatdirt <eatdirt> 3.1.5-2.mga5
+ Revision: 638091
- Fix missing Requires for libparpack-devel

* Thu Apr 10 2014 eatdirt <eatdirt> 3.1.5-1.mga5
+ Revision: 613360
- Upgrade to 3.1.5

* Thu Apr 10 2014 eatdirt <eatdirt> 3.1.3-3.mga5
+ Revision: 613226
- Rebuild for new openmpi

* Tue Oct 22 2013 umeabot <umeabot> 3.1.3-2.mga4
+ Revision: 545289
- Mageia 4 Mass Rebuild

* Tue Oct 15 2013 mitya <mitya> 3.1.3-1.mga4
+ Revision: 501037
- Bring back PARPACK
- Fix "undefind __stack_chk_fail"
- New version 3.1.3
- Temporarily disable PARPACK (libtool/MPI issue)

* Fri Jan 11 2013 umeabot <umeabot> 3.1.2-2.mga3
+ Revision: 346087
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sun Sep 16 2012 mitya <mitya> 3.1.2-1.mga3
+ Revision: 294611
- New version 3.1.2

* Sat Jul 14 2012 wally <wally> 3.1.1-2.mga3
+ Revision: 270685
- rebuild due to a missing pkgs

* Sat Jul 07 2012 mitya <mitya> 3.1.1-1.mga3
+ Revision: 268763
- New version 3.1.1

* Thu Jun 14 2012 eatdirt <eatdirt> 3.1.0-4.mga3
+ Revision: 260549
- Rebuild for openmpi-1.6

* Thu Apr 05 2012 mitya <mitya> 3.1.0-3.mga3
+ Revision: 228779
+ rebuild (emptylog)

* Thu Apr 05 2012 mitya <mitya> 3.1.0-2.mga2
+ Revision: 228705
+ rebuild (emptylog)

* Thu Apr 05 2012 mitya <mitya> 3.1.0-1.mga2
+ Revision: 228694
- imported package arpack