addressed review comments
This commit is contained in:
parent
7188c82cb0
commit
703b2e276a
|
@ -8,78 +8,80 @@ endfunction()
|
|||
|
||||
function(install_symlink_impl)
|
||||
if (NOT WIN32)
|
||||
set(options "")
|
||||
set(one_value_options TO DESTINATION)
|
||||
set(multi_value_options COMPONENTS)
|
||||
cmake_parse_arguments(SYM "${options}" "${one_value_options}" "${multi_value_options}" "${ARGN}")
|
||||
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/symlinks)
|
||||
get_filename_component(fname ${SYM_DESTINATION} NAME)
|
||||
get_filename_component(dest_dir ${SYM_DESTINATION} DIRECTORY)
|
||||
set(sl ${CMAKE_CURRENT_BINARY_DIR}/symlinks/${fname})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SYM_TO} ${sl})
|
||||
foreach(component IN LISTS SYM_COMPONENTS)
|
||||
install(FILES ${sl} DESTINATION ${dest_dir} COMPONENT ${component})
|
||||
endforeach()
|
||||
return()
|
||||
endif()
|
||||
set(options "")
|
||||
set(one_value_options TO DESTINATION)
|
||||
set(multi_value_options COMPONENTS)
|
||||
cmake_parse_arguments(SYM "${options}" "${one_value_options}" "${multi_value_options}" "${ARGN}")
|
||||
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/symlinks)
|
||||
get_filename_component(fname ${SYM_DESTINATION} NAME)
|
||||
get_filename_component(dest_dir ${SYM_DESTINATION} DIRECTORY)
|
||||
set(sl ${CMAKE_CURRENT_BINARY_DIR}/symlinks/${fname})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SYM_TO} ${sl})
|
||||
foreach(component IN LISTS SYM_COMPONENTS)
|
||||
install(FILES ${sl} DESTINATION ${dest_dir} COMPONENT ${component})
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
function(install_symlink)
|
||||
if(NOT WIN32 AND NOT OPEN_FOR_IDE)
|
||||
set(options "")
|
||||
set(one_value_options COMPONENT LINK_DIR FILE_DIR LINK_NAME FILE_NAME)
|
||||
set(multi_value_options "")
|
||||
cmake_parse_arguments(IN "${options}" "${one_value_options}" "${multi_value_options}" "${ARGN}")
|
||||
return()
|
||||
endif()
|
||||
set(options "")
|
||||
set(one_value_options COMPONENT LINK_DIR FILE_DIR LINK_NAME FILE_NAME)
|
||||
set(multi_value_options "")
|
||||
cmake_parse_arguments(IN "${options}" "${one_value_options}" "${multi_value_options}" "${ARGN}")
|
||||
|
||||
set(rel_path "")
|
||||
string(REGEX MATCHALL "\\/" slashes "${IN_LINK_NAME}")
|
||||
foreach(ignored IN LISTS slashes)
|
||||
set(rel_path "../${rel_path}")
|
||||
endforeach()
|
||||
if("${IN_FILE_DIR}" MATCHES "bin")
|
||||
if("${IN_LINK_DIR}" MATCHES "lib")
|
||||
install_symlink_impl(
|
||||
TO "../${rel_path}bin/${IN_FILE_NAME}"
|
||||
DESTINATION "lib/${IN_LINK_NAME}"
|
||||
COMPONENTS "${IN_COMPONENT}-tgz")
|
||||
install_symlink_impl(
|
||||
TO "../${rel_path}bin/${IN_FILE_NAME}"
|
||||
DESTINATION "usr/lib64/${IN_LINK_NAME}"
|
||||
COMPONENTS "${IN_COMPONENT}-el6"
|
||||
"${IN_COMPONENT}-el7"
|
||||
"${IN_COMPONENT}-deb")
|
||||
install_symlink_impl(
|
||||
TO "../${rel_path}bin/${IN_FILE_NAME}"
|
||||
DESTINATION "usr/lib64/${IN_LINK_NAME}"
|
||||
COMPONENTS "${IN_COMPONENT}-deb")
|
||||
elseif("${IN_LINK_DIR}" MATCHES "bin")
|
||||
install_symlink_impl(
|
||||
TO "../${rel_path}bin/${IN_FILE_NAME}"
|
||||
DESTINATION "bin/${IN_LINK_NAME}"
|
||||
COMPONENTS "${IN_COMPONENT}-tgz")
|
||||
install_symlink_impl(
|
||||
TO "../${rel_path}bin/${IN_FILE_NAME}"
|
||||
DESTINATION "usr/bin/${IN_LINK_NAME}"
|
||||
COMPONENTS "${IN_COMPONENT}-el6"
|
||||
"${IN_COMPONENT}-el7"
|
||||
"${IN_COMPONENT}-deb")
|
||||
elseif("${IN_LINK_DIR}" MATCHES "fdbmonitor")
|
||||
install_symlink_impl(
|
||||
TO "../../${rel_path}bin/${IN_FILE_NAME}"
|
||||
DESTINATION "lib/foundationdb/${IN_LINK_NAME}"
|
||||
COMPONENTS "${IN_COMPONENT}-tgz")
|
||||
install_symlink_impl(
|
||||
TO "../../${rel_path}bin/${IN_FILE_NAME}"
|
||||
DESTINATION "usr/lib/foundationdb/${IN_LINK_NAME}"
|
||||
COMPONENTS "${IN_COMPONENT}-el6"
|
||||
"${IN_COMPONENT}-el7"
|
||||
"${IN_COMPONENT}-deb")
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown LINK_DIR ${IN_LINK_DIR}")
|
||||
endif()
|
||||
set(rel_path "")
|
||||
string(REGEX MATCHALL "\\/" slashes "${IN_LINK_NAME}")
|
||||
foreach(ignored IN LISTS slashes)
|
||||
set(rel_path "../${rel_path}")
|
||||
endforeach()
|
||||
if("${IN_FILE_DIR}" MATCHES "bin")
|
||||
if("${IN_LINK_DIR}" MATCHES "lib")
|
||||
install_symlink_impl(
|
||||
TO "../${rel_path}bin/${IN_FILE_NAME}"
|
||||
DESTINATION "lib/${IN_LINK_NAME}"
|
||||
COMPONENTS "${IN_COMPONENT}-tgz")
|
||||
install_symlink_impl(
|
||||
TO "../${rel_path}bin/${IN_FILE_NAME}"
|
||||
DESTINATION "usr/lib64/${IN_LINK_NAME}"
|
||||
COMPONENTS
|
||||
"${IN_COMPONENT}-el7"
|
||||
"${IN_COMPONENT}-deb")
|
||||
install_symlink_impl(
|
||||
TO "../${rel_path}bin/${IN_FILE_NAME}"
|
||||
DESTINATION "usr/lib64/${IN_LINK_NAME}"
|
||||
COMPONENTS "${IN_COMPONENT}-deb")
|
||||
elseif("${IN_LINK_DIR}" MATCHES "bin")
|
||||
install_symlink_impl(
|
||||
TO "../${rel_path}bin/${IN_FILE_NAME}"
|
||||
DESTINATION "bin/${IN_LINK_NAME}"
|
||||
COMPONENTS "${IN_COMPONENT}-tgz")
|
||||
install_symlink_impl(
|
||||
TO "../${rel_path}bin/${IN_FILE_NAME}"
|
||||
DESTINATION "usr/bin/${IN_LINK_NAME}"
|
||||
COMPONENTS
|
||||
"${IN_COMPONENT}-el7"
|
||||
"${IN_COMPONENT}-deb")
|
||||
elseif("${IN_LINK_DIR}" MATCHES "fdbmonitor")
|
||||
install_symlink_impl(
|
||||
TO "../../${rel_path}bin/${IN_FILE_NAME}"
|
||||
DESTINATION "lib/foundationdb/${IN_LINK_NAME}"
|
||||
COMPONENTS "${IN_COMPONENT}-tgz")
|
||||
install_symlink_impl(
|
||||
TO "../../${rel_path}bin/${IN_FILE_NAME}"
|
||||
DESTINATION "usr/lib/foundationdb/${IN_LINK_NAME}"
|
||||
COMPONENTS
|
||||
"${IN_COMPONENT}-el7"
|
||||
"${IN_COMPONENT}-deb")
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown FILE_DIR ${IN_FILE_DIR}")
|
||||
message(FATAL_ERROR "Unknown LINK_DIR ${IN_LINK_DIR}")
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown FILE_DIR ${IN_FILE_DIR}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ Release Notes
|
|||
#############
|
||||
|
||||
6.3.10
|
||||
=====
|
||||
======
|
||||
|
||||
Packaging
|
||||
---------
|
||||
|
|
|
@ -1,5 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
CMAKE_CONFIG_DIR="/usr/@LIB_DIR@/cmake"
|
||||
PKG_CONFIG_DIR="/usr/@LIB_DIR@/pkgconfig"
|
||||
|
||||
if [ ! -d "${CMAKE_CONFIG_DIR}" ]
|
||||
then
|
||||
mkdir "${CMAKE_CONFIG_DIR}"
|
||||
fi
|
||||
if [ ! -d "${PKG_CONFIG_DIR}" ]
|
||||
then
|
||||
mkdir ${PKG_CONFIG_DIR}
|
||||
fi
|
||||
|
||||
|
||||
alternatives --install /usr/bin/fdbcli fdbclients /usr/lib/foundationdb-@PROJECT_VERSION@/bin/fdbcli @ALTERNATIVES_PRIORITY@ \
|
||||
--slave /usr/bin/fdbbackup fdbbackup /usr/lib/foundationdb-@PROJECT_VERSION@/bin/fdbbackup \
|
||||
--slave /usr/bin/fdbrestore fdbrestore /usr/lib/foundationdb-@PROJECT_VERSION@/bin/fdbbackup \
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
alternatives --remove fdbclients /usr/lib/foundationdb-@PROJECT_VERSION@/bin/fdbcli @ALTERNATIVES_PRIORITY@
|
||||
alternatives --remove fdbclients /usr/lib/foundationdb-@PROJECT_VERSION@/bin/fdbcli
|
||||
|
|
Loading…
Reference in New Issue