Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > 0ea510f89383805ea3fcd5bfc7522ab1 > files > 6

orsa-0.7.0-22.fc18.src.rpm

# Define a macro for calling ../configure instead of ./configure
%global dconfigure %(printf %%s '%configure' | sed 's!\./configure!../configure!g')

Name:			orsa
Version:		0.7.0
Release:		22%{?dist}
Summary:		Orbit Reconstruction, Simulation and Analysis

Group:			Amusements/Graphics
License:		GPLv2+ 
URL:			http://orsa.sourceforge.net
Source0:		http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Source1:		ORSA_MPI
# Patch to build with GCC 4.3
# Reported into upstream bugtracker as
# http://sourceforge.net/tracker/index.php?func=detail&aid=2099077&group_id=44502&atid=439768
Patch0:			%{name}-gcc43.patch
# Patching configure in order to:
# - make it find the fftw2 library properly (-lm was missing but needed)
# - make it find the cln and ginac libraries properly as they do not use 
# {cln,ginac}-config anymore but rely on pkg-config instead in F9 and higher
# Reported into upstream bugtracker as
# http://sourceforge.net/tracker/index.php?func=detail&aid=2099054&group_id=44502&atid=439768
Patch1:			%{name}-configure.patch
# Patch that prevents orsa from printing many errors on startup because of missing
# configuration files.
# Reported into upstream bugtracker as
# http://sourceforge.net/tracker/?func=detail&aid=2741094&group_id=44502&atid=439768
Patch2:			%{name}-file.patch
BuildRoot:		%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	readline-devel
BuildRequires:	qt3-devel
BuildRequires:	mesa-libGL-devel
BuildRequires:	fftw2-devel
BuildRequires:	gsl-devel
BuildRequires:	cln-devel
BuildRequires:	ginac-devel

Requires:	%{name}-common = %{version}-%{release}

%description
ORSA is an interactive tool for scientific grade Celestial Mechanics
computations. Asteroids, comets, artificial satellites, Solar and extra-Solar
planetary systems can be accurately reproduced, simulated, and analyzed. 

%package devel
Summary:	Development files for %{name}
Group:		Development/Libraries

Requires:	fftw2-devel
Requires:	gsl-devel
Requires:	zlib-devel
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-headers = %{version}-%{release}

%description devel
This package contains development files for %{name}.

%package openmpi
Summary:	A build of %{name} with support for OpenMPI
Group:		Applications/Engineering

BuildRequires: openmpi-devel
Requires:	%{name}-common = %{version}-%{release}
Requires:	openmpi

%description openmpi
This package contains a build of %{name} with support for OpenMPI.

%package openmpi-devel
Summary:	Development files for %{name} build with support for OpenMPI
Group:		Development/Libraries

Requires: %{name}-openmpi = %{version}-%{release}
Requires: %{name}-headers = %{version}-%{release}

%description openmpi-devel
This package contains development files for a build of %{name}
 with support for OpenMPI.

%package mpich
Summary:	A build of %{name} with support for MPICH MPI
Group:		Applications/Engineering

BuildRequires:	mpich-devel-static
Requires:	%{name}-common = %{version}-%{release}
Requires:	mpich
Provides:	%{name}-mpich2 = %{version}-%{release}
Obsoletes:	%{name}-mpich2 < 0.7.0-22

%description mpich
This package contains a build of %{name} with support for MPICH MPI.

%package mpich-devel
Summary:	Development files for %{name} build with support for MPICH MPI
Group:		Development/Libraries

Requires:	%{name}-mpich = %{version}-%{release}
Requires:	%{name}-headers = %{version}-%{release}
Provides:	%{name}-mpich2-devel = %{version}-%{release}
Obsoletes:	%{name}-mpich2-devel < 0.7.0-22

%description mpich-devel
This package contains development files for a build of %{name}
with support for MPICH MPI.

%package headers
Summary:	Headers for development with %{name}
Group:		Development/Libraries

%description headers
This package contains C++ header files for development with %{name}.

%package common
Summary:	Common files for %{name}
Group:		Documentation

%description common
This package contains files shared across the MPI/non-MPI builds of %{name}.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2

# Install user hints for MPI support
install -p -m644 %{SOURCE1} .

%build
# honor $RPM_OPT_FLAGS
sed -i 's|-g -Wall -W -pipe -ftemplate-depth-64 -O3 -fno-exceptions -funroll-loops -fstrict-aliasing -fno-gcse|$CXXFLAGS|' configure

# To avoid replicated code define a build macro
%define dobuild() \
mkdir $MPI_COMPILER; \
cd $MPI_COMPILER; \
%dconfigure $WITH_MPI --prefix=$MPI_HOME --bindir=$MPI_BIN --libdir=$MPI_LIB --program-suffix=$MPI_SUFFIX --disable-dependency-tracking --disable-static "CLN_CONFIG=`which pkg-config` cln" "GINACLIB_CONFIG=`which pkg-config` ginac" CXXFLAGS="$CXXFLAGS -DHAVE_INLINE" ;\
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool ;\
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool ;\
make %{?_smp_mflags} ; \
cd ..

%global OpenMPI_BIN %(%{_openmpi_load} echo $MPI_BIN)
%global OpenMPI_LIB %(%{_openmpi_load} echo $MPI_LIB)
%global mpichdir %(%{_mpich_load} echo $MPI_HOME)
################################
echo -e "\n##############################\nNow making the non-MPI version\n##############################\n"
################################

# Build serial version, dummy arguments
MPI_COMPILER=serial MPI_SUFFIX= WITH_MPI=--without-mpi MPI_HOME=%{_prefix} MPI_BIN=%{_bindir} MPI_LIB=%{_libdir} %dobuild

# Build parallel versions: set compiler variables to MPI wrappers
export CC=mpicc
export CXX=mpicxx
export FC=mpif90
export F77=mpif77

################################
echo -e "\n##############################\nNow making the OpenMPI version\n##############################\n"
################################

%{_openmpi_load}
WITH_MPI=--with-mpi %dobuild
%{_openmpi_unload}

################################
echo -e "\n##############################\nNow making the MPICH version\n##############################\n"
################################
%{_mpich_load}
WITH_MPI=--with-mpi %dobuild
%{_mpich_unload}

%install
rm -rf $RPM_BUILD_ROOT
# we don't want to ship libtool archives:

# Install serial version
make -C serial install DESTDIR=%{buildroot} INSTALL="install -p" CPPROG="cp -p"
rm $RPM_BUILD_ROOT%{_libdir}/{liborsa.la,libxorsa.la}

# Install OpenMPI version
%{_openmpi_load}
make -C $MPI_COMPILER install DESTDIR=%{buildroot} INSTALL="install -p" CPPROG="cp -p"
rm $RPM_BUILD_ROOT$MPI_LIB/{liborsa.la,libxorsa.la}
%{_openmpi_unload}

# Install MPICH version
%{_mpich_load}
make -C $MPI_COMPILER install DESTDIR=%{buildroot} INSTALL="install -p" CPPROG="cp -p"
rm $RPM_BUILD_ROOT$MPI_LIB/{liborsa.la,libxorsa.la}
%{_mpich_unload}

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%{_bindir}/xorsa
%{_libdir}/liborsa.so.*
%{_libdir}/libxorsa.so.*

%files devel
%defattr(-,root,root,-)
%{_libdir}/*.so

%files headers
%defattr(-,root,root,-)
%{_includedir}/*

%files openmpi
%defattr(-,root,root,-)
%{OpenMPI_LIB}/liborsa.so.*
%{OpenMPI_LIB}/libxorsa.so.*
%{OpenMPI_BIN}/*

%files openmpi-devel
%defattr(-,root,root,-)
%{OpenMPI_LIB}/*.so

%files mpich
%defattr(-,root,root,-)
%{mpichdir}/bin/*
%{mpichdir}/lib/liborsa.so.*
%{mpichdir}/lib/libxorsa.so.*

%files mpich-devel
%defattr(-,root,root,-)
%{mpichdir}/lib/*.so

%files common
%defattr(-,root,root,-)
%doc COPYING DEVELOPERS ORSA_MPI

%changelog
* Wed Jul 24 2013 Deji Akingunola <dakingun@gmail.com> - 0.7.0-22
- Rename mpich2 sub-packages to mpich and rebuild for mpich-3.0

* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-20
- Rebuilt for c++ ABI breakage

* Tue Jan 24 2012 Orion Poplawski <orion@cora.nwra.com> - 0.7.0-19
- Rebuild for ginac 1.6.2 soname bump

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 0.7.0-17
- Rebuild for new libpng

* Tue Mar 29 2011 Deji Akingunola <dakingun@gmail.com> - 0.7.0-16
- Rebuild for mpich2 soname bump

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Tue Oct 19 2010 Deji Akingunola <dakingun@gmail.com> - 0.7.0-14
- Rebuild for both mpich2 and openmpi updates

* Thu Dec 10 2009 Deji Akingunola <dakingun@gmail.com> - 0.7.0-13
- No need to force mpicxx to be CC for mpich2 subpackage
- BR mpich2-devel-static

* Thu Nov 26 2009 Deji Akingunola <dakingun@gmail.com> - 0.7.0-12
- Rebuild for mpich2 
- Remove the lam subpackage, lam is no more in Fedora
- Clean-up the spec

* Thu Aug 27 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 0.7.0-11
- Make compliant to new MPI guidelines:
- Do not build in %%install (resolves BZ#513697)
- Split docs into a -common subpackage

* Fri Jul 24 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 0.7.0-10
- Reenabled MPI support in a way described in BZ#511099, introduced
  separate subpackages with support for OpenMPI, MPICH2 and LAM MPI
  implementations.
- Written ORSA_MPI user documentation about MPI support

* Mon Jul 13 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 0.7.0-9
- Rebuilt against new cln 1.3.0
- Temporarily disabled MPI support as current openmpi builds do not ship -devel,
  nor its previous content in the main package

* Sun Apr 12 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 0.7.0-8
- Do not complain at all if the configuration file is missing.

* Tue Apr 08 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 0.7.0-7
- Fix segfault on missing jpl file.

* Tue Apr 07 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 0.7.0-6
- Do not complain loudly if the configuration file is missing (fix #494342)

* Sat Feb 28 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 0.7.0-5
- Rebuilt against new ginac 1.5

* Fri Feb 27 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 0.7.0-4
- Fixed gcc 4.4 build

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Wed Sep 10 2008 Milos Jakubicek <xjakub@fi.muni.cz> - 0.7.0-2
- Patched configure to honor $RPM_OPT_FLAGS
- Added missing Requires: to the -devel subpackage

* Fri Sep 5 2008 Milos Jakubicek <xjakub@fi.muni.cz> - 0.7.0-1
- Initial release.