From 03ed0973531708d855da1129f54ee6b3f933b0af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Wed, 28 Oct 2020 14:02:03 +0100 Subject: ZyklonB: use XDG paths by default Install plugins to /usr/share rather than /usr/lib since they're arch-independent. Many precedents can be found for scripted plugins in /usr/share and fewer for /usr/lib. Look for plugins in all XDG data directories and repurpose the "plugin_dir" setting to override this behaviour. This adds some complexity to the bot but unifies the project. It might make sense to remove the "plugin_dir" setting. --- CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ee87ab..7da0cd8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,8 +132,6 @@ set (HAVE_EDITLINE "${WANT_LIBEDIT}") set (HAVE_LUA "${WITH_LUA}") include (GNUInstallDirs) -# ZyklonB is currently an odd duck but degesch follows normal XDG rules -set (zyklonb_plugin_dir ${CMAKE_INSTALL_LIBDIR}/zyklonb/plugins) configure_file (${PROJECT_SOURCE_DIR}/config.h.in ${PROJECT_BINARY_DIR}/config.h) include_directories (${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR}) @@ -187,8 +185,9 @@ add_custom_target (clang-tidy # Installation install (TARGETS zyklonb degesch kike DESTINATION ${CMAKE_INSTALL_BINDIR}) install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR}) +# XXX: our defaults for XDG_DATA_DIRS expect /usr/local/shore or /usr/share install (DIRECTORY plugins/zyklonb/ - DESTINATION ${zyklonb_plugin_dir} USE_SOURCE_PERMISSIONS) + DESTINATION ${CMAKE_INSTALL_DATADIR}/zyklonb/plugins USE_SOURCE_PERMISSIONS) install (DIRECTORY plugins/degesch/ DESTINATION ${CMAKE_INSTALL_DATADIR}/degesch/plugins) -- cgit v1.2.3