opm-simulators/redhat/opm-simulators.spec

228 lines
9.0 KiB
RPMSpec
Raw Normal View History

2013-10-30 07:22:04 -05:00
#
# spec file for package opm-simulators
2013-10-30 07:22:04 -05:00
#
2018-05-08 09:19:28 -05:00
%define tag final
2013-10-30 07:22:04 -05:00
Name: opm-simulators
2018-10-02 09:17:11 -05:00
Version: 2018.10
2013-10-30 07:22:04 -05:00
Release: 0
Summary: Open Porous Media - core library
License: GPL-3.0
Group: Development/Libraries/C and C++
Url: http://www.opm-project.org/
Source0: https://github.com/OPM/%{name}/archive/release/%{version}/%{tag}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: blas-devel lapack-devel
BuildRequires: dune-common-devel dune-geometry-devel dune-grid-devel dune-localfunctions-devel
2019-11-20 08:55:39 -06:00
BuildRequires: git suitesparse-devel doxygen bc
2018-06-20 05:35:56 -05:00
BuildRequires: opm-grid-devel opm-grid-openmpi-devel opm-grid-mpich-devel
2019-08-23 01:34:32 -05:00
BuildRequires: opm-models-devel opm-models-openmpi-devel opm-models-mpich-devel
2018-06-20 05:35:56 -05:00
BuildRequires: opm-material-devel opm-material-openmpi-devel opm-material-mpich-devel
2019-10-15 07:36:05 -05:00
BuildRequires: tinyxml-devel dune-istl-devel zlib-devel
2018-04-25 02:34:11 -05:00
BuildRequires: openmpi-devel trilinos-openmpi-devel ptscotch-openmpi-devel scotch-devel
2018-06-20 05:35:56 -05:00
BuildRequires: mpich-devel trilinos-mpich-devel ptscotch-mpich-devel
2018-06-21 06:28:51 -05:00
BuildRequires: opm-common-devel opm-common-openmpi-devel opm-common-mpich-devel
2019-11-20 08:55:39 -06:00
BuildRequires: cmake3
%{?!el8:BuildRequires: devtoolset-8-toolchain}
BuildRequires: boost-devel
2013-10-30 07:22:04 -05:00
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: libopm-simulators1 = %{version}
2013-10-30 07:22:04 -05:00
%description
The Open Porous Media (OPM) initiative provides a set of open-source tools centered around the simulation of flow and transport of fluids in porous media. The goal of the initiative is to establish a sustainable environment for the development of an efficient and well-maintained software suite.
%package -n libopm-simulators1
2013-10-30 07:22:04 -05:00
Summary: Open Porous Media - automatic differentiation library
Group: System/Libraries
%description -n libopm-simulators1
2013-10-30 07:22:04 -05:00
The Open Porous Media (OPM) initiative provides a set of open-source tools centered around the simulation of flow and transport of fluids in porous media. The goal of the initiative is to establish a sustainable environment for the development of an efficient and well-maintained software suite.
2018-05-08 09:19:28 -05:00
%package -n libopm-simulators1-openmpi
Summary: Open Porous Media - automatic differentiation library
Group: System/Libraries
%description -n libopm-simulators1-openmpi
The Open Porous Media (OPM) initiative provides a set of open-source tools centered around the simulation of flow and transport of fluids in porous media. The goal of the initiative is to establish a sustainable environment for the development of an efficient and well-maintained software suite.
2018-06-20 05:35:56 -05:00
%package -n libopm-simulators1-mpich
Summary: Open Porous Media - automatic differentiation library
Group: System/Libraries
%description -n libopm-simulators1-mpich
The Open Porous Media (OPM) initiative provides a set of open-source tools centered around the simulation of flow and transport of fluids in porous media. The goal of the initiative is to establish a sustainable environment for the development of an efficient and well-maintained software suite.
2013-10-30 07:22:04 -05:00
%package devel
Summary: Development and header files for opm-simulators
2013-10-30 07:22:04 -05:00
Group: Development/Libraries/C and C++
Requires: libopm-simulators1 = %{version}
2013-10-30 07:22:04 -05:00
%description devel
This package contains the development and header files for opm-simulators
2013-10-30 07:22:04 -05:00
2018-05-08 09:19:28 -05:00
%package openmpi-devel
Summary: Development and header files for opm-simulators
Group: Development/Libraries/C and C++
Requires: libopm-simulators1-openmpi = %{version}
%description openmpi-devel
This package contains the development and header files for opm-simulators
2018-06-20 05:35:56 -05:00
%package mpich-devel
Summary: Development and header files for opm-simulators
Group: Development/Libraries/C and C++
Requires: libopm-simulators1-mpich = %{version}
%description mpich-devel
This package contains the development and header files for opm-simulators
2013-10-30 07:22:04 -05:00
%package doc
Summary: Documentation files for opm-simulators
2013-10-30 07:22:04 -05:00
Group: Documentation
BuildArch: noarch
%description doc
This package contains the documentation files for opm-simulators
2013-10-30 07:22:04 -05:00
%package bin
Summary: Applications in opm-simulators
2013-10-30 07:22:04 -05:00
Group: Scientific
Requires: libopm-simulators1 = %{version}
2013-10-30 07:22:04 -05:00
%description bin
This package contains the applications for opm-simulators
2013-10-30 07:22:04 -05:00
2018-05-08 09:19:28 -05:00
%package openmpi-bin
Summary: Applications in opm-simulators
Group: Scientific
Requires: libopm-simulators1-openmpi = %{version}
Requires: libopm-grid1-openmpi
Requires: libopm-common1-openmpi
2018-06-20 05:35:56 -05:00
Requires: trilinos-openmpi
Requires: ptscotch-openmpi
2018-05-08 09:19:28 -05:00
%description openmpi-bin
This package contains the applications for opm-simulators
2018-06-20 05:35:56 -05:00
%package mpich-bin
Summary: Applications in opm-simulators
Group: Scientific
Requires: libopm-simulators1-mpich = %{version}
Requires: libopm-grid1-mpich
Requires: libopm-common1-mpich
2018-06-20 05:35:56 -05:00
Requires: trilinos-mpich
Requires: ptscotch-mpich
%description mpich-bin
This package contains the applications for opm-simulators
2019-11-20 08:55:39 -06:00
%global debug_package %{nil}
2013-10-30 07:22:04 -05:00
%prep
%setup -q -n %{name}-release-%{version}-%{tag}
%build
2018-05-08 09:19:28 -05:00
mkdir serial
cd serial
cmake3 -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_INSTALL_DOCDIR=share/doc/%{name}-%{version} -DUSE_RUNPATH=OFF -DWITH_NATIVE=OFF -DUSE_QUADMATH=0 %{!?el8:-DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-8/root/usr/bin/g++ -DCMAKE_C_COMPILER=/opt/rh/devtoolset-8/root/usr/bin/gcc -DCMAKE_Fortran_COMPILER=/opt/rh/devtoolset-8/root/usr/bin/gfortran} -DCMAKE_INSTALL_SYSCONFDIR=/etc ..
2018-06-20 05:35:56 -05:00
make %{?_smp_mflags}
2018-05-22 06:38:49 -05:00
#make test
2018-05-08 09:19:28 -05:00
cd ..
mkdir openmpi
cd openmpi
2018-04-25 02:34:11 -05:00
%{?el6:module load openmpi-x86_64}
%{?!el6:module load mpi/openmpi-x86_64}
cmake3 -DUSE_MPI=1 -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%{_prefix}/lib64/openmpi -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_DOCDIR=share/doc/%{name}-%{version} -DUSE_RUNPATH=OFF -DWITH_NATIVE=OFF -DUSE_QUADMATH=0 %{!?el8:-DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-8/root/usr/bin/g++ -DCMAKE_C_COMPILER=/opt/rh/devtoolset-8/root/usr/bin/gcc -DCMAKE_Fortran_COMPILER=/opt/rh/devtoolset-8/root/usr/bin/gfortran} -DZOLTAN_ROOT=/usr/lib64/openmpi -DCMAKE_CXX_FLAGS=-I/usr/include/openmpi-x86_64/trilinos -DZOLTAN_INCLUDE_DIRS=/usr/include/openmpi-x86_64/trilinos -DPTSCOTCH_ROOT=/usr/lib64/openmpi -DPTSCOTCH_INCLUDE_DIR=/usr/include/openmpi-x86_64 -DCMAKE_INSTALL_SYSCONFDIR=/etc ..
2018-06-20 05:35:56 -05:00
make %{?_smp_mflags}
#make test
cd ..
mkdir mpich
cd mpich
%{?el6:module rm openmpi-x86_64}
%{?el6:module load mpich-x86_64}
%{?!el6:module rm mpi/openmpi-x86_64}
%{?!el6:module load mpi/mpich-x86_64}
cmake3 -DUSE_MPI=1 -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%{_prefix}/lib64/mpich -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_DOCDIR=share/doc/%{name}-%{version} -DUSE_RUNPATH=OFF -DWITH_NATIVE=OFF -DUSE_QUADMATH=0 %{!?el8:-DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-8/root/usr/bin/g++ -DCMAKE_C_COMPILER=/opt/rh/devtoolset-8/root/usr/bin/gcc -DCMAKE_Fortran_COMPILER=/opt/rh/devtoolset-8/root/usr/bin/gfortran} -DZOLTAN_ROOT=/usr/lib64/mpich -DCMAKE_CXX_FLAGS=-I/usr/include/mpich-x86_64/trilinos -DZOLTAN_INCLUDE_DIRS=/usr/include/mpich-x86_64/trilinos -DPTSCOTCH_ROOT=/usr/lib64/mpich -DPTSCOTCH_INCLUDE_DIR=/usr/include/mpich-x86_64 -DCMAKE_INSTALL_SYSCONFDIR=/etc ..
2018-06-20 05:35:56 -05:00
make %{?_smp_mflags}
2018-05-08 09:19:28 -05:00
#make test
2013-10-30 07:22:04 -05:00
%install
2018-05-08 09:19:28 -05:00
cd serial
2013-10-30 07:22:04 -05:00
make install DESTDIR=${RPM_BUILD_ROOT}
make install-html DESTDIR=${RPM_BUILD_ROOT}
2018-05-08 09:19:28 -05:00
cd ..
2018-06-20 05:35:56 -05:00
2018-05-08 09:19:28 -05:00
cd openmpi
make install DESTDIR=${RPM_BUILD_ROOT}
mv ${RPM_BUILD_ROOT}/usr/lib64/openmpi/include/* ${RPM_BUILD_ROOT}/usr/include/openmpi-x86_64/
2018-06-20 05:35:56 -05:00
cd ..
cd mpich
make install DESTDIR=${RPM_BUILD_ROOT}
mv ${RPM_BUILD_ROOT}/usr/lib64/mpich/include/* ${RPM_BUILD_ROOT}/usr/include/mpich-x86_64/
2013-10-30 07:22:04 -05:00
%clean
rm -rf %{buildroot}
%post -n libopm-simulators1 -p /sbin/ldconfig
2018-05-08 09:19:28 -05:00
%post -n libopm-simulators1-openmpi -p /sbin/ldconfig
2018-06-20 05:35:56 -05:00
%post -n libopm-simulators1-mpich -p /sbin/ldconfig
2013-10-30 07:22:04 -05:00
%postun -n libopm-simulators1 -p /sbin/ldconfig
2018-05-08 09:19:28 -05:00
%postun -n libopm-simulators1-openmpi -p /sbin/ldconfig
2018-06-20 05:35:56 -05:00
%postun -n libopm-simulators1-mpich -p /sbin/ldconfig
2013-10-30 07:22:04 -05:00
%files doc
%{_docdir}/*
/etc/bash_completion.d/*
2013-10-30 07:22:04 -05:00
%files -n libopm-simulators1
2013-10-30 07:22:04 -05:00
%defattr(-,root,root,-)
%{_libdir}/*.so.*
2018-05-08 09:19:28 -05:00
%files -n libopm-simulators1-openmpi
%defattr(-,root,root,-)
2018-06-20 05:35:56 -05:00
%{_libdir}/openmpi/lib/*.so.*
%files -n libopm-simulators1-mpich
%defattr(-,root,root,-)
%{_libdir}/mpich/lib/*.so.*
2018-05-08 09:19:28 -05:00
2013-10-30 07:22:04 -05:00
%files devel
%defattr(-,root,root,-)
%{_libdir}/*.so
2018-04-25 02:34:11 -05:00
/usr/lib/dunecontrol/*
2013-10-30 07:22:04 -05:00
%{_libdir}/pkgconfig/*
%{_includedir}/*
%{_datadir}/cmake/*
2018-01-05 03:44:51 -06:00
%{_datadir}/opm/cmake/Modules/*
2013-10-30 07:22:04 -05:00
2018-05-08 09:19:28 -05:00
%files openmpi-devel
%defattr(-,root,root,-)
2018-06-20 05:35:56 -05:00
%{_libdir}/openmpi/lib/*.so
2018-05-08 09:19:28 -05:00
%{_libdir}/openmpi/lib/dunecontrol/*
2018-06-20 05:35:56 -05:00
%{_libdir}/openmpi/lib/pkgconfig/*
2018-05-08 09:19:28 -05:00
%{_includedir}/openmpi-x86_64/*
%{_libdir}/openmpi/share/cmake/*
%{_libdir}/openmpi/share/opm/cmake/Modules/*
2018-06-20 05:35:56 -05:00
%files mpich-devel
%defattr(-,root,root,-)
%{_libdir}/mpich/lib/*.so
%{_libdir}/mpich/lib/dunecontrol/*
%{_libdir}/mpich/lib/pkgconfig/*
%{_includedir}/mpich-x86_64/*
%{_libdir}/mpich/share/cmake/*
%{_libdir}/mpich/share/opm/cmake/Modules/*
2013-10-30 07:22:04 -05:00
%files bin
%{_bindir}/*
2018-05-08 09:19:28 -05:00
%files openmpi-bin
%{_libdir}/openmpi/bin/*
2018-06-20 05:35:56 -05:00
%files mpich-bin
%{_libdir}/mpich/bin/*