Skip to content

Commit

Permalink
make packaging compatible with EL5
Browse files Browse the repository at this point in the history
  • Loading branch information
akva2 committed Oct 30, 2013
1 parent c62c27b commit c218f11
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions redhat/opm-polymer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ 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: git suitesparse-devel cmake28 doxygen bc ert.ecl-devel
BuildRequires: tinyxml-devel dune-istl-devel superlu-devel opm-core-devel
%{?el5:BuildRequires: gcc44 gcc44-gfortran gcc44-c++}
%{!?el5:BuildRequires: gcc gcc-gfortran gcc-c++}
Expand All @@ -28,25 +28,27 @@ This module is the polymer part of OPM.
%package -n libopm-polymer1
Summary: Open Porous Media - polymer library
Group: System/Libraries
%{?el5:BuildArch: %{_arch}}

%description -n libopm-polymer1
This module is the polymer part of OPM.

%package bin
Summary: Open Porous Media - polymer library - applications
Group: Science
%{?el5:BuildArch: %{_arch}}

%description bin
This module is the polymer part of OPM.

%package devel
Summary: Development and header files for opm-polymer
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: blas-devel
Requires: lapack-devel
Requires: suitesparse-devel
Requires: libopm-polymer1 = %{version}
%{?el5:BuildArch: %{_arch}}

%description devel
This module is the polymer part of OPM.
Expand All @@ -59,12 +61,23 @@ BuildArch: noarch
%description doc
This package contains the documentation files for opm-polymer

%{?el5:
%package debuginfo
Summary: Debug info in opm-polymer
Group: Scientific
Requires: libopm-polymer1 = %{version}, opm-polymer-bin = %{version}
BuildArch: %{_arch}

%description debuginfo
This package contains the debug symbols for opm-polymer
}

%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=Release -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}/boost141 -DBOOST_INCLUDEDIR=/usr/include/boost141}
cmake28 -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_INSTALL_DOCDIR=share/doc/%{name}-%{version} -DUSE_RUNPATH=OFF %{?el5:-DCMAKE_CXX_COMPILER=g++44 -DCMAKE_C_COMPILER=gcc44 -DBOOST_LIBRARYDIR=%{_libdir}/boost141 -DBOOST_INCLUDEDIR=/usr/include/boost141}
make

%install
Expand Down Expand Up @@ -95,3 +108,8 @@ rm -rf %{buildroot}

%files bin
%{_bindir}/*

%{?el5:
%files debuginfo
/usr/lib/debug/%{_libdir}/*.so.*.debug
}

0 comments on commit c218f11

Please sign in to comment.