%define major 0 %define libname openloops %define libnamedev openloops-devel %define libnamedata openloops-data %undefine _debugsource_packages Name: openloops Version: 2.1.1 Release: 7%{?dist} License: GPL Url: http://www.openloops.hepforge.org Source0: http://www.hepforge.org/archive/openloops/OpenLoops-%{version}.tar.gz #Patch0: patch-openloops-0.txt Prefix: %{_prefix} Summary: Automated calculation of one-loop amplitudes BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool BuildRequires: gcc-gfortran %if %{?rhel}%{!?rhel:0} == 7 Requires: python BuildRequires: python python-devel python2-scons %endif %if %{?rhel}%{!?rhel:0} == 8 Requires: python2 BuildRequires: python2 python2-devel python3 python3-devel platform-python-devel python3-scons %endif %if %{?fedora}%{!?fedora:0} >= 31 BuildRequires: python3-devel python3-scons %endif %description The OpenLoops program is a fully automated implementation of the Open Loops algorithm for the fast numerical evaluation of tree and one-loop matrix elements for any Standard Model process. %prep %setup -qn OpenLoops-%{version} %build sed -i 's@.*process_lib_dir.*@process_lib_dir = /usr/'%_lib'/openloops/proclib@g' pyol/config/default.cfg %if %{?rhel}%{!?rhel:0} == 8 scons-3 %else scons %endif %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 pathfix.py -pn -i %{__python2} ./ %endif %install mkdir -p $RPM_BUILD_ROOT/usr/bin mkdir -p $RPM_BUILD_ROOT/usr/%_lib/openloops sed -i 's@.*process_lib_dir.*@process_lib_dir = '$RPM_BUILD_ROOT'/usr/'%_lib'/openloops/proclib@g' pyol/config/default.cfg ./openloops libinstall pptt ppttj eett eettj ppll ppllj tbw ppjj ppjjj ppln pplnj pptt ppttj pplljj pplljjj pphll2 pph2 pphj2 pptln pptw pptwj compile_extra=1; sed -i 's@.*process_lib_dir.*@process_lib_dir = /usr/'%_lib'/openloops/proclib@g' pyol/config/default.cfg cp -r ./openloops $RPM_BUILD_ROOT/usr/bin/openloops cp -r ./lib $RPM_BUILD_ROOT/usr/%_lib/openloops cp -r ./pyol $RPM_BUILD_ROOT/usr/%_lib/openloops %files %doc AUTHORS README COPYING %files -n %{libname} %{_bindir}/%{name} %{_libdir}/* %changelog * Thu May 26 2016 Andrii Verbytskyi 1.3.1 + Initial spec file