update redhat packaging

- package library
- add new dependencies on boost
  uses boost 1.48 on rhel6. rhel7 supplies a newer boost by default.
- pkg-config file relocated since a library is now provided.
This commit is contained in:
Arne Morten Kvarving 2016-04-18 10:47:06 +02:00
parent 06816f344a
commit 510687f073

View File

@ -13,13 +13,20 @@ 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: git doxygen bc
%{?el6:BuildRequires: devtoolset-2 cmake28}
%{!?el6:BuildRequires: gcc gcc-c++ cmake}
%{?el6:BuildRequires: devtoolset-2 cmake28 boost148-devel}
%{!?el6:BuildRequires: gcc gcc-c++ cmake boost-devel}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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-common1
Summary: OPM-common - library
Group: System/Libraries
%description -n libopm-common1
This package contains library for opm-common
%package devel
Summary: Development and header files for opm-common
Group: Development/Libraries/C and C++
@ -42,7 +49,7 @@ This package contains the documentation files for opm-common
# consider using -DUSE_VERSIONED_DIR=ON if backporting
%build
%{?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
%{?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=%{_includedir}/boost148}
make
%install
@ -57,6 +64,10 @@ rm -rf %{buildroot}
%files doc
%{_docdir}/*
%files -n libopm-common1
%defattr(-,root,root,-)
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root,-)
%{_libdir}/dunecontrol/*
@ -64,3 +75,4 @@ rm -rf %{buildroot}
%{_includedir}/*
%{_datadir}/cmake/*
%{_datadir}/opm/*
%{_libdir}/*.so