summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorliuxueli <[email protected]>2020-06-30 17:59:14 +0800
committerliuxueli <[email protected]>2020-06-30 17:59:14 +0800
commit090de2caba5bf909c8722ceda43515c397e03354 (patch)
tree9a45945293c24528522e50fe14c1fc8fae7e69fc /cmake
parent003706e4f1ca4aa974c980b7c648310c3bc595f8 (diff)
将http的调试符号上传至Sentryv2.0.2
调整preInstall和preUninstall的位置
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Package.cmake2
-rw-r--r--cmake/preInstall.sh11
-rw-r--r--cmake/preUninstall.sh10
3 files changed, 23 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..8134025
--- /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 'http.inf' ${DST}/plug/conflist.inf` ]];then
+ sed -i '/\[protocol\]/a\./plug/protocol/http/http.inf' ${DST}/plug/conflist.inf
+fi
+if [[ -z `grep -rn 'HTTP' ${DST}etc/entrylist.conf` ]];then
+ echo "HTTP" >> ${DST}/etc/entrylist.conf
+fi
diff --git a/cmake/preUninstall.sh b/cmake/preUninstall.sh
new file mode 100644
index 0000000..acb2e24
--- /dev/null
+++ b/cmake/preUninstall.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+if [ $1 == 0 ]; then
+ DST=${RPM_INSTALL_PREFIX}
+
+ mkdir -p ${DST}/plug/protocol/
+ touch ${DST}/plug/conflist.inf
+
+ sed -i '/http.inf/d' ${DST}/plug/conflist.inf
+ sed -i '/HTTP/d' ${DST}/etc/entrylist.conf
+fi