%define major 0 %define libname gosam %define libnamedev gosam-devel %define develnamestatic gosam-static-devel %define __os_install_post %{nil} %undefine _debugsource_packages Name: gosam Version: 2.0.4 Release: 2%{?dist} License: GPLv3 Url: https://gosam.hepforge.org/ Source0: http://www.hepforge.org/archive/gosam/gosam-2.0.4-6d9f1cba.tar.gz Patch0: patch-gosam-0.txt Summary: Automated calculation of one-loop amplitudes Requires: gosam-contrib form qgraf BuildRequires: autoconf automake libtool gcc-gfortran Prefix: %{_prefix} %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 Requires: python2 BuildRequires: python2 python2-devel %else Requires: python BuildRequires: python python-devel %endif %description The package GoSam allows for the automated calculation of one-loop amplitudes for multi-particle processes in renormalizable quantum field theories. The amplitudes, which are generated in terms of Feynman diagrams, can be reduced using either D-dimensionalintegrand-level decomposition or by tensor reduction. GoSam can be used to calculate one-loop QCD and/or electroweak corrections to Standard Model processes and offers the flexibility to link model files for theories Beyond the Standard Model. A standard interface (BLHA1, BLHA2) to programs calculating real radiation is also implemented. %prep %autosetup -n %{name} #patch0 -p0 %build %install %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 sed -i 's@\t@ @g' ./setup.py sed -i 's@print@#print@g' ./setup.py python2 ./setup.py install --no-compile --prefix=%{buildroot}/%_prefix %else python ./setup.py install --no-compile --prefix=%{buildroot}/%_prefix %endif sed -i "s|${RPM_BUILD_ROOT}||g" $RPM_BUILD_ROOT/%_bindir/gosam.py sed -i "s|${RPM_BUILD_ROOT}||g" $RPM_BUILD_ROOT/%_bindir/gosam-config.py %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 sed -i "s|${RPM_BUILD_ROOT}||g" $RPM_BUILD_ROOT/usr/lib/python2.*/site-packages/golem/*.py* sed -i "s|${RPM_BUILD_ROOT}||g" $RPM_BUILD_ROOT/usr/lib/python2.*/site-packages/golem/util/*.py* %else sed -i "s|${RPM_BUILD_ROOT}||g" $RPM_BUILD_ROOT/usr/lib/python2.*/site-packages/golem/*.py* sed -i "s|${RPM_BUILD_ROOT}||g" $RPM_BUILD_ROOT/usr/lib/python2.*/site-packages/golem/util/*.py* %endif %files -n %{libname} %_bindir/gosam.py %_bindir/gosam-config.py %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 %{python2_sitelib}/golem/ %{python2_sitelib}/gosam* %else %{python2_sitelib}/golem/ %{python2_sitelib}/gosam* %endif %{_datadir}/golem/ %changelog * Thu May 26 2016 Andrii Verbytskyi 2.0.3 + Initial spec file