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.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user