%if %{?fedora}%{!?fedora:0} >= 29 || %{?rhel}%{!?rhel:0} >= 8 %global py3default 1 %else %global py3default 0 %endif Name: fastjet Version: 3.3.4 Release: 2%{?dist} License: GPLv2+ Url: http://www.fastjet.fr Source0: http://www.fastjet.fr/repo/%{name}-%{version}.tar.gz Prefix: %{_prefix} Summary: Fast implementation of several recombination jet algorithms BuildRequires: gcc-gfortran gcc-c++ %if ! %{py3default} BuildRequires: python2-devel %endif %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 BuildRequires: python3-devel %endif %if %{?rhel}%{!?rhel:0} == 8 BuildRequires: python36-rpm-macros %endif %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_other_pkgversion}-devel %endif %description A software package for jet finding in pp and e+e- collisions. It includes fast native implementations of many sequential recombination clustering algorithms, plugins for access to a range of cone jet finders and tools for advanced jet manipulation. %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 ! %{py3default} %package -n python2-%{name} Summary: python bindings for %{name} - Python 2 module %{?python_provide:%python_provide python2-%{name}} Requires: %{name}%{?_isa} = %{version}-%{release} %description -n python2-%{name} This package contains python bindings for %{name}. %endif %package -n python%{python3_pkgversion}-%{name} Summary: python bindings for %{name} - Python 3 module %{?python_provide:%python_provide python%{python3_pkgversion}-%{name}} Requires: %{name}%{?_isa} = %{version}-%{release} %description -n python%{python3_pkgversion}-%{name} This package contains python bindings for %{name}. %if %{?rhel}%{!?rhel:0} == 7 %package -n python%{python3_other_pkgversion}-%{name} Summary: python bindings for %{name} - Python 3 module %{?python_provide:%python_provide python%{python3_other_pkgversion}-%{name}} Requires: %{name}%{?_isa} = %{version}-%{release} %description -n python%{python3_other_pkgversion}-%{name} This package contains python bindings for %{name}. %endif %prep %setup -q %build %if %{py3default} export PYTHON=%{__python3} %else export PYTHON=%{__python2} %endif %configure --enable-allplugins --enable-pyext #--enable-cgal=yes --with-cgaldir=/usr %make_build %install %if %{py3default} %make_install pythondir=%{python3_sitearch} rm -f %{buildroot}%{python3_sitearch}/*.a rm -f %{buildroot}%{python3_sitearch}/*.la %else %make_install pythondir=%{python2_sitearch} rm -f %{buildroot}%{python2_sitearch}/*.a rm -f %{buildroot}%{python2_sitearch}/*.la %endif rm %{buildroot}%{_libdir}/*.a rm %{buildroot}%{_libdir}/*.la %if ! %{py3default} ( export PYTHON=%{__python3} %configure --enable-allplugins --enable-pyext cd pyinterface make clean make PYTHON=%{__python3} pythondir=%{python3_sitearch} %make_install PYTHON=%{__python3} pythondir=%{python3_sitearch} rm -f %{buildroot}%{python3_sitearch}/*.a rm -f %{buildroot}%{python3_sitearch}/*.la ) %endif %if %{?rhel}%{!?rhel:0} == 7 ( export PYTHON=%{__python3_other} %configure --enable-allplugins --enable-pyext cd pyinterface make clean make PYTHON=%{__python3_other} pythondir=%{python3_sitearch} %make_install PYTHON=%{__python3_other} pythondir=%{python3_other_sitearch} rm -f %{buildroot}%{python3_other_sitearch}/*.a rm -f %{buildroot}%{python3_other_sitearch}/*.la ) %endif %files -n fastjet %doc AUTHORS README COPYING %{_bindir}/%{name}-config %{_libdir}/libfastjet.so %{_libdir}/libfastjet.so.0 %{_libdir}/libfastjet.so.0.0.0 %{_libdir}/libfastjetplugins.so* %{_libdir}/libfastjettools.so* %{_libdir}/libsiscone.so* %{_libdir}/libsiscone_spherical.so* %files -n fastjet-devel %{_libdir}/libfastjet.so %{_libdir}/libfastjettools.so %{_libdir}/libsiscone.so %{_libdir}/libsiscone_spherical.so %{_libdir}/libfastjetplugins.so %{_includedir}/siscone/*.h %{_includedir}/siscone/spherical/*.h %{_includedir}/fastjet/*.h %{_includedir}/fastjet/*.hh %{_includedir}/fastjet/tools/*.hh %{_includedir}/fastjet/internal/*.hh %if ! %{py3default} %files -n python2-%{name} %{python2_sitearch}/_%{name}*.so* %{python2_sitearch}/*.p* %endif %files -n python%{python3_pkgversion}-%{name} %{python3_sitearch}/_%{name}*.so* %{python3_sitearch}/*.p* %{python3_sitearch}/__pycache__/* %if %{?rhel}%{!?rhel:0} == 7 %files -n python%{python3_other_pkgversion}-%{name} %{python3_other_sitearch}/*.p* %{python3_other_sitearch}/_%{name}*.so* %{python3_other_sitearch}/__pycache__/* %endif %changelog * Mon Mar 2 2020 Andrii Verbytskyi 3.3.3-1 - Initial version for EPEL