update redhat packaging

This commit is contained in:
Arne Morten Kvarving 2017-10-25 09:43:30 +02:00 committed by Arne Morten Kvarving
parent 4d06ae5d00
commit ef408c3538

View File

@ -2,22 +2,23 @@
# spec file for package opm-core
#
%define tag rc3
%define tag rc1
Name: opm-core
Version: 2013.10
Version: 2017.10
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 dune-common-devel
BuildRequires: blas-devel lapack-devel dune-common-devel opm-grid-devel
BuildRequires: git suitesparse-devel doxygen bc opm-material-devel
BuildRequires: tinyxml-devel dune-istl-devel ert.ecl-devel opm-common-devel
BuildRequires: tinyxml-devel dune-istl-devel ecl-devel opm-common-devel
BuildRequires: opm-parser-devel opm-material-devel opm-output-devel
%{?el6:BuildRequires: cmake28 devtoolset-3-toolchain boost148-devel}
%{?!el6:BuildRequires: cmake gcc gcc-gfortran gcc-c++ boost-devel}
BuildRequires: devtoolset-6-toolchain
%{?el6:BuildRequires: cmake3 boost148-devel}
%{?!el6:BuildRequires: cmake boost-devel}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: libopm-core1 = %{version}
@ -56,8 +57,8 @@ This package contains the documentation files for opm-core
# consider using -DUSE_VERSIONED_DIR=ON if backporting
%build
%{?el6:scl enable devtoolset-3 bash}
%{?el6:cmake28} %{!?el6:cmake} -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTRIP_DEBUGGING_SYMBOLS=ON -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_INSTALL_DOCDIR=share/doc/%{name}-%{version} -DUSE_RUNPATH=OFF -DWITH_NATIVE=OFF %{?el6:-DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-3/root/usr/bin/g++ -DCMAKE_C_COMPILER=/opt/rh/devtoolset-3/root/usr/bin/gcc -DCMAKE_Fortran_COMPILER=/opt/rh/devtoolset-3/root/usr/bin/gfortran -DBOOST_LIBRARYDIR=%{_libdir}/boost148 -DBOOST_INCLUDEDIR=%{_includedir}/boost148}
scl enable devtoolset-6 bash
%{?el6:cmake3} %{!?el6:cmake} -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTRIP_DEBUGGING_SYMBOLS=ON -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_INSTALL_DOCDIR=share/doc/%{name}-%{version} -DUSE_RUNPATH=OFF -DWITH_NATIVE=OFF -DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-6/root/usr/bin/g++ -DCMAKE_C_COMPILER=/opt/rh/devtoolset-6/root/usr/bin/gcc -DCMAKE_Fortran_COMPILER=/opt/rh/devtoolset-6/root/usr/bin/gfortran %{?el6:-DBOOST_LIBRARYDIR=%{_libdir}/boost148 -DBOOST_INCLUDEDIR=%{_includedir}/boost148}
make
%install