提交 8fc776d6 编写于 作者: X xh0 提交者: wangzelin.wzl

opensource: pack ob_error and ob_admin

上级 500bd487
......@@ -9,7 +9,9 @@ set(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
set(CPACK_RPM_PACKAGE_RELEASE ${OB_RELEASEID})
set(CPACK_RPM_PACKAGE_RELEASE_DIST ON)
# RPM package informations.
set(CPACK_RPM_RELOCATION_PATHS /usr /home/admin/oceanbase)
set(CPACK_PACKAGING_INSTALL_PREFIX /home/admin/oceanbase)
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/home/admin/oceanbase")
set(CPACK_PACKAGE_NAME "oceanbase-ce")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "OceanBase CE is a distributed relational database")
set(CPACK_PACKAGE_VENDOR "Ant Group CO., Ltd.")
......@@ -77,6 +79,18 @@ install(PROGRAMS
COMPONENT libs
)
# utils
install(PROGRAMS
${CMAKE_BINARY_DIR}/tools/ob_admin/ob_admin
${CMAKE_BINARY_DIR}/tools/ob_error/src/ob_error
DESTINATION /usr/bin
COMPONENT utils
)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/utils_post.script "/sbin/ldconfig /home/admin/oceanbase/lib")
set(CPACK_RPM_UTILS_POST_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_BINARY_DIR}/utils_post.script)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/utils_postun.script "/sbin/ldconfig")
set(CPACK_RPM_UTILS_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_CURRENT_BINARY_DIR}/utils_postun.script)
# install cpack to make everything work
include(CPack)
......@@ -84,4 +98,5 @@ include(CPack)
add_custom_target(rpm
COMMAND +make package
DEPENDS
observer ob_sql_proxy_parser_static)
observer ob_admin ob_error
ob_sql_proxy_parser_static)
\ No newline at end of file
......@@ -16,6 +16,7 @@ add_executable(ob_admin
ob_admin_executor.cpp
main.cpp)
set(LGPL_DEPS "-L${DEP_DIR}/lib/mariadb -lmariadb -laio")
if (OB_STATIC_LINK_LGPL_DEPS)
set(LGPL_DEPS "-L${DEP_DIR}/lib/mariadb -l:libmariadbclient.a -l:libaio.a")
endif()
......@@ -31,4 +32,4 @@ target_link_libraries(ob_admin
target_include_directories(ob_admin
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR})
${CMAKE_CURRENT_SOURCE_DIR})
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册