Skip to content

Commit 5fb22ee

Browse files
stop using ld.so.conf in postinst scripts
Change-Id: I84ef7407fdc9bef7d4f193728fa41105fe3d9a9a
1 parent 857d029 commit 5fb22ee

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

package.cmake

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,10 @@ if(UNIX)
5959

6060
set(OCL_ICD_RUNTIME_NAME libigdrcl.so)
6161
install(
62-
CODE "file( WRITE ${IGDRCL_BINARY_DIR}/libintelopencl.conf \"/opt/intel/opencl\n\" )"
63-
CODE "file( WRITE ${IGDRCL_BINARY_DIR}/intel.icd \"/opt/intel/opencl/${OCL_ICD_RUNTIME_NAME}\n\" )"
64-
CODE "file( WRITE ${IGDRCL_BINARY_DIR}/postinst \"echo /opt/intel/opencl >> ${_dir_etc}/ld.so.conf\n\" )"
65-
CODE "file( APPEND ${IGDRCL_BINARY_DIR}/postinst \"/sbin/ldconfig\n\" )"
66-
CODE "file( WRITE ${IGDRCL_BINARY_DIR}/postrm \"sed -i '/\\\\/opt\\\\/intel\\\\/opencl.*$/d' ${_dir_etc}/ld.so.conf\n\" )"
67-
CODE "file( APPEND ${IGDRCL_BINARY_DIR}/postrm \"/sbin/ldconfig\n\" )"
62+
CODE "file( WRITE ${IGDRCL_BINARY_DIR}/libintelopencl.conf \"/opt/intel/opencl\n\" )"
63+
CODE "file( WRITE ${IGDRCL_BINARY_DIR}/intel.icd \"/opt/intel/opencl/${OCL_ICD_RUNTIME_NAME}\n\" )"
64+
CODE "file( WRITE ${IGDRCL_BINARY_DIR}/postinst \"/sbin/ldconfig\n\" )"
65+
CODE "file( WRITE ${IGDRCL_BINARY_DIR}/postrm \"/sbin/ldconfig\n\" )"
6866
COMPONENT igdrcl
6967
)
7068
install(FILES ${IGDRCL_BINARY_DIR}/libintelopencl.conf DESTINATION ${_dir_etc}/ld.so.conf.d COMPONENT igdrcl)

0 commit comments

Comments
 (0)