diff --git a/libzip.spec b/libzip.spec new file mode 100644 index 00000000000..8488a658fb3 --- /dev/null +++ b/libzip.spec @@ -0,0 +1,25 @@ +### RPM external libzip 1.11.4 +Source: https://github.com/nih-at/libzip/releases/download/v%{realversion}/libzip-%{realversion}.tar.gz +BuildRequires: cmake +Requires: zlib zstd +Requires: bz2lib + +%prep +%setup -n %{n}-%{realversion} + +%build +cmake \ + -S %{_builddir}/%{n}-%{realversion} \ + -B %{_builddir}/build \ + -DCMAKE_INSTALL_PREFIX=%{i} \ + -DCMAKE_PREFIX_PATH=%{cmake_prefix_path} \ + -DENABLE_COMMONCRYPTO=OFF \ + -DENABLE_GNUTLS=OFF \ + -DENABLE_MBEDTLS=OFF \ + -DENABLE_WINDOWS_CRYPTO=OFF \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_DOC=OFF + +make -C %{_builddir}/build %{makeprocesses} +%install +make -C %{_builddir}/build %{makeprocesses} install \ No newline at end of file diff --git a/openloops.spec b/openloops.spec index 1f80d7fa310..6e40b199d10 100644 --- a/openloops.spec +++ b/openloops.spec @@ -50,7 +50,9 @@ done ./openloops libinstall openloops-user.coll %install -mkdir %i/{lib,proclib} +mkdir %i/{lib,proclib,include} cp lib/*.so %i/lib cp proclib/*.so %i/proclib cp proclib/*.info %i/proclib +cp proclib/*.rinfo %i/proclib +cp include/* %i/include diff --git a/scram-tools.file/tools/libzip/libzip.xml b/scram-tools.file/tools/libzip/libzip.xml new file mode 100644 index 00000000000..52ba4ea0c7f --- /dev/null +++ b/scram-tools.file/tools/libzip/libzip.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/scram-tools.file/tools/openloops/openloops.xml b/scram-tools.file/tools/openloops/openloops.xml index 47833975599..9806bad297e 100644 --- a/scram-tools.file/tools/openloops/openloops.xml +++ b/scram-tools.file/tools/openloops/openloops.xml @@ -1,6 +1,7 @@ + diff --git a/scram-tools.file/tools/sherpa3/sherpa3.xml b/scram-tools.file/tools/sherpa3/sherpa3.xml new file mode 100644 index 00000000000..525ea58514d --- /dev/null +++ b/scram-tools.file/tools/sherpa3/sherpa3.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sherpa-versioning.patch b/sherpa-versioning.patch new file mode 100644 index 00000000000..b083f1ced84 --- /dev/null +++ b/sherpa-versioning.patch @@ -0,0 +1,31 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -110,7 +110,7 @@ message(STATUS "SHERPA: CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}") + endif() + message(STATUS "SHERPA: CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}") + if (SHERPA_ENABLE_VERSIONING) +- set (VERSIONING "-${EXTERNAL_VERSION_STRING}") ++ set (VERSIONING "${SHERPA_VERSION_MAJOR}") + else() + set (VERSIONING "") + endif() +@@ -966,7 +966,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Examples/V_plus_Jets/LHC_WJets/CMake + if (SHERPA_ENABLE_UFO) + SET(SHERPA_CMAKE_CONFIG_DIR ${CMAKE_INSTALL_PREFIX}/share/SHERPA-MC/) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/MODEL/UFO/src/ufo_interface/parser.py.in ${CMAKE_CURRENT_BINARY_DIR}/MODEL/UFO/src/ufo_interface/parser.py @ONLY) +-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/MODEL/UFO/bin/Sherpa-generate-model.in ${CMAKE_CURRENT_BINARY_DIR}/MODEL/UFO/bin/Sherpa-generate-model @ONLY) ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/MODEL/UFO/bin/Sherpa-generate-model.in ${CMAKE_CURRENT_BINARY_DIR}/MODEL/UFO/bin/Sherpa${VERSIONING}-generate-model @ONLY) + if (NOT SHERPA_ENABLE_PYTHON AND SHERPA_ENABLE_TESTING) + message(FATAL_ERROR "SHERPA: UFO model generation tests requires Python Addons!") + endif() +--- a/MODEL/UFO/CMakeLists.txt ++++ b/MODEL/UFO/CMakeLists.txt +@@ -17,7 +17,7 @@ file(COPY src/ufo_interface DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/src/) + file(COPY src/opt_einsum/opt_einsum DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/src/) + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/src/ + DESTINATION ${SHERPA_Python_SITEARCH}/) +-install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/bin/Sherpa-generate-model ++install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/bin/Sherpa${VERSIONING}-generate-model + DESTINATION ${CMAKE_INSTALL_BINDIR}) + + if(SHERPA_ENABLE_TESTING) diff --git a/sherpa.spec b/sherpa.spec index 293f2d15b3b..a3b3bcfe986 100644 --- a/sherpa.spec +++ b/sherpa.spec @@ -1,5 +1,5 @@ ### RPM external sherpa 2.2.16 -Source: git+https://gitlab.com/sherpa-team/sherpa.git?obj=master/v%{realversion}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz +Source: git+https://gitlab.com/sherpa-team/sherpa.git?obj=master/v%{realversion}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz Requires: hepmc lhapdf blackhat sqlite python3 fastjet openmpi hepmc3 BuildRequires: mcfm swig autotools Patch0: sherpa-2.2.16-hepmcshort diff --git a/sherpa3.spec b/sherpa3.spec new file mode 100644 index 00000000000..426d43a97e1 --- /dev/null +++ b/sherpa3.spec @@ -0,0 +1,48 @@ +### RPM external sherpa3 3.0.4 +Source: git+https://gitlab.com/sherpa-team/sherpa.git?obj=master/v%{realversion}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz +Requires: hepmc3 lhapdf blackhat fastjet openmpi rivet pythia8 libzip +BuildRequires: cmake swig + +Patch0: sherpa-versioning + +%{!?without_openloops:Requires: openloops} + +%prep +%setup -q -n %{n}-%{realversion} +%patch0 -p1 + +%build +rm -rf build && mkdir build + +cmake -S . -B build \ + -DCMAKE_INSTALL_PREFIX=%i \ + -DSHERPA_ENABLE_VERSIONING=ON \ + -DEXTERNAL_VERSION_STRING=3 \ + -DSHERPA_ENABLE_MPI=ON -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_Fortran_COMPILER=mpifort \ + -DSHERPA_ENABLE_ANALYSIS=ON \ + -DSHERPA_ENABLE_EXAMPLES=ON \ + -DSHERPA_ENABLE_LIBZIP=ON -DLibZip_DIR=$LIBZIP_ROOT \ + -DSHERPA_ENABLE_GZIP=ON \ + -DSHERPA_ENABLE_HEPMC3=ON -DHEPMC3_DIR=$HEPMC3_ROOT -DSHERPA_ENABLE_HEPMC3_ROOT=OFF \ + -DSHERPA_ENABLE_LHAPDF=ON -DLHAPDF_DIR=$LHAPDF_ROOT -DSHERPA_ENABLE_INTERNAL_PDFS=OFF \ + -DSHERPA_ENABLE_BLACKHAT=ON -DBLACKHAT_DIR=$BLACKHAT_ROOT \ + ${OPENLOOPS_ROOT+-DSHERPA_ENABLE_OPENLOOPS=ON -DOPENLOOPS_DIR=$OPENLOOPS_ROOT} \ + -DSHERPA_ENABLE_ROOT=OFF \ + -DSHERPA_ENABLE_PYTHIA8=ON -DPYHIA8_DIR=$PYTHIA8_ROOT \ + -DSHERPA_ENABLE_RECOLA=OFF \ + -DSHERPA_ENABLE_RIVET=ON -DRIVET_DIR=$RIVET_ROOT \ + -DSHERPA_ENABLE_EWSUD=ON \ + -DSHERPA_ENABLE_PYTHON=ON \ + -DSHERPA_ENABLE_UFO=ON \ + -DSHERPA_ENABLE_THREADING=ON \ + -DSHERPA_ENABLE_DIHIGGS=OFF \ + -DSHERPA_ENABLE_MADLOOP=OFF \ + -DSHERPA_ENABLE_MCFM=OFF \ + -DSHERPA_ENABLE_TESTING=OFF \ + -DSHERPA_ENABLE_INTEGRATION_TESTS=OFF \ + -DSHERPA_ENABLE_BINRELOC=OFF +cmake --build build %{makeprocesses} + +%install +cmake --install build +sed -i -e 's|^#!/.*|#!/usr/bin/env python3|' %{i}/bin/Sherpa3-generate-model