%global toolchain clang %global _clang_lto_cflags "-flto=thin" %global install_data 1 %if %{install_data} %define G4NDL_version 4.7.1 %define G4EMLOW_version 8.5 %define G4PhotonEvaporation_version 5.7 %define G4RadioactiveDecay_version 5.6 %define G4PARTICLEXS_version 4.0 %define G4PII_version 1.3 %define G4RealSurface_version 2.2 %define G4SAIDDATA_version 2.0 %define G4ABLA_version 3.3 %define G4INCL_version 1.2 %define G4ENSDFSTATE_version 2.3 %endif %global optflags %(echo %{optflags} | sed 's/-O[0-3]/-O3 -DNDEBUG -fno-trapping-math -ftree-vectorize -fno-math-errno/') %global build_ldflags %(echo %{build_ldflags} -fuse-ld=lld -Wl,--build-id=sha1 ) Name: geant4 Version: 11.2.2 Release: 3%{?dist} Summary: Toolkit for the simulation of the passage of particles through matter License: BSD URL: http://geant4.cern.ch/ Source0: https://gitlab.cern.ch/geant4/geant4/-/archive/v11.2.2/geant4-v%{version}.tar.gz %if %{install_data} Source1: https://cern.ch/geant4-data/datasets/G4NDL.%{G4NDL_version}.tar.gz Source2: https://cern.ch/geant4-data/datasets/G4EMLOW.%{G4EMLOW_version}.tar.gz Source3: https://cern.ch/geant4-data/datasets/G4PhotonEvaporation.%{G4PhotonEvaporation_version}.tar.gz Source4: https://cern.ch/geant4-data/datasets/G4RadioactiveDecay.%{G4RadioactiveDecay_version}.tar.gz Source5: https://cern.ch/geant4-data/datasets/G4PARTICLEXS.%{G4PARTICLEXS_version}.tar.gz Source6: https://cern.ch/geant4-data/datasets/G4PII.%{G4PII_version}.tar.gz Source7: https://cern.ch/geant4-data/datasets/G4RealSurface.%{G4RealSurface_version}.tar.gz Source8: https://cern.ch/geant4-data/datasets/G4SAIDDATA.%{G4SAIDDATA_version}.tar.gz Source9: https://cern.ch/geant4-data/datasets/G4ABLA.%{G4ABLA_version}.tar.gz Source10: https://cern.ch/geant4-data/datasets/G4INCL.%{G4INCL_version}.tar.gz Source11: https://cern.ch/geant4-data/datasets/G4ENSDFSTATE.%{G4ENSDFSTATE_version}.tar.gz %endif Patch0: 0001-fix-soversion.patch BuildRequires: motif-devel BuildRequires: libXi-devel BuildRequires: xerces-c-devel BuildRequires: expat-devel BuildRequires: zlib-devel BuildRequires: clang BuildRequires: lld BuildRequires: make BuildRequires: cmake BuildRequires: ninja-build BuildRequires: pkgconfig(Qt53DCore) BuildRequires: pkgconfig(Qt53DExtras) BuildRequires: pkgconfig(Qt53DRender) %description Geant4 is a toolkit for the simulation of the passage of particles through matter. Its areas of application include high energy, nuclear and accelerator physics, as well as studies in medical and space science. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Recommends: xerces-c-devel Recommends: expat-devel Recommends: zlib-devel Recommends: pkgconfig(Qt53DCore) Recommends: cmake Recommends: make %description devel Development files for %{name}. %package examples Summary: Examples files for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description examples Examples files for %{name}. %if %{install_data} %package data Summary: Geant4 datasets Requires: %{name} = %{version}-%{release} BuildArch: noarch %description data Geant4 datasets. %endif %prep %autosetup -p1 -n %{name}-v%{version} %build # by default find data from cvmfs # but when geant4-data is installed, it will use the data from the package %cmake -GNinja \ -DGEANT4_BUILD_MULTITHREADED=ON \ -DGEANT4_INSTALL_DATA=OFF \ -DGEANT4_USE_GDML=ON \ -DGEANT4_USE_G3TOG4=OFF \ -DGEANT4_USE_QT=ON \ -DGEANT4_USE_XM=OFF \ -DGEANT4_USE_INVENTOR=OFF \ -DGEANT4_USE_RAYTRACER_X11=OFF \ -DGEANT4_USE_SYSTEM_CLHEP=OFF \ -DGEANT4_USE_SYSTEM_EXPAT=ON \ -DGEANT4_USE_SYSTEM_ZLIB=ON \ -DGEANT4_USE_SYSTEM_PTL=OFF \ -DGEANT4_INSTALL_DATADIR=/cvmfs/geant4.cern.ch/share/data \ -DCMAKE_CXX_STANDARD=20 \ -DGEANT4_BUILD_TLS_MODEL=auto %cmake_build %install %cmake_install rm -rf %{buildroot}%{_bindir}/geant4.sh %{buildroot}%{_bindir}/geant4.csh %if %{install_data} mkdir -p %{buildroot}%{_sysconfdir}/profile.d cat > %{buildroot}%{_sysconfdir}/profile.d/%{name}-data.sh < %{buildroot}%{_sysconfdir}/profile.d/%{name}-data.csh < - 10.07-2 - add missing config flag * Mon Dec 28 21:53:05 CST 2020 Qiyu Yan - 10.07-1 - Update to 10.7 upstream release * Wed Sep 2 10:43:42 CST 2020 Qiyu Yan - 10.06.p02-6 - rebuilt * Sun Aug 09 2020 Qiyu Yan - 10.06.p02-5 - rebuilt * Mon Jul 20 2020 Qiyu Yan - 10.06.p02-4 - Out-of-Source Build * Mon Jul 20 2020 Qiyu Yan - 10.06.p02-3 - Cleanup builds for old fedora/epel release (they no longer build) * Sun Jul 19 2020 Qiyu Yan - 10.06.p02-2 - Use motif on RHEL > 8 release due to suggestion in issue #1 * Mon Jun 15 2020 Qiyu Yan - 10.06.p02-1 - update to 10.06.p02 upstream * Thu Apr 23 2020 Qiyu Yan - 10.06.p01-4 - Use O3 build * Fri Apr 10 2020 Qiyu Yan - 10.06.p01-3 - rebuilt * Sun Mar 29 2020 Qiyu Yan - 10.06.p01-2 - rebuilt * Sat Mar 14 2020 Qiyu Yan - 10.06-4 - rebuilt * Wed Mar 04 2020 Qiyu Yan - 10.06-3 - rebuilt * Mon Jan 27 2020 Qiyu Yan - 10.06-2 - rebuilt * Thu Oct 17 2019 Qiyu Yan - 10.05.p01-3 - Fix Dep * Thu Oct 17 2019 Qiyu Yan - 10.05.p01 - geant4.10.05.p01 * Wed Jan 6 2016 Alexey Kurov - 10.01.p02-1 - geant4.10.01.p02 * Wed Jan 6 2016 Alexey Kurov - 10.01-1 - Initial RPM release