%if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 %global dcmake %(printf %%s '%cmake' ) %else %global dcmake %(printf %%s '%cmake' | sed 's!cmake!cmake3!g') %endif Name: LCIO Version: 2.13.02 Release: 1%{?dist} Summary: LCIO (Linear Collider I/O) is a persistency framework and event data model for linear collider detector studies. Group: Development/Tools License: Custom URL: http://lcio.desy.de/ Source0: https://github.com/iLCSoft/LCIO/archive/v02-13-02.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel zlib readline readline-devel ncurses-devel ncurses-libs clhep clhep-devel Requires: zlib %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 BuildRequires: cmake gcc-c++ python2 python2-devel %else BuildRequires: cmake3 gcc-c++ python python-devel %endif %description LCIO (Linear Collider I/O) is a persistency framework and event data model for linear collider detector studies. It is intended to be used in both simulation studies and analysis frameworks. Its light weight and portability makes it also suitable for use in detector R&D testbeam applications. It provides a C++ and a Java implementation with a common interface (API) - a Fortran interface to the C++ implementation also exists. Using a common persistency format and event data model allows to easily share results and compare reconstruction algorithms. LCIO is used by almost all groups involved in linear collider detector studies and thus has become a de facto standard. %package devel Summary: Libraries and headers for %{name} Provides: %{name}-devel = %{version}-%{release} %description devel %{libnamedev} contains the libraries and header files needed to develop programs which make use of %{name}. The library documentation is available on header files. %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 %package -n python2-%{name} Summary: %{name} Python 2 bindings %{?python_provide:%python_provide python2-%{name}} %description -n python2-%{name} This package provides the Python 2 bindings for %{name} %else %package -n python-%{name} Summary: %{name} Python bindings %{?python_provide:%python_provide python2-%{name}} %description -n python-%{name} This package provides the Python 2 bindings for %{name} %endif %prep %setup -q -n LCIO-02-13-02 %build %if %{?rhel}%{!?rhel:0} == 8 %dcmake -DBUILD_TESTING:BOOL=OFF -H. -B. %else %dcmake -DBUILD_TESTING:BOOL=OFF -S. -B. %endif %install %make_install mv $RPM_BUILD_ROOT/usr/lib $RPM_BUILD_ROOT/usr/%_lib %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 mkdir -p $RPM_BUILD_ROOT/%{python2_sitearch} mv $RPM_BUILD_ROOT/usr/python/* $RPM_BUILD_ROOT/%{python2_sitearch} %else mkdir -p $RPM_BUILD_ROOT/%{python_sitearch} mv $RPM_BUILD_ROOT/usr/python/* $RPM_BUILD_ROOT/%{python_sitearch} %endif mkdir -p $RPM_BUILD_ROOT/usr/share/cmake/ mv $RPM_BUILD_ROOT/usr/*cmake $RPM_BUILD_ROOT/usr/share/cmake/ %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files /usr/bin/* /usr/%_lib/* %files devel /usr/include/* /usr/share/cmake/* %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 %files -n python2-%{name} %{python2_sitearch}/* %else %files -n python-%{name} %{python_sitearch}/* %endif %changelog * Wed Jun 17 2015 Fedora Release Engineering - ok