summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorliuxueli <[email protected]>2020-07-01 09:33:35 +0800
committerliuxueli <[email protected]>2020-07-01 09:33:35 +0800
commit7543d9fbc0e9012bc8b0104ee44620e13f8df8c8 (patch)
tree52ad6e6629a70488eb2768a538fe0516ff23c1e6 /cmake
parent0a9a3a98cf7b0522febc8af06d573708f2c39ad4 (diff)
将ssl的调试符号上传至Sentryv1.0.1
调整preInstall和preUninstall的位置
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Package.cmake2
-rw-r--r--cmake/preInstall.sh11
2 files changed, 13 insertions, 0 deletions
diff --git a/cmake/Package.cmake b/cmake/Package.cmake
index edb4258..2b4179e 100644
--- a/cmake/Package.cmake
+++ b/cmake/Package.cmake
@@ -49,6 +49,8 @@ set(CPACK_RPM_HEADER_PACKAGE_CONFLICTS ${CPACK_RPM_HEADER_PACKAGE_NAME})
set(CPACK_COMPONENTS_ALL LIBRARY HEADER PROFILE)
+SET(CPACK_RPM_LIBRARY_PRE_INSTALL_SCRIPT_FILE "${PROJECT_SOURCE_DIR}/cmake/preInstall.sh")
+SET(CPACK_RPM_LIBRARY_PRE_UNINSTALL_SCRIPT_FILE "${PROJECT_SOURCE_DIR}/cmake/preUninstall.sh")
set(CPACK_BUILD_SOURCE_DIRS "${CMAKE_SOURCE_DIR}")
diff --git a/cmake/preInstall.sh b/cmake/preInstall.sh
new file mode 100644
index 0000000..01bfff9
--- /dev/null
+++ b/cmake/preInstall.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+DST=${RPM_INSTALL_PREFIX}
+mkdir -p ${DST}/plug/protocol/
+touch ${DST}/plug/conflist.inf
+touch ${DST}/etc/entrylist.conf
+if [[ -z `grep -rn 'ssl.inf' ${DST}/plug/conflist.inf` ]];then
+ sed -i '/\[protocol\]/a\./plug/protocol/ssl/ssl.inf' ${DST}/plug/conflist.inf
+fi
+if [[ -z `grep -rn 'SSL' ${DST}/etc/entrylist.conf` ]];then
+ echo "SSL" >> ${DST}/etc/entrylist.conf
+fi