diff --git a/projects/clr/opencl/packaging/rocm-opencl.postinst b/projects/clr/opencl/packaging/rocm-opencl.postinst index c11d1ad2d5..b76ed1a888 100644 --- a/projects/clr/opencl/packaging/rocm-opencl.postinst +++ b/projects/clr/opencl/packaging/rocm-opencl.postinst @@ -2,16 +2,14 @@ set -e -do_ldconfig() { - if [ -e "/opt/rocm/opencl" ] ; then - echo /opt/rocm/opencl/lib > /etc/ld.so.conf.d/x86_64-rocm-opencl.conf && ldconfig - fi - mkdir -p /etc/OpenCL/vendors && (echo libamdocl64.so > /etc/OpenCL/vendors/@OPENCL_AMD_ICD_FILE@) -} - INSTALL_PATH=@CPACK_PACKAGING_INSTALL_PREFIX@ ROCM_LIBPATH=@ROCM_PATH@/lib +do_ldconfig() { + echo ${ROCM_LIBPATH} > /etc/ld.so.conf.d/x86_64-rocm-opencl.conf && ldconfig + mkdir -p /etc/OpenCL/vendors && (echo libamdocl64.so > /etc/OpenCL/vendors/@OPENCL_AMD_ICD_FILE@) +} + case "$1" in abort-deconfigure|abort-remove|abort-upgrade) echo "$1" diff --git a/projects/clr/opencl/packaging/rocm-opencl.rpm_post b/projects/clr/opencl/packaging/rocm-opencl.rpm_post index 936d9e16d1..b9a98fb932 100644 --- a/projects/clr/opencl/packaging/rocm-opencl.rpm_post +++ b/projects/clr/opencl/packaging/rocm-opencl.rpm_post @@ -1,10 +1,9 @@ -if [ -e "/opt/rocm/opencl" ] ; then - echo /opt/rocm/opencl/lib > /etc/ld.so.conf.d/x86_64-rocm-opencl.conf && ldconfig -fi -mkdir -p /etc/OpenCL/vendors && (echo libamdocl64.so > /etc/OpenCL/vendors/@OPENCL_AMD_ICD_FILE@) INSTALL_PATH=@CPACK_PACKAGING_INSTALL_PREFIX@ ROCM_LIBPATH=@ROCM_PATH@/lib +echo ${ROCM_LIBPATH} > /etc/ld.so.conf.d/x86_64-rocm-opencl.conf && ldconfig +mkdir -p /etc/OpenCL/vendors && (echo libamdocl64.so > /etc/OpenCL/vendors/@OPENCL_AMD_ICD_FILE@) + mkdir -p ${ROCM_LIBPATH} ln -s -f -r ${INSTALL_PATH}/lib/libOpenCL.so ${ROCM_LIBPATH}/libOpenCL.so ln -s -f -r ${INSTALL_PATH}/lib/libOpenCL.so.@OPENCL_LIB_VERSION_MAJOR@ ${ROCM_LIBPATH}/libOpenCL.so.@OPENCL_LIB_VERSION_MAJOR@