update redhat packaging

This commit is contained in:
Arne Morten Kvarving 2015-10-20 15:49:23 +02:00
parent 0cd08a1f12
commit 757289fe78

View File

@ -13,11 +13,11 @@ 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: git suitesparse-devel cmake28 doxygen bc
BuildRequires: tinyxml-devel dune-istl-devel ert.ecl-devel
BuildRequires: git suitesparse-devel doxygen bc opm-material-devel
BuildRequires: tinyxml-devel dune-istl-devel ert.ecl-devel opm-common-devel
BuildRequires: opm-parser-devel opm-material-devel boost148-devel
%{?el5:BuildRequires: gcc44 gcc44-c++}
%{!?el5:BuildRequires: gcc gcc-c++}
%{?el6:BuildRequires: cmake28 devtoolset-2}
%{?!el6:BuildRequires: cmake gcc gcc-gfortran gcc-c++}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: libopm-core1 = %{version}
@ -27,7 +27,6 @@ The Open Porous Media (OPM) initiative provides a set of open-source tools cente
%package -n libopm-core1
Summary: Open Porous Media - core library
Group: System/Libraries
%{?el5:BuildArch: %{_arch}}
%description -n libopm-core1
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.
@ -40,7 +39,6 @@ Requires: blas-devel
Requires: lapack-devel
Requires: suitesparse-devel
Requires: libopm-core1 = %{version}
%{?el5:BuildArch: %{_arch}}
%description devel
This package contains the development and header files for opm-core
@ -58,29 +56,17 @@ Summary: Applications in opm-core
Group: Scientific
Requires: %{name} = %{version}
Requires: libopm-core1 = %{version}
%{?el5:BuildArch: %{_arch}}
%description bin
This package contains the applications for opm-core
%{?el5:
%package debuginfo
Summary: Debug info in opm-core
Group: Scientific
Requires: %{name} = %{version}
Requires: libopm-core1 = %{version}, opm-core-bin = %{version}
BuildArch: %{_arch}
%description debuginfo
This package contains the debug symbols for opm-core
}
%prep
%setup -q -n %{name}-release-%{version}-%{tag}
# consider using -DUSE_VERSIONED_DIR=ON if backporting
%build
cmake28 -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 %{?el5:-DCMAKE_CXX_COMPILER=g++44 -DCMAKE_C_COMPILER=gcc44 -DCMAKE_Fortran_COMPILER=gfortran44} -DBOOST_LIBRARYDIR=%{_libdir}/boost148 -DBOOST_INCLUDEDIR=/usr/include/boost148
%{?el6:scl enable devtoolset-2 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 %{?el6:-DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-2/root/usr/bin/g++ -DCMAKE_C_COMPILER=/opt/rh/devtoolset-2/root/usr/bin/gcc -DCMAKE_Fortran_COMPILER=/opt/rh/devtoolset-2/root/usr/bin/gfortran} -DBOOST_LIBRARYDIR=%{_libdir}/boost148 -DBOOST_INCLUDEDIR=/usr/include/boost148
make
%install
@ -114,8 +100,3 @@ rm -rf %{buildroot}
%files bin
%{_bindir}/*
%{?el5:
%files debuginfo
/usr/lib/debug/%{_libdir}/*.so.*.debug
}