mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Ensure presence of Zeek-related directories in toplevel CMakeLists.txt
This establishes several of the Zeek installation's directories in CMakeLists.txt, and adds a new ZEEK_STATE_DIR (via `configure --state-dir`) for arbitrary Zeek-related variable state. It defaults to ZEEK_ROOT/var/lib. This leaves the existing, zeekctl-related ZEEK_LOCAL_STATE_DIR unchanged and does not use it. We'll likely deprecate it when removal of zeekctl approaches.
This commit is contained in:
parent
4d1b9f4a08
commit
9860b5686d
2 changed files with 36 additions and 7 deletions
|
@ -65,6 +65,27 @@ else ()
|
||||||
CACHE STRING "Installation path for plugins" FORCE)
|
CACHE STRING "Installation path for plugins" FORCE)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if ( NOT ZEEK_ETC_INSTALL_DIR )
|
||||||
|
set(ZEEK_ETC_INSTALL_DIR ${ZEEK_ROOT_DIR}/etc)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if ( NOT ZEEK_STATE_DIR )
|
||||||
|
set(ZEEK_STATE_DIR ${ZEEK_ROOT_DIR}/var/lib)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if ( NOT ZEEK_SPOOL_DIR )
|
||||||
|
set(ZEEK_SPOOL_DIR ${ZEEK_ROOT_DIR}/spool)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if ( NOT ZEEK_LOG_DIR )
|
||||||
|
set(ZEEK_LOG_DIR ${ZEEK_ROOT_DIR}/logs)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
install(DIRECTORY DESTINATION ${ZEEK_ETC_INSTALL_DIR})
|
||||||
|
install(DIRECTORY DESTINATION ${ZEEK_STATE_DIR})
|
||||||
|
install(DIRECTORY DESTINATION ${ZEEK_SPOOL_DIR})
|
||||||
|
install(DIRECTORY DESTINATION ${ZEEK_LOG_DIR})
|
||||||
|
|
||||||
configure_file(zeek-path-dev.in ${CMAKE_CURRENT_BINARY_DIR}/zeek-path-dev)
|
configure_file(zeek-path-dev.in ${CMAKE_CURRENT_BINARY_DIR}/zeek-path-dev)
|
||||||
execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink
|
execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/zeek-wrapper.in"
|
"${CMAKE_CURRENT_BINARY_DIR}/zeek-wrapper.in"
|
||||||
|
@ -612,7 +633,7 @@ if ( INSTALL_ZKG )
|
||||||
# An etc/zkg directory for zkg's config file simplifies zkg's
|
# An etc/zkg directory for zkg's config file simplifies zkg's
|
||||||
# config file code.
|
# config file code.
|
||||||
set(ZEEK_ZKG_CONFIG_DIR "${ZEEK_ETC_INSTALL_DIR}/zkg")
|
set(ZEEK_ZKG_CONFIG_DIR "${ZEEK_ETC_INSTALL_DIR}/zkg")
|
||||||
set(ZEEK_ZKG_STATE_DIR "${ZEEK_ROOT_DIR}/var/lib/zkg")
|
set(ZEEK_ZKG_STATE_DIR "${ZEEK_STATE_DIR}/zkg")
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/zkg-config.in
|
${CMAKE_CURRENT_SOURCE_DIR}/zkg-config.in
|
||||||
|
@ -768,10 +789,16 @@ message(
|
||||||
"\n"
|
"\n"
|
||||||
"\nBuild type: ${CMAKE_BUILD_TYPE}"
|
"\nBuild type: ${CMAKE_BUILD_TYPE}"
|
||||||
"\nBuild dir: ${PROJECT_BINARY_DIR}"
|
"\nBuild dir: ${PROJECT_BINARY_DIR}"
|
||||||
|
"\n"
|
||||||
"\nInstall prefix: ${CMAKE_INSTALL_PREFIX}"
|
"\nInstall prefix: ${CMAKE_INSTALL_PREFIX}"
|
||||||
|
"\nConfig file dir: ${ZEEK_ETC_INSTALL_DIR}"
|
||||||
|
"\nLog dir: ${ZEEK_LOG_DIR}"
|
||||||
"\nPlugin dir: ${BRO_PLUGIN_INSTALL_PATH}"
|
"\nPlugin dir: ${BRO_PLUGIN_INSTALL_PATH}"
|
||||||
"\nPython module dir: ${PY_MOD_INSTALL_DIR}"
|
"\nPython module dir: ${PY_MOD_INSTALL_DIR}"
|
||||||
"\nZeek Script Path: ${ZEEK_SCRIPT_INSTALL_PATH}"
|
"\nScript dir: ${ZEEK_SCRIPT_INSTALL_PATH}"
|
||||||
|
"\nSpool dir: ${ZEEK_SPOOL_DIR}"
|
||||||
|
"\nState dir: ${ZEEK_STATE_DIR}"
|
||||||
|
"\n"
|
||||||
"\nDebug mode: ${ENABLE_DEBUG}"
|
"\nDebug mode: ${ENABLE_DEBUG}"
|
||||||
"\nUnit tests: ${ENABLE_ZEEK_UNIT_TESTS}"
|
"\nUnit tests: ${ENABLE_ZEEK_UNIT_TESTS}"
|
||||||
"\nBuiltin Plugins: ${ZEEK_BUILTIN_PLUGINS}"
|
"\nBuiltin Plugins: ${ZEEK_BUILTIN_PLUGINS}"
|
||||||
|
|
12
configure
vendored
12
configure
vendored
|
@ -38,13 +38,12 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
--localstatedir=PATH when using ZeekControl, path to store log files
|
--localstatedir=PATH when using ZeekControl, path to store log files
|
||||||
and run-time data (within log/ and spool/ subdirs)
|
and run-time data (within log/ and spool/ subdirs)
|
||||||
[PREFIX]
|
[PREFIX]
|
||||||
--spooldir=PATH when using ZeekControl, path to store run-time data
|
--spooldir=PATH directory for in-progress logs [PREFIX/spool]
|
||||||
[PREFIX/spool]
|
--statedir=PATH directory for variable state [PREFIX/var/lib]
|
||||||
--logdir=PATH when using ZeekControl, path to store log file
|
--logdir=PATH directory for finalized logs [PREFIX/logs]
|
||||||
[PREFIX/logs]
|
|
||||||
--libdir=PATH installation directory for library files [PREFIX/lib]
|
--libdir=PATH installation directory for library files [PREFIX/lib]
|
||||||
--plugindir=PATH installation directory for plugins [LIBDIR/zeek/plugin]
|
--plugindir=PATH installation directory for plugins [LIBDIR/zeek/plugin]
|
||||||
--conf-files-dir=PATH config files installation directory [PREFIX/etc]
|
--conf-files-dir=PATH installation directory for config files [PREFIX/etc]
|
||||||
--mandir=PATH installation path for man pages [PREFIX/share/man]
|
--mandir=PATH installation path for man pages [PREFIX/share/man]
|
||||||
--python-dir=PATH explicit installation directory for Python modules
|
--python-dir=PATH explicit installation directory for Python modules
|
||||||
--python-prefix=PATH versioned installation directory for Python modules,
|
--python-prefix=PATH versioned installation directory for Python modules,
|
||||||
|
@ -256,6 +255,9 @@ while [ $# -ne 0 ]; do
|
||||||
--spooldir=*)
|
--spooldir=*)
|
||||||
append_cache_entry ZEEK_SPOOL_DIR PATH $optarg
|
append_cache_entry ZEEK_SPOOL_DIR PATH $optarg
|
||||||
;;
|
;;
|
||||||
|
--statedir=*)
|
||||||
|
append_cache_entry ZEEK_STATE_DIR PATH $optarg
|
||||||
|
;;
|
||||||
--logdir=*)
|
--logdir=*)
|
||||||
append_cache_entry ZEEK_LOG_DIR PATH $optarg
|
append_cache_entry ZEEK_LOG_DIR PATH $optarg
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue