mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00

We install test data which we also make available under an alternative path for backwards compatibility. The installation of this symlink did not take `DESTDIR` installs like used by Zeek's packaging into account which caused installations from packages to behave different from installs from source. This patch fixes the symlink to respect a possible `DESTDIR`. Closes #3266.
21 lines
761 B
CMake
21 lines
761 B
CMake
install(
|
|
DIRECTORY scripts/
|
|
DESTINATION ${ZEEK_CONFIG_BTEST_TOOLS_DIR}/scripts
|
|
USE_SOURCE_PERMISSIONS FILES_MATCHING
|
|
PATTERN "diff-*")
|
|
install(FILES btest/random.seed DESTINATION ${ZEEK_CONFIG_BTEST_TOOLS_DIR}/data)
|
|
|
|
if (INSTALL_BTEST_PCAPS)
|
|
install(DIRECTORY btest/Traces/ DESTINATION ${ZEEK_CONFIG_BTEST_TOOLS_DIR}/data/pcaps)
|
|
endif ()
|
|
|
|
# The remainder is for backwards-compatability with existing Spicy zkg packages.
|
|
install(
|
|
CODE "execute_process( \
|
|
COMMAND ${CMAKE_COMMAND} -E create_symlink \
|
|
${ZEEK_CONFIG_BTEST_TOOLS_DIR}/data \
|
|
\$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/share/zeek/tests \
|
|
)")
|
|
|
|
install(DIRECTORY scripts/spicy/ DESTINATION ${ZEEK_CONFIG_BTEST_TOOLS_DIR}/data/Scripts
|
|
USE_SOURCE_PERMISSIONS)
|