diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-08-07 14:40:05 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-08-07 14:40:05 +0100 |
commit | 91878c78e1e95a301bccc9a3febbb61ef65b63a3 (patch) | |
tree | 2da247de728a1120db5bc4bef6dad68d7a8bab1e /CMakeLists.txt | |
parent | c8b9de60705ee1fb330e5f7d932ae132d82fdf21 (diff) | |
download | rspamd-91878c78e1e95a301bccc9a3febbb61ef65b63a3.tar.gz rspamd-91878c78e1e95a301bccc9a3febbb61ef65b63a3.zip |
Rework rules installation.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e20c93cf9..a1cdd6d6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,6 +85,10 @@ IF(NOT PLUGINSDIR) SET(PLUGINSDIR "${CMAKE_INSTALL_PREFIX}/share/rspamd") ENDIF(NOT PLUGINSDIR) +IF(NOT RULESDIR) + SET(RULESDIR "${PLUGINSDIR}/rules") +ENDIF(NOT RULESDIR) + IF(NOT WWWDIR) SET(WWWDIR "${CMAKE_INSTALL_PREFIX}/share/rspamd/www") ENDIF(NOT WWWDIR) @@ -1029,6 +1033,7 @@ SET(CONFFILES INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${CONFDIR})") INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${EXAMPLESDIR})") INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${PLUGINSDIR}/lua)") +INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${RULESDIR})") # Install configs only if they are unchanged LIST(LENGTH CONFFILES CONFLIST_COUNT) @@ -1090,13 +1095,12 @@ IF(ENABLE_REDIRECTOR MATCHES "ON") ENDIF(ENABLE_REDIRECTOR MATCHES "ON") # Lua config -INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${CONFDIR}/lua)") -FILE(GLOB_RECURSE LUA_CONFIGS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/conf/lua" - "${CMAKE_CURRENT_SOURCE_DIR}/conf/lua/*.lua") +FILE(GLOB_RECURSE LUA_CONFIGS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/rules" + "${CMAKE_CURRENT_SOURCE_DIR}/rules/*.lua") FOREACH(LUA_CONF ${LUA_CONFIGS}) GET_FILENAME_COMPONENT(_rp ${LUA_CONF} PATH) - INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${CONFDIR}/lua/${_rp})") - INSTALL(FILES "conf/lua/${LUA_CONF}" DESTINATION ${CONFDIR}/lua/${_rp}) + INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${RULESDIR}/${_rp})") + INSTALL(FILES "rules/${LUA_CONF}" DESTINATION ${RULESDIR}/${_rp}) ENDFOREACH(LUA_CONF) # systemd unit |