%define major 0 %define libname SHERPA-MC %define sharename SHERPA-MC-common %define openmpiname SHERPA-MC-openmpi %define libnamedev SHERPA-MC-devel %define develnamestatic SHERPA-MC-static-devel %global _default_patch_fuzz 5 %define _unpackaged_files_terminate_build 0 # Define a macro for calling ../configure instead of ./configure %global dconfigure %(printf %%s '%configure' | sed 's!\./configure!../configure!g') %global _missing_build_ids_terminate_build 0 Name: SHERPA-MC Version: 2.2.10 Release: 2%{?dist} License: GPLv2 Url: https://sherpa.hepforge.org Source0: https://sherpa.hepforge.org/downloads/%{name}-%{version}.tar.gz #Source0: https://gitlab.com/sherpa-team/sherpa/-/archive/rel-2-2-10/sherpa-rel-2-2-10.tar.gz Patch0: patch-SHERPA-MC-0.txt Summary: Sherpa is a Monte Carlo event generator BuildRequires: gcc-gfortran gcc-c++ root pythia8-devel pythia8 Rivet Rivet-devel hztool BuildRequires: root-core root HepMC3-rootIO-devel HepMC3-devel HepMC3-search HepMC3-search-devel HepMC3-rootIO HepMC3 HepMC HepMC-devel BuildRequires: autoconf automake libtool sqlite-devel sqlite subversion root-physics libzip-devel openmpi-devel BuildRequires: openmpi environment-modules lhapdf-devel fastjet fastjet-devel YODA-devel Rivet-devel zlib zlib-devel Requires: HepMC lhapdf HepMC3-rootIO HepMC3 sqlite root root-core openloops root Rivet YODA pythia8 openmpi fastjet zlib Requires: hztool libgfortran recola qd openssl HepMC3-search BuildRequires: swig recola qd qd-devel openssl-devel openssl Requires: blackhat blackhat-data BuildRequires: blackhat-devel blackhat BuildRequires: texinfo git %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 BuildRequires: python2 python2-devel Requires: python2 Requires: cernlib cernlib-devel cernlib-static BuildRequires: cernlib cernlib-devel cernlib-static #Requires: MCFM #BuildRequires: MCFM %else BuildRequires: python python-devel Requires: python Requires: cernlib cernlib-devel cernlib-static BuildRequires: cernlib cernlib-devel cernlib-static #Requires: MCFM #BuildRequires: MCFM %endif Prefix: %{_prefix} %description Sherpa is a Monte Carlo event generator for the Simulation of High-Energy Reactions of PArticles in lepton-lepton, lepton-photon, photon-photon, lepton-hadron and hadron-hadron collisions. Simulation programs - also dubbed event generators - like Sherpa are indispensable work horses for current particle physics phenomenology and are (at) the interface between theory and experiment. %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. %package common Summary: Libraries and headers for %{name} Provides: %{name}-common = %{version}-%{release} %description common Contains the common files and header files needed to develop programs which make use of %{name}. The library documentation is available on header files. %package openmpi Summary: Libraries and headers for %{name} Provides: %{name}-openmpi = %{version}-%{release} %description openmpi Contains the common files and header files needed to develop programs which make use of %{name}. The library documentation is available on header files. %package openmpi-devel Summary: Libraries and headers for %{name} Provides: %{name}-openmpi-devel = %{version}-%{release} %description openmpi-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. %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} %package -n python2-%{name}-openmpi Summary: %{name} Python 2 bindings %description -n python2-%{name}-openmpi This package provides the Python 2 bindings for %{name}-openmpi %{!?_openmpi_load: %define _openmpi_load() \ . /etc/profile.d/modules.sh; \ module load mpi/openmpi-%{_arch}; \ export CFLAGS="$CFLAGS %{optflags}"; \ } %{!?_openmpi_unload: %define _openmpi_unload() \ . /etc/profile.d/modules.sh; \ module unload mpi/openmpi-%{_arch}; \ } %prep %setup #%setup -q -n sherpa-rel-2-2-10 #%setup -T -D -a 1 -n sherpa-rel-2-2-9 #%patch0 -p0 %build sed -i '/^.*sysctl.*/d' ATOOLS/Org/Run_Parameter.C #autoreconf --force --install --verbose . #automake -a --copy --force # Build serial version, dummy arguments %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 mkdir serial; \ cd serial; \ export CXXFLAGS=$CXXFLAGS" -I"$(pwd)"/../ "; export LDFLAGS=$LDFLAGS" -L/usr/%_lib/root ";\ ../configure --enable-rivet=/usr --enable-cernlib=/usr/%_lib/cernlib/2006 --enable-blackhat=$(blackhat-config --prefix) --enable-pyext --enable-gzip --enable-recola=/usr --enable-hztool=/usr --enable-hepevtsize=4000 --enable-hepmc3=/usr --enable-hepmc3root --prefix=%{_prefix} --libdir=%{_libdir} --enable-fastjet=/usr --enable-analysis --enable-openloops=/usr/%_lib/openloops --enable-hepmc2=/usr --enable-root --enable-binreloc --enable-pythia --enable-lhole --enable-lhapdf=/usr;\ make -C Manual ;\ make %{?_smp_mflags} ; \ cd .. %else mkdir serial; \ cd serial; \ export CXXFLAGS=$CXXFLAGS" --std=c++11 -I"$(pwd)"/../ "; export LDFLAGS=$LDFLAGS" -L/usr/%_lib/root ";\ ../configure --enable-rivet=/usr --enable-cernlib=/usr/%_lib/cernlib/2006 --enable-blackhat=$(blackhat-config --prefix) --enable-pyext --enable-gzip --enable-recola=/usr --enable-hztool=/usr --enable-hepevtsize=4000 --enable-hepmc3=/usr --enable-hepmc3root --prefix=%{_prefix} --libdir=%{_libdir} --enable-fastjet=/usr --enable-analysis --enable-openloops=/usr/%_lib/openloops --enable-hepmc2=/usr --enable-root --enable-binreloc --enable-pythia --enable-lhole --enable-lhapdf=/usr;\ make -C Manual ;\ make %{?_smp_mflags} ; \ cd .. %endif export CC=mpicc export CXX=mpicxx export FC=mpif90 export F77=mpif77 # Build OpenMPI version %{_openmpi_load} %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 mkdir $MPI_COMPILER; \ cd $MPI_COMPILER; \ export CXXFLAGS=$CXXFLAGS" -I"$(pwd)"/../ "; export LDFLAGS=$LDFLAGS" -L/usr/%_lib/root ";\ ../configure --enable-rivet=/usr --enable-cernlib=/usr/%_lib/cernlib/2006 --enable-blackhat=$(blackhat-config --prefix) --enable-pyext --enable-gzip --enable-hztool=/usr --enable-hepevtsize=4000 --enable-hepmc3=/usr --enable-hepmc3root --prefix=$MPI_HOME --libdir=$MPI_HOME/%_lib --datadir=%{_datadir} --mandir=%{_mandir} --infodir=%{_infodir} \ --program-suffix=$MPI_SUFFIX --enable-mpi --enable-recola=/usr --enable-fastjet=/usr --enable-analysis --enable-openloops=/usr/%_lib/openloops --enable-hepmc2=/usr --enable-root --enable-binreloc --enable-pythia --enable-lhole --enable-lhapdf=/usr;\ make -C Manual ;\ make %{?_smp_mflags} ; \ cd .. %else mkdir $MPI_COMPILER; \ cd $MPI_COMPILER; \ export CXXFLAGS=$CXXFLAGS" --std=c++11 -I"$(pwd)"/../ "; export LDFLAGS=$LDFLAGS" -L/usr/%_lib/root ";\ ../configure --enable-rivet=/usr --enable-cernlib=/usr/%_lib/cernlib/2006 --enable-blackhat=$(blackhat-config --prefix) --enable-pyext --enable-gzip --enable-hztool=/usr --enable-hepevtsize=4000 --enable-hepmc3=/usr --enable-hepmc3root --prefix=$MPI_HOME --libdir=$MPI_HOME/%_lib --datadir=%{_datadir} --mandir=%{_mandir} --infodir=%{_infodir} \ --program-suffix=$MPI_SUFFIX --enable-mpi --enable-recola=/usr --enable-fastjet=/usr --enable-analysis --enable-openloops=/usr/%_lib/openloops --enable-hepmc2=/usr --enable-root --enable-binreloc --enable-pythia --enable-lhole --enable-lhapdf=/usr;\ make -C Manual ;\ make %{?_smp_mflags} ; \ cd .. %endif %{_openmpi_unload} # %install # Install serial version make -C serial install DESTDIR=%{buildroot} INSTALL="install -p" CPPROG="cp -p" mkdir -p %{buildroot}/usr/%{_lib}/python%{python2_version}/ mv %{buildroot}/usr/lib/python%{python2_version}/site-packages %{buildroot}/%{python2_sitearch} # Install OpenMPI version %{_openmpi_load} make -C $MPI_COMPILER install DESTDIR=%{buildroot} INSTALL="install -p" CPPROG="cp -p" %{_openmpi_unload} rm -rf $RPM_BUILD_ROOT/usr/share/info/dir %files -n %{libname} %doc AUTHORS README COPYING /usr/%_lib/SHERPA-MC/*.so* /usr/%_lib/SHERPA-MC/*a /usr/bin/* %files -n python2-%{name} %{python2_sitearch}/Sherpa.py %{python2_sitearch}/Sherpa.pyc %{python2_sitearch}/Sherpa.pyo %{python2_sitearch}/_Sherpa.la %{python2_sitearch}/_Sherpa.so %{python2_sitearch}/_Sherpa.so.0 %{python2_sitearch}/_Sherpa.so.0.0.0 %files -n python2-%{name}-openmpi /usr/%_lib/openmpi/lib/python%{python2_version}/site-packages/Sherpa.py /usr/%_lib/openmpi/lib/python%{python2_version}/site-packages/Sherpa.pyc /usr/%_lib/openmpi/lib/python%{python2_version}/site-packages/Sherpa.pyo /usr/%_lib/openmpi/lib/python%{python2_version}/site-packages/_Sherpa.la /usr/%_lib/openmpi/lib/python%{python2_version}/site-packages/_Sherpa.so /usr/%_lib/openmpi/lib/python%{python2_version}/site-packages/_Sherpa.so.0 /usr/%_lib/openmpi/lib/python%{python2_version}/site-packages/_Sherpa.so.0.0.0 %files -n %{sharename} /usr/share/SHERPA-MC/* /usr/share/man/man1 /usr/share/man/man1/* /usr/share/doc/* /usr/share/info/Sherpa.info.gz /usr/share/info/Sherpa.info-1.gz /usr/share/info/Sherpa.info-2.gz %files -n %{libnamedev} /usr/include/SHERPA-MC/* %files -n %{openmpiname} /usr/%_lib/openmpi/%_lib/SHERPA-MC/*.so* /usr/%_lib/openmpi/%_lib/SHERPA-MC/*a /usr/%_lib/openmpi/bin/* %files -n %{openmpiname}-devel /usr/%_lib/openmpi/include/SHERPA-MC/* %changelog * Thu Nov 23 2017 Andrii Verbytskyi andrii.verbytskyi@mpp.mpg.de + Recola * Thu May 26 2016 Andrii Verbytskyi 2.2.0 + Initial spec file