%define major 0 %define libname Professor %define libnamedev Professor-devel %global _python_bytecompile_errors_terminate_build 0 Name: Professor Version: 2.3.2 Release: 1%{?dist} License: Unknown Url: http://professor.hepforge.org/ Source0: http://www.hepforge.org/archive/professor/%{name}-%{version}.tar.gz Prefix: %{_prefix} Summary: Professor is a tuning tool for Monte Carlo event generators Requires: YODA BuildRequires: YODA-devel eigen3-devel gcc-c++ %if %{?rhel}%{!?rhel:0} == 7 Requires: numpy python BuildRequires: python python-devel Cython %endif %if %{?rhel}%{!?rhel:0} == 8 Requires: python2 python2-numpy BuildRequires: python2-numpy python2-devel platform-python-devel python2-Cython %endif %if %{?fedora}%{!?fedora:0} > 0 %if %{?fedora}%{!?fedora:0} < 31 BuildRequires: python2-Cython python3-Cython %endif %endif %if %{?fedora}%{!?fedora:0} >= 31 BuildRequires: python3-devel Cython %endif %description Professor is a tuning tool for Monte Carlo event generators, based on the ideas described in "Tuning and Test of Fragmentation Models Based on Identified Particles and Precision Event Shape Data" (Z. Phys., C73 (1996) 11-60). %prep %setup -q %build %if %{?rhel}%{!?rhel:0} >= 8 export PYTHON=/usr/bin/python2 sed -i 's@python@python2@1' Makefile pathfix.py -pn -i %{__python2} ./ pathfix.py -pn -i %{__python2} ./bin/prof* pathfix.py -pn -i %{__python2} ./contrib/prof* %endif %if %{?fedora}%{!?fedora:0} >= 31 export PYTHON=/usr/bin/python3 sed -i 's@python@python3@1' Makefile pathfix.py -pn -i %{__python3} ./ pathfix.py -pn -i %{__python3} ./bin/prof* pathfix.py -pn -i %{__python3} ./contrib/prof* %endif make CXXFLAGS='-O0 ' CPPFLAGS=-I/usr/include/eigen3 %install %make_install PREFIX=$RPM_BUILD_ROOT/usr rm -rf $RPM_BUILD_ROOT/usr/jupyter/* %files -n %{libname} /usr/bin/* /usr/lib/* /usr/lib64/* /usr/contrib/* /usr/include/Professor/* %changelog * Fri Jan 20 2012 Andrii Verbytskyi 1.4.0 + imported package Professor