mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +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)
|
||||
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)
|
||||
execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink
|
||||
"${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
|
||||
# config file code.
|
||||
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(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/zkg-config.in
|
||||
|
@ -768,10 +789,16 @@ message(
|
|||
"\n"
|
||||
"\nBuild type: ${CMAKE_BUILD_TYPE}"
|
||||
"\nBuild dir: ${PROJECT_BINARY_DIR}"
|
||||
"\n"
|
||||
"\nInstall prefix: ${CMAKE_INSTALL_PREFIX}"
|
||||
"\nConfig file dir: ${ZEEK_ETC_INSTALL_DIR}"
|
||||
"\nLog dir: ${ZEEK_LOG_DIR}"
|
||||
"\nPlugin dir: ${BRO_PLUGIN_INSTALL_PATH}"
|
||||
"\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}"
|
||||
"\nUnit tests: ${ENABLE_ZEEK_UNIT_TESTS}"
|
||||
"\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
|
||||
and run-time data (within log/ and spool/ subdirs)
|
||||
[PREFIX]
|
||||
--spooldir=PATH when using ZeekControl, path to store run-time data
|
||||
[PREFIX/spool]
|
||||
--logdir=PATH when using ZeekControl, path to store log file
|
||||
[PREFIX/logs]
|
||||
--spooldir=PATH directory for in-progress logs [PREFIX/spool]
|
||||
--statedir=PATH directory for variable state [PREFIX/var/lib]
|
||||
--logdir=PATH directory for finalized logs [PREFIX/logs]
|
||||
--libdir=PATH installation directory for library files [PREFIX/lib]
|
||||
--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]
|
||||
--python-dir=PATH explicit installation directory for Python modules
|
||||
--python-prefix=PATH versioned installation directory for Python modules,
|
||||
|
@ -256,6 +255,9 @@ while [ $# -ne 0 ]; do
|
|||
--spooldir=*)
|
||||
append_cache_entry ZEEK_SPOOL_DIR PATH $optarg
|
||||
;;
|
||||
--statedir=*)
|
||||
append_cache_entry ZEEK_STATE_DIR PATH $optarg
|
||||
;;
|
||||
--logdir=*)
|
||||
append_cache_entry ZEEK_LOG_DIR PATH $optarg
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue