diff --git a/gromacs.spec b/gromacs.spec index de68ab4..d40bae7 100644 --- a/gromacs.spec +++ b/gromacs.spec @@ -8,7 +8,7 @@ %endif Name: gromacs Version: 2019.3 -Release: 2 +Release: 3 Summary: Fast, Free and Flexible Molecular Dynamics License: GPLv2+ and ASL-2.0 and BSL-1.0 and MIT and LGPL-2.1 URL: http://www.gromacs.org @@ -19,6 +19,7 @@ Patch0: gromacs-dssp-path.patch Patch1: gromacs-issue-2366.patch BuildRequires: gcc-c++ cmake3 >= 3.4.3 openblas-devel fftw-devel gsl-devel hwloc BuildRequires: hwloc-devel libX11-devel lmfit-devel >= 6.0 environment-modules +BuildRequires: chrpath %if %{with_opencl} BuildRequires: ocl-icd-devel opencl-headers Recommends: gromacs-opencl = %{version}-%{release} @@ -212,6 +213,26 @@ done rm ./%{_bindir}/gmx-completion.bash ./%{_libdir}/*mpi*/bin/gmx-completion-*mpi*.bash %ldconfig_scriptlets libs +chrpath -d %{buildroot}/%{_libdir}/mpich/bin/mdrun_mpich +chrpath -d %{buildroot}/%{_libdir}/mpich/bin/mdrun_mpich_d +chrpath -d %{buildroot}/%{_libdir}/openmpi/bin/mdrun_openmpi +chrpath -d %{buildroot}/%{_libdir}/openmpi/bin/mdrun_openmpi_d +mkdir -p %{buildroot}/etc/ld.so.conf.d +echo "%{_libdir}/mpich/lib" > %{buildroot}/etc/ld.so.conf.d/%{name}-mpich-%{_arch}.conf +echo "%{_libdir}/openmpi/lib" > %{buildroot}/etc/ld.so.conf.d/%{name}-openmpi-%{_arch}.conf + +%post openmpi +/sbin/ldconfig + +%post mpich +/sbin/ldconfig + +%postun openmpi +/sbin/ldconfig + +%postun mpich +/sbin/ldconfig + %check . /etc/profile.d/modules.sh for p in '' _d ; do @@ -257,11 +278,16 @@ done %files openmpi %{_libdir}/openmpi/bin/mdrun_openmpi* +%config(noreplace) /etc/ld.so.conf.d/%{name}-openmpi-%{_arch}.conf %files mpich %{_libdir}/mpich/bin/mdrun_mpich* +%config(noreplace) /etc/ld.so.conf.d/%{name}-mpich-%{_arch}.conf %changelog +* Mon Dec 05 2022 Ge Wang - 2019.3-3 +- Remove runpath + * Mon Nov 21 2022 wangkai - 2019.3-2 - Change source url