diff --git a/epics-base.sh b/epics-base.sh index 886ee5371..41572e27d 100644 --- a/epics-base.sh +++ b/epics-base.sh @@ -1,6 +1,6 @@ _OLD_EXTGLOB=$(shopt -p extglob) shopt -s extglob test -n "$EPICS_HOST_ARCH" || export EPICS_HOST_ARCH=$(/bin/sed "s%cpe:/o:redhat:enterprise_linux:\([0-9]*\).*%RHEL\1-`/bin/uname -m`%" /etc/system-release-cpe) -PATH=${PATH//\/usr\/local\/epics\/base-+([0-9]).+([0-9]).+([0-9])\/bin\/$EPICS_HOST_ARCH}:$(echo $(ls -dvr /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/$EPICS_HOST_ARCH) | tr ' ' :) +PATH=${PATH//?(:)\/usr\/local\/epics\/base-+([0-9]).+([0-9]).+([0-9])\/bin\/$EPICS_HOST_ARCH}:$EPICS_BASE/bin/$EPICS_HOST_ARCH eval $_OLD_EXTGLOB unset _OLD_EXTGLOB diff --git a/epics-base.spec b/epics-base.spec index 0b14b9ef5..d32d5b3ef 100644 --- a/epics-base.spec +++ b/epics-base.spec @@ -5,7 +5,7 @@ Name: epics-base-%{EpicsVersion} Summary: EPICS Base %{EpicsVersion} Version: 1 -Release: 6%{?dist} +Release: 7%{?dist} License: EPICS Open License Group: Development/Languages URL: https://git.psi.ch/epics_base/base-7.0 @@ -198,7 +198,7 @@ shopt -s extglob %{__chmod} 644 %{buildroot}%{prog_folder}/bin/*/caRepeater.service # install the profile script -%{__install} epics-base.sh %{buildroot}%{prog_folder}/bin +/bin/sed 's!\$EPICS_BASE!%{prog_folder}!' epics-base.sh > %{buildroot}%{prog_folder}/bin/epics-base.sh # copy over old libraries for compatibility %if %{?rhel} > 7