适配maat3.0
将fw_http_plug的调试符号上传至Sentry 调整preInstall和preUninstall的位置
This commit is contained in:
@@ -14,8 +14,8 @@ set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set(CPACK_PACKAGE_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_BUILD}")
|
||||
execute_process(COMMAND bash -c "echo -ne \"`uname -r | awk -F'.' '{print $5\".\"$6\".\"$7}'`\"" OUTPUT_VARIABLE SYSTEM_VERSION)
|
||||
|
||||
#execute_process(COMMAND sh changelog.sh WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/cmake)
|
||||
#SET(CPACK_RPM_CHANGELOG_FILE ${PROJECT_SOURCE_DIR}/cmake/changelog.txt)
|
||||
execute_process(COMMAND sh changelog.sh WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/cmake)
|
||||
SET(CPACK_RPM_CHANGELOG_FILE ${PROJECT_SOURCE_DIR}/cmake/changelog.txt)
|
||||
|
||||
# RPM Build
|
||||
set(CPACK_GENERATOR "RPM")
|
||||
@@ -42,6 +42,8 @@ set(CPACK_RPM_HEADER_PACKAGE_CONFLICTS ${CPACK_RPM_HEADER_PACKAGE_NAME})
|
||||
|
||||
set(CPACK_COMPONENTS_ALL LIBRARY 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}")
|
||||
|
||||
|
||||
14
cmake/PreInstall.sh
Normal file
14
cmake/PreInstall.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
DST=${RPM_INSTALL_PREFIX}
|
||||
mkdir -p ${DST}/plug/business/
|
||||
touch ${DST}/plug/conflist.inf
|
||||
mkdir -p ${DST}/tsgconf/
|
||||
touch ${DST}/tsgconf/main.conf
|
||||
if [[ -z `grep -rn 'fw_dns_plug.inf' ${DST}/plug/conflist.inf` ]];then
|
||||
sed -i '/\[business\]/a\./plug/business/fw_dns_plug/fw_dns_plug.inf' ${DST}/plug/conflist.inf
|
||||
fi
|
||||
if [[ -z `grep -rn '\[DNS_PLUG\]' ${DST}/tsgconf/main.conf` ]];then
|
||||
sed -i '1i\\[DNS_PLUG\]' ${DST}/tsgconf/main.conf
|
||||
sed -i '/\[DNS_PLUG\]/a\LOG_LEVEL=30' ${DST}/tsgconf/main.conf
|
||||
sed -i '/\[DNS_PLUG\]/a\LOG_PATH=./tsglog/fw_dns_plug/fw_dns_plug' ${DST}/tsgconf/main.conf
|
||||
fi
|
||||
12
cmake/PreUninstall.sh
Normal file
12
cmake/PreUninstall.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
if [ $1 == 0 ]; then
|
||||
DST=${RPM_INSTALL_PREFIX}
|
||||
|
||||
mkdir -p ${DST}/plug/business/
|
||||
touch ${DST}/plug/conflist.inf
|
||||
mkdir -p ${DST}/tsgconf/
|
||||
touch ${DST}/tsgconf/main.conf
|
||||
|
||||
sed -i '/fw_dns_plug.inf/d' ${DST}/plug/conflist.inf
|
||||
sed -i '/\[DNS_PLUG\]/,+2d' ${DST}/tsgconf/main.conf
|
||||
fi
|
||||
Reference in New Issue
Block a user