Name: clhep Version: 2.4.7.1 Release: %autorelease Summary: C++ Class Library for High Energy Physics License: GPL-3.0-only OR LGPL-3.0-only URL: https://proj-clhep.web.cern.ch/proj-clhep %global tag %(echo %{version} | tr '.' '_') Source: https://gitlab.cern.ch/CLHEP/CLHEP/-/archive/CLHEP_%{tag}/CLHEP-CLHEP_%{tag}.tar.bz2 # Don't build or install static libs if BUILD_STATIC_LIBS is OFF Patch0: clhep-fix-build-static-lib.patch BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: ninja-build %description The CLHEP project was proposed by Leif Lönnblad at CHEP 92. It is intended to be a set of HEP-specific foundation and utility classes such as random generators, physics vectors, geometry and linear algebra. CLHEP is structured in a set of packages independent of any external package (interdependencies within CLHEP are allowed under certain conditions). %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel This package contains development files for %{name}. %prep %autosetup -p1 -n CLHEP-CLHEP_%{tag} # fix install path of CMake files sed -i 's|lib${LIB_SUFFIX}/CLHEP-${VERSION}|lib${LIB_SUFFIX}/cmake/CLHEP|' cmake/Modules/ClhepToolchain.cmake # properly set the soversion sed -i 's|OUTPUT_NAME CLHEP-${package}-${VERSION}|OUTPUT_NAME CLHEP-${package} VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}|' \ cmake/Modules/ClhepBuildLibrary.cmake sed -i 's|OUTPUT_NAME CLHEP-${VERSION}|VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}|' \ cmake/Modules/ClhepBuildLibrary.cmake # use Fedora build flags sed -i 's|-O||' cmake/Modules/ClhepVariables.cmake # remove the check for out-of-source build sed -i '/clhep_ensure_out_of_source_build/d' CMakeLists.txt sed -i "/_clhep_lib_suffix_64()/d" cmake/Modules/ClhepVariables.cmake %build %cmake \ -GNinja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCPR_USE_SYSTEM_CURL=ON \ %cmake_build %install %cmake_install %check %ifarch i686 %ctest -E testThreaded %else %ctest %endif %files %license COPYING COPYING.LESSER %doc ChangeLog README.md %{_libdir}/libCLHEP*.so.2* %files devel %{_bindir}/*-config %{_includedir}/CLHEP/ %{_includedir}/clhep.modulemap %{_libdir}/libCLHEP*.so %{_libdir}/cmake/CLHEP/ %{_libdir}/pkgconfig/clhep*.pc %changelog %autochangelog