From 6b5a73b0da03a7d4ddb33e8bb8fba71ffc2a91fd Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Thu, 24 Sep 2026 14:56:13 +0200 Subject: [PATCH] export EPICS_BASE and EPICS_HOST_ARCH --- epics-base.sh | 5 +++-- epics-base.spec | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/epics-base.sh b/epics-base.sh index 41572e27d..e0f093832 100644 --- a/epics-base.sh +++ b/epics-base.sh @@ -1,6 +1,7 @@ _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}:$EPICS_BASE/bin/$EPICS_HOST_ARCH +export EPICS_BASE=@EPICS_BASE@ +export EPICS_HOST_ARCH=@EPICS_HOST_ARCH@ +PATH=${PATH//?(:)\/usr\/local\/epics\/base-+([0-9]).+([0-9]).+([0-9])\/bin\/*([^:])}:@EPICS_BASE@/bin/@EPICS_HOST_ARCH@ eval $_OLD_EXTGLOB unset _OLD_EXTGLOB diff --git a/epics-base.spec b/epics-base.spec index 42e3807e9..f4532119e 100644 --- a/epics-base.spec +++ b/epics-base.spec @@ -225,7 +225,8 @@ shopt -s extglob %{__chmod} 644 %{buildroot}%{prog_folder}/bin/*/caRepeater.service # install the profile script -/bin/sed 's!\$EPICS_BASE!%{prog_folder}!' epics-base.sh > %{buildroot}%{prog_folder}/bin/epics-base.sh +/bin/sed 's!@EPICS_BASE@!%{prog_folder}!g;s!@EPICS_HOST_ARCH@!%{epics_host_arch}!g' epics-base.sh > %{buildroot}%{prog_folder}/bin/epics-base.sh +chmod +x %{buildroot}%{prog_folder}/bin/epics-base.sh # copy over old libraries for compatibility %if 0%{?rhel} > 8