Warning, /geant4/packaging/rpm/geant4.spec is written in an unsupported language. File is not indexed.
0001 %global geant4_version 11.3.0
0002
0003 %global NEUTRONHPDATA G4NDL.4.7.1
0004 %global LEDATA G4EMLOW.8.6
0005 %global LEVELGAMMADATA G4PhotonEvaporation.5.7
0006 %global RADIOACTIVEDATA G4RadioactiveDecay.5.6
0007 %global PARTICLEXSDATA G4PARTICLEXS.4.1
0008 %global PIIDATA G4PII.1.3
0009 %global REALSURFACEDATA G4RealSurface.2.2
0010 %global SAIDXSDATA G4SAIDDATA.2.0
0011 %global ABLADATA G4ABLA.3.3
0012 %global INCLDATA G4INCL.1.2
0013 %global ENSDFSTATEDATA G4ENSDFSTATE.2.3
0014 %global TENDLDATA G4TENDL.1.4
0015 %global NUDEXLIBDATA G4NUDEXLIB.1.0
0016 %global URRPTDATA G4URRPT.1.0
0017
0018 Name: geant4
0019 Version: %{geant4_version}
0020 Release: 1%{?dist}
0021 Summary: Toolkit for the simulation of the passage of particles through matter.
0022 License: Geant4
0023 URL: https://geant4.web.cern.ch
0024 Source0: https://geant4-data.web.cern.ch/releases/%{name}-v%{version}.tar.gz
0025 Source1: https://geant4-data.web.cern.ch/datasets/%{NEUTRONHPDATA}.tar.gz
0026 Source2: https://geant4-data.web.cern.ch/datasets/%{LEDATA}.tar.gz
0027 Source3: https://geant4-data.web.cern.ch/datasets/%{LEVELGAMMADATA}.tar.gz
0028 Source4: https://geant4-data.web.cern.ch/datasets/%{RADIOACTIVEDATA}.tar.gz
0029 Source5: https://geant4-data.web.cern.ch/datasets/%{PARTICLEXSDATA}.tar.gz
0030 Source6: https://geant4-data.web.cern.ch/datasets/%{PIIDATA}.tar.gz
0031 Source7: https://geant4-data.web.cern.ch/datasets/%{REALSURFACEDATA}.tar.gz
0032 Source8: https://geant4-data.web.cern.ch/datasets/%{SAIDXSDATA}.tar.gz
0033 Source9: https://geant4-data.web.cern.ch/datasets/%{ABLADATA}.tar.gz
0034 Source10: https://geant4-data.web.cern.ch/datasets/%{INCLDATA}.tar.gz
0035 Source11: https://geant4-data.web.cern.ch/datasets/%{ENSDFSTATEDATA}.tar.gz
0036 Source12: https://geant4-data.web.cern.ch/datasets/%{TENDLDATA}.tar.gz
0037 Source13: https://geant4-data.web.cern.ch/datasets/%{NUDEXLIBDATA}.tar.gz
0038 Source14: https://geant4-data.web.cern.ch/datasets/%{URRPTDATA}.tar.gz
0039
0040 %undefine __cmake_in_source_build
0041 %undefine __cmake3_in_source_build
0042
0043 %bcond_with vtk
0044 %bcond_without examples
0045 %bcond_without qt5
0046 %bcond_without threads
0047 %bcond_without trajectories
0048
0049 %if %{?rhel}%{!?rhel:9} >= 9
0050 %bcond_without tbb
0051 %bcond hdf5 %{without threads}
0052 %bcond inventor %[%{?fedora:1}%{!?fedora:0}]
0053 %endif
0054
0055 %if %{?rhel}%{!?rhel:0} == 7
0056 BuildRequires: cmake3 >= 3.16
0057 BuildRequires: devtoolset-7-toolchain
0058 %else
0059 BuildRequires: cmake >= 3.16
0060 BuildRequires: gcc-c++
0061 %endif
0062
0063 BuildRequires: make
0064 BuildRequires: expat-devel
0065 BuildRequires: freetype-devel
0066 BuildRequires: motif-devel
0067 BuildRequires: xerces-c-devel
0068 BuildRequires: zlib-devel
0069
0070 %if %{with hdf5}
0071 BuildRequires: hdf5-devel
0072 %endif
0073
0074 %if %{with inventor}
0075 BuildRequires: SoQt-devel
0076 %endif
0077
0078 %if %{with qt5}
0079 BuildRequires: qt5-qt3d-devel
0080 BuildRequires: qt5-qtbase-devel
0081 %endif
0082
0083 %if %{with tbb}
0084 BuildRequires: tbb-devel
0085 %endif
0086
0087 %if %{with vtk}
0088 BuildRequires: vtk-devel
0089 BuildRequires: java-latest-openjdk-devel
0090 %endif
0091
0092 Requires: %{name}-data = %{version}-%{release}
0093 Requires: %{name}-libs%{?_isa} = %{version}-%{release}
0094
0095 %description
0096 Geant simulates the passage of subatomic particles through matter,
0097 for instance, particle detectors. Geant 3 simulations are performed
0098 by linking Fortran code supplied by the user with the Geant libraries,
0099 then running the resulting executable. This package includes gxint,
0100 the script used to perform this linking step. Geant 4 is a complete
0101 rewrite in C++ with addition of other modern features and detectors.
0102
0103 %package libs
0104 Summary: Geant4 libraries
0105
0106 %description libs
0107 This package contains Geant4 libraries used by simulation applications.
0108
0109 %package devel
0110 Summary: Development files for Geant4 (CMake modules and header files)
0111 Provides: %{name}-libs-devel = %{version}-%{release}
0112 Provides: %{name}-libs-devel%{?_isa} = %{version}-%{release}
0113 Obsoletes: %{name}-libs-devel < %{version}-%{release}
0114 Requires: %{name}-libs%{?_isa} = %{version}-%{release}
0115
0116 %if %{?rhel}%{!?rhel:0} == 7
0117 Requires: cmake3 >= 3.16
0118 Requires: devtoolset-7-toolchain
0119 %else
0120 Requires: cmake >= 3.16
0121 Requires: gcc-c++
0122 %endif
0123
0124 Requires: make
0125 Requires: expat-devel
0126 Requires: freetype-devel
0127 Requires: motif-devel
0128 Requires: xerces-c-devel
0129 Requires: zlib-devel
0130
0131 %if %{with hdf5}
0132 Requires: hdf5-devel
0133 %endif
0134
0135 %if %{with inventor}
0136 Requires: SoQt-devel
0137 %endif
0138
0139 %if %{with qt5}
0140 Requires: qt5-qt3d-devel
0141 Requires: qt5-qtbase-devel
0142 %endif
0143
0144 %if %{with tbb}
0145 Requires: tbb-devel
0146 %endif
0147
0148 %if %{with vtk}
0149 Requires: vtk-devel
0150 Requires: java-latest-openjdk-devel
0151 %endif
0152
0153 %description devel
0154 Geant4 development components such as CMake modules and header files.
0155
0156 %package data
0157 BuildArch: noarch
0158 Summary: Geant4 data files required for physics models
0159
0160 %description data
0161 Geant4 data files required for physics models
0162
0163 %if %{with examples}
0164 %package examples
0165 BuildArch: noarch
0166 Summary: Geant4 user examples
0167
0168 %description examples
0169 Geant4 user examples
0170 %endif
0171
0172 %prep
0173 %setup -q -n %{name}-v%{version}
0174
0175 %build
0176 %if %{?rhel}%{!?rhel:0} == 7
0177 . /opt/rh/devtoolset-7/enable
0178 %endif
0179
0180 %cmake3 \
0181 -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
0182 -DCMAKE_INSTALL_DATADIR:PATH=%{_datadir}/%{name} \
0183 -DGEANT4_BUILD_BUILTIN_BACKTRACE:BOOL=OFF \
0184 -DGEANT4_BUILD_MULTITHREADED:BOOL=%{with threads} \
0185 -DGEANT4_BUILD_STORE_TRAJECTORY:BOOL=%{with trajectories} \
0186 -DGEANT4_BUILD_TLS_MODEL:STRING=global-dynamic \
0187 -DGEANT4_BUILD_VERBOSE_CODE:BOOL=OFF \
0188 -DGEANT4_ENABLE_TESTING:BOOL=OFF \
0189 -DGEANT4_INSTALL_DATA:BOOL=OFF \
0190 -DGEANT4_INSTALL_EXAMPLES:BOOL=%{with examples} \
0191 -DGEANT4_INSTALL_PACKAGE_CACHE:BOOL=OFF \
0192 -DGEANT4_USE_FREETYPE:BOOL=ON \
0193 -DGEANT4_USE_G3TOG4:BOOL=ON \
0194 -DGEANT4_USE_GDML:BOOL=ON \
0195 -DGEANT4_USE_HDF5:BOOL=%{with hdf5} \
0196 -DGEANT4_USE_INVENTOR:BOOL=OFF \
0197 -DGEANT4_USE_INVENTOR_QT:BOOL=%{with inventor} \
0198 -DGEANT4_USE_OPENGL_X11:BOOL=ON \
0199 -DGEANT4_USE_QT:BOOL=%{with qt5} \
0200 -DGEANT4_USE_RAYTRACER_X11:BOOL=ON \
0201 -DGEANT4_USE_SMARTSTACK:BOOL=OFF \
0202 -DGEANT4_USE_SYSTEM_CLHEP:BOOL=OFF \
0203 -DGEANT4_USE_SYSTEM_EXPAT:BOOL=ON \
0204 -DGEANT4_USE_SYSTEM_PTL:BOOL=OFF \
0205 -DGEANT4_USE_SYSTEM_ZLIB:BOOL=ON \
0206 -DGEANT4_USE_TBB:BOOL=%{with tbb} \
0207 -DGEANT4_USE_VTK:BOOL=%{with vtk} \
0208 -DGEANT4_USE_XM:BOOL=ON
0209
0210 %cmake3_build
0211
0212 %install
0213 %if %{?rhel}%{!?rhel:0} == 7
0214 . /opt/rh/devtoolset-7/enable
0215 %endif
0216 %cmake3_install
0217 rm -f %{buildroot}/%{_bindir}/geant4.sh
0218 rm -f %{buildroot}/%{_bindir}/geant4.csh
0219
0220 %if %{?rhel}%{!?rhel:0} == 7
0221 find %{buildroot}/%{_datadir}/%{name}/examples -name '*.py' -delete
0222 %endif
0223
0224 mkdir -p %{buildroot}/%{_datadir}/%{name}/data
0225 tar xzf %{SOURCE1} -C %{buildroot}/%{_datadir}/%{name}/data
0226 tar xzf %{SOURCE2} -C %{buildroot}/%{_datadir}/%{name}/data
0227 tar xzf %{SOURCE3} -C %{buildroot}/%{_datadir}/%{name}/data
0228 tar xzf %{SOURCE4} -C %{buildroot}/%{_datadir}/%{name}/data
0229 tar xzf %{SOURCE5} -C %{buildroot}/%{_datadir}/%{name}/data
0230 tar xzf %{SOURCE6} -C %{buildroot}/%{_datadir}/%{name}/data
0231 tar xzf %{SOURCE7} -C %{buildroot}/%{_datadir}/%{name}/data
0232 tar xzf %{SOURCE8} -C %{buildroot}/%{_datadir}/%{name}/data
0233 tar xzf %{SOURCE9} -C %{buildroot}/%{_datadir}/%{name}/data
0234 tar xzf %{SOURCE10} -C %{buildroot}/%{_datadir}/%{name}/data
0235 tar xzf %{SOURCE11} -C %{buildroot}/%{_datadir}/%{name}/data
0236 tar xzf %{SOURCE12} -C %{buildroot}/%{_datadir}/%{name}/data
0237 tar xzf %{SOURCE13} -C %{buildroot}/%{_datadir}/%{name}/data
0238
0239 %files
0240 # Empty
0241
0242 %files data
0243 %{_datadir}/%{name}/data
0244 %{_datadir}/%{name}/fonts
0245
0246 %files devel
0247 %{_bindir}/geant4-config
0248 %{_datadir}/%{name}/geant4make
0249 %{_includedir}/Geant4/*
0250 %{_libdir}/cmake/Geant4/*
0251 %{_libdir}/pkgconfig/*
0252
0253 %files libs
0254 %license LICENSE
0255 %{_datadir}/%{name}/tools.license
0256 %{_libdir}/Geant4*
0257 %{_libdir}/lib*.so*
0258
0259 %if %{with examples}
0260 %files examples
0261 %{_datadir}/%{name}/examples
0262 %endif
0263
0264 %changelog
0265 * Fri Jun 28 2024 Gabriele Cosmo <Gabriele.Cosmo@cern.ch> - 11.3.0-b
0266 - Update to version 11.3.0-beta
0267
0268 * Fri Jun 21 2024 Gabriele Cosmo <Gabriele.Cosmo@cern.ch> - 11.2.2
0269 - Update to version 11.2.2
0270
0271 * Fri June 7 2024 Ben Morgan <bmorgan@cern.ch> - 11.2.1-2
0272 - Add install of new URRPT dataset
0273
0274 * Fri May 17 2024 Ben Morgan <bmorgan@cern.ch> - 11.2.1-1
0275 - Add install of new NuDEXLib dataset
0276
0277 * Fri Feb 16 2024 Gabriele Cosmo <Gabriele.Cosmo@cern.ch> - 11.2.1
0278 - Update to version 11.2.1
0279
0280 * Wed Dec 12 2023 Guilherme Amadio <amadio@cern.ch> - 11.2.0
0281 - Update to version 11.2.0
0282
0283 * Wed Jun 28 2023 Guilherme Amadio <amadio@cern.ch> - 11.1.2
0284 - Update to version 11.1.2
0285
0286 * Wed May 18 2022 Guilherme Amadio <amadio@cern.ch> - 11.0.1
0287 - Initial version