# Build optimized code for following CPU (default i386)
#SET(CPU_TUNE "i686")
+# Now CMAKE_INSTALL_PREFIX is a base prefix for everything
+# CONFDIR - for configuration
+# MANDIR - for manual pages
+# RUNDIR - for runtime files
+# DBDIR - for static files
+# LOGDIR - for log files
+# EXAMPLESDIR - for examples files
+
+IF(NOT CONFDIR)
+ SET(CONFDIR "${CMAKE_INSTALL_PREFIX}/etc/rspamd")
+ENDIF(NOT CONFDIR)
+
+IF(NOT MANDIR)
+ SET(MANDIR "${CMAKE_INSTALL_PREFIX}/share/man")
+ENDIF(NOT MANDIR)
+
+IF(NOT RUNDIR)
+ SET(RUNDIR "${CMAKE_INSTALL_PREFIX}/var/run/rspamd")
+ENDIF(NOT RUNDIR)
+
+IF(NOT DBDIR)
+ SET(DBDIR "${CMAKE_INSTALL_PREFIX}/var/lib/rspamd")
+ENDIF(NOT DBDIR)
+
+IF(NOT LOGDIR)
+ SET(LOGDIR "${CMAKE_INSTALL_PREFIX}/var/log/rspamd")
+ENDIF(NOT LOGDIR)
+
+IF(NOT EXAMPLESDIR)
+ SET(EXAMPLESDIR "${CMAKE_INSTALL_PREFIX}/share/examples/rspamd")
+ENDIF(NOT EXAMPLESDIR)
+
+IF(NOT PLUGINSDIR)
+ SET(PLUGINSDIR "${CMAKE_INSTALL_PREFIX}/share/rspamd")
+ENDIF(NOT PLUGINSDIR)
+
############################# INCLUDE SECTION #############################################
INCLUDE(CheckIncludeFiles)
IF(ENABLE_REDIRECTOR MATCHES "ON")
CONFIGURE_FILE(freebsd/redirector.sh.in freebsd/redirector @ONLY)
ENDIF(ENABLE_REDIRECTOR MATCHES "ON")
- IF(CMAKE_INSTALL_PREFIX)
- IF(NOT ETC_PREFIX)
- SET(ETC_PREFIX "${CMAKE_INSTALL_PREFIX}/etc")
- ENDIF(NOT ETC_PREFIX)
- IF(NOT MAN_PREFIX)
- SET(MAN_PREFIX "${CMAKE_INSTALL_PREFIX}/man")
- ENDIF(NOT MAN_PREFIX)
- IF(NOT LOCALSTATES_PREFIX)
- SET(LOCALSTATES_PREFIX "${CMAKE_INSTALL_PREFIX}/var/run/rspamd")
- ENDIF(NOT LOCALSTATES_PREFIX)
- SET(PREFIX "${CMAKE_INSTALL_PREFIX}")
- ELSE(CMAKE_INSTALL_PREFIX)
- IF(NOT ETC_PREFIX)
- SET(ETC_PREFIX /usr/local/etc)
- ENDIF(NOT ETC_PREFIX)
- IF(NOT MAN_PREFIX)
- SET(MAN_PREFIX /usr/local/man)
- ENDIF(NOT MAN_PREFIX)
- IF(NOT LOCALSTATES_PREFIX)
- SET(LOCALSTATES_PREFIX "/var/run/rspamd")
- ENDIF(NOT LOCALSTATES_PREFIX)
- IF(NOT PREFIX)
- SET(PREFIX /usr/local)
- ENDIF(NOT PREFIX)
- ENDIF(CMAKE_INSTALL_PREFIX)
FIND_LIBRARY(LIBINTL_LIBRARY NAMES intl PATHS /lib
/opt/lib
/usr/lib
IF(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_BSD_SOURCE -DDARWIN")
-
- IF(CMAKE_INSTALL_PREFIX)
- IF(NOT ETC_PREFIX)
- SET(ETC_PREFIX "${CMAKE_INSTALL_PREFIX}/etc")
- ENDIF(NOT ETC_PREFIX)
- IF(NOT MAN_PREFIX)
- SET(MAN_PREFIX "${CMAKE_INSTALL_PREFIX}/man")
- ENDIF(NOT MAN_PREFIX)
- IF(NOT LOCALSTATES_PREFIX)
- SET(LOCALSTATES_PREFIX "${CMAKE_INSTALL_PREFIX}/var/run/rspamd")
- ENDIF(NOT LOCALSTATES_PREFIX)
- SET(PREFIX "${CMAKE_INSTALL_PREFIX}")
- ELSE(CMAKE_INSTALL_PREFIX)
- IF(NOT ETC_PREFIX)
- SET(ETC_PREFIX /usr/local/etc)
- ENDIF(NOT ETC_PREFIX)
- IF(NOT MAN_PREFIX)
- SET(MAN_PREFIX /usr/local/man)
- ENDIF(NOT MAN_PREFIX)
- IF(NOT LOCALSTATES_PREFIX)
- SET(LOCALSTATES_PREFIX "/var/run/rspamd")
- ENDIF(NOT LOCALSTATES_PREFIX)
- IF(NOT PREFIX)
- SET(PREFIX /usr/local)
- ENDIF(NOT PREFIX)
- ENDIF(CMAKE_INSTALL_PREFIX)
FIND_LIBRARY(LIBINTL_LIBRARY NAMES intl PATHS /lib
/opt/lib
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE -DLINUX")
- IF(CMAKE_INSTALL_PREFIX)
- IF(NOT ETC_PREFIX)
- SET(ETC_PREFIX "${CMAKE_INSTALL_PREFIX}/etc")
- ENDIF(NOT ETC_PREFIX)
-
- IF(NOT MAN_PREFIX)
- SET(MAN_PREFIX "${CMAKE_INSTALL_PREFIX}/share/man")
- ENDIF(NOT MAN_PREFIX)
- IF(NOT LOCALSTATES_PREFIX)
- SET(LOCALSTATES_PREFIX "${CMAKE_INSTALL_PREFIX}/var/run/rspamd")
- ENDIF(NOT LOCALSTATES_PREFIX)
-
- SET(PREFIX "${CMAKE_INSTALL_PREFIX}")
- ELSE(CMAKE_INSTALL_PREFIX)
- IF(NOT ETC_PREFIX)
- SET(ETC_PREFIX /etc)
- ENDIF(NOT ETC_PREFIX)
- IF(NOT PREFIX)
- SET(PREFIX /usr)
- ENDIF(NOT PREFIX)
- IF(NOT MAN_PREFIX)
- SET(MAN_PREFIX /usr/share/man)
- ENDIF(NOT MAN_PREFIX)
- IF(NOT LOCALSTATES_PREFIX)
- SET(LOCALSTATES_PREFIX "/var/run/rspamd")
- ENDIF(NOT LOCALSTATES_PREFIX)
- ENDIF(CMAKE_INSTALL_PREFIX)
IF(BUILD_CPU_MODE STREQUAL "32")
SET(CMAKE_C_FLAGS "-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE ${CMAKE_C_FLAGS}")
ENDIF(BUILD_CPU_MODE STREQUAL "32")
ENDIF (BUILD_CPU_MODE STREQUAL "32")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__EXTENSIONS__ -DSOLARIS -D_POSIX_SOURCE -D_POSIX_C_SOURCE=200112L")
-
- IF(CMAKE_INSTALL_PREFIX)
- IF(NOT ETC_PREFIX)
- SET(ETC_PREFIX "${CMAKE_INSTALL_PREFIX}/etc")
- ENDIF(NOT ETC_PREFIX)
- IF(NOT MAN_PREFIX)
- SET(MAN_PREFIX "${CMAKE_INSTALL_PREFIX}/man")
- ENDIF(NOT MAN_PREFIX)
- IF(NOT LOCALSTATES_PREFIX)
- SET(LOCALSTATES_PREFIX "/var/run/rspamd")
- ENDIF(NOT LOCALSTATES_PREFIX)
- SET(PREFIX "${CMAKE_INSTALL_PREFIX}")
- ELSE(CMAKE_INSTALL_PREFIX)
- IF(NOT ETC_PREFIX)
- SET(ETC_PREFIX /etc)
- ENDIF(NOT ETC_PREFIX)
- IF(NOT PREFIX)
- SET(PREFIX /usr)
- ENDIF(NOT PREFIX)
- IF(NOT MAN_PREFIX)
- SET(MAN_PREFIX /usr/share/man)
- ENDIF(NOT MAN_PREFIX)
- IF(NOT LOCALSTATES_PREFIX)
- SET(LOCALSTATES_PREFIX "/var/run/rspamd")
- ENDIF(NOT LOCALSTATES_PREFIX)
- ENDIF(CMAKE_INSTALL_PREFIX)
LIST(APPEND CMAKE_REQUIRED_LIBRARIES rt)
LIST(APPEND CMAKE_REQUIRED_LIBRARIES dl)
SET(INCLUDEDIR include/rspamd)
ENDIF(NOT INCLUDEDIR)
-# Check prefixes
-IF(NOT ETC_PREFIX)
- IF(CMAKE_INSTALL_PREFIX)
- MESSAGE(WARNING "Your system is unknown for rspamd, assume defining ETC_PREFIX and MAN_PREFIX by -D option, now ETC_PREFIX and MAN_PREFIX are relative to ${CMAKE_INSTALL_PREFIX}")
- SET(ETC_PREFIX "${CMAKE_INSTALL_PREFIX}/etc")
- ELSE(CMAKE_INSTALL_PREFIX)
- MESSAGE(FATAL_ERROR "Your system is unknown for rspamd and no CMAKE_INSTALL_PREFIX specified, assume defining CMAKE_INSTALL_PREFIX")
- ENDIF(CMAKE_INSTALL_PREFIX)
- MESSAGE(STATUS "Configuring for ${CMAKE_SYSTEM_NAME}")
-ENDIF(NOT ETC_PREFIX)
-IF(NOT MAN_PREFIX)
- IF(CMAKE_INSTALL_PREFIX)
- SET(MAN_PREFIX "${CMAKE_INSTALL_PREFIX}/man")
- ENDIF(CMAKE_INSTALL_PREFIX)
-ENDIF(NOT MAN_PREFIX)
-IF(NOT LOCALSTATES_PREFIX)
- IF(CMAKE_INSTALL_PREFIX)
- SET(LOCALSTATES_PREFIX "${CMAKE_INSTALL_PREFIX}/var/run/rspamd")
- ENDIF(CMAKE_INSTALL_PREFIX)
-ENDIF(NOT LOCALSTATES_PREFIX)
-
-# Now CMAKE_INSTALL_PREFIX is a base prefix for everything
-# ETC_PREFIX - for configuration
-# MAN_PREFIX - for manual pages
-# LOCALSTATES_PREFIX - for runtime files
-
# Now find libraries and headers
# Find lua libraries
CONFIGURE_FILE(config.h.in src/config.h)
CONFIGURE_FILE(contrib/exim/local_scan.c.in contrib/exim/local_scan_rspamd.c @ONLY)
-CONFIGURE_FILE(conf/rspamd-basic.xml.in conf/rspamd.xml.sample @ONLY)
######################### LINK SECTION ###############################
INSTALL(TARGETS rspamd RUNTIME DESTINATION bin)
# Configs
-INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${ETC_PREFIX}/rspamd)")
-
-INSTALL(FILES conf/2tld.inc RENAME 2tld.inc DESTINATION ${ETC_PREFIX}/rspamd)
-IF(NOT EXISTS ${ETC_PREFIX}/rspamd/2tld.inc OR BUILD_PORT)
- INSTALL(FILES conf/2tld.inc DESTINATION ${ETC_PREFIX}/rspamd)
-ENDIF(NOT EXISTS ${ETC_PREFIX}/rspamd/2tld.inc OR BUILD_PORT)
+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(FILES conf/surbl-whitelist.inc RENAME surbl-whitelist.inc DESTINATION ${ETC_PREFIX}/rspamd)
-IF(NOT EXISTS ${ETC_PREFIX}/rspamd/surbl-whitelist.inc OR BUILD_PORT)
- INSTALL(FILES conf/surbl-whitelist.inc DESTINATION ${ETC_PREFIX}/rspamd)
-ENDIF(NOT EXISTS ${ETC_PREFIX}/rspamd/surbl-whitelist.inc OR BUILD_PORT)
+INSTALL(FILES conf/2tld.inc RENAME 2tld.inc DESTINATION ${CONFDIR})
-IF(NOT DEBIAN_BUILD)
- INSTALL(FILES ${CMAKE_BINARY_DIR}/conf/rspamd.xml.sample DESTINATION ${ETC_PREFIX})
-ENDIF(NOT DEBIAN_BUILD)
+INSTALL(FILES conf/surbl-whitelist.inc RENAME surbl-whitelist.inc DESTINATION ${CONFDIR})
# Lua plugins
-INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${ETC_PREFIX}/rspamd/plugins/lua)")
-FILE(GLOB LUA_PLUGINS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/src/plugins/lua" "${CMAKE_CURRENT_SOURCE_DIR}/src/plugins/lua/*.lua" )
+FILE(GLOB LUA_PLUGINS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/src/plugins/lua"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src/plugins/lua/*.lua" )
FOREACH(LUA_PLUGIN ${LUA_PLUGINS})
GET_FILENAME_COMPONENT(_rp ${LUA_PLUGIN} PATH)
- INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${ETC_PREFIX}/rspamd/plugins/lua/${_rp})")
- INSTALL(FILES "src/plugins/lua/${LUA_PLUGIN}" DESTINATION ${ETC_PREFIX}/rspamd/plugins/lua/${_rp})
+ INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${PLUGINSDIR}/lua/${_rp})")
+ INSTALL(FILES "src/plugins/lua/${LUA_PLUGIN}" DESTINATION ${PLUGINSDIR}/lua/${_rp})
ENDFOREACH(LUA_PLUGIN)
# Lua config
-INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${ETC_PREFIX}/rspamd/lua)")
-FILE(GLOB_RECURSE LUA_CONFIGS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/conf/lua" "${CMAKE_CURRENT_SOURCE_DIR}/conf/lua/*.lua")
+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")
FOREACH(LUA_CONF ${LUA_CONFIGS})
GET_FILENAME_COMPONENT(_rp ${LUA_CONF} PATH)
- INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${ETC_PREFIX}/rspamd/lua/${_rp})")
- INSTALL(FILES "conf/lua/${LUA_CONF}" DESTINATION ${ETC_PREFIX}/rspamd/lua/${_rp})
+ INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${CONFDIR}/lua/${_rp})")
+ INSTALL(FILES "conf/lua/${LUA_CONF}" DESTINATION ${CONFDIR}/lua/${_rp})
ENDFOREACH(LUA_CONF)
# Manual pages
-INSTALL(FILES "doc/rspamd.8" DESTINATION ${MAN_PREFIX}/man8)
-INSTALL(FILES "doc/rspamc.1" DESTINATION ${MAN_PREFIX}/man1)
-
-# Start scripts
-IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT BUILD_PORT)
- INSTALL(PROGRAMS ${CMAKE_BINARY_DIR}/freebsd/rspamd DESTINATION ${ETC_PREFIX}/rc.d)
- IF(ENABLE_REDIRECTOR MATCHES "ON")
- INSTALL(PROGRAMS ${CMAKE_BINARY_DIR}/freebsd/redirector DESTINATION ${ETC_PREFIX}/rc.d)
- ENDIF(ENABLE_REDIRECTOR MATCHES "ON")
- INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}/${LOCALSTATES_PREFIX})")
- INSTALL(CODE "EXECUTE_PROCESS(COMMAND chown ${RSPAMD_USER}:${RSPAMD_GROUP} \$ENV{DESTDIR}/${LOCALSTATES_PREFIX})")
-ENDIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT BUILD_PORT)
-IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT DEBIAN_BUILD)
- INSTALL(PROGRAMS "linux/${LINUX_START_SCRIPT}" DESTINATION ${ETC_PREFIX}/init.d RENAME rspamd)
- INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}/${LOCALSTATES_PREFIX})")
- INSTALL(CODE "EXECUTE_PROCESS(COMMAND chown ${RSPAMD_USER}:${RSPAMD_GROUP} \$ENV{DESTDIR}/${LOCALSTATES_PREFIX})")
-ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT DEBIAN_BUILD)
+INSTALL(FILES "doc/rspamd.8" DESTINATION ${MANDIR}/man8)
+INSTALL(FILES "doc/rspamc.1" DESTINATION ${MANDIR}/man1)
\ No newline at end of file
/*
* Variables:
* $CONFDIR - configuration directory
- * $LOCALSTATESDIR - local states directory
- * $INSTALLPREFIX - installation prefix
+ * $RUNDIR - local states directory
+ * $DBDIR - databases dir
+ * $LOGDIR - logs dir
+ * $PLUGINSDIR - pluggins dir
+ * $PREFIX - installation prefix
* $VERSION - rspamd version
*/
#define RSPAMD_CONFDIR_MACRO "CONFDIR"
-#define RSPAMD_LOCALSTATESDIR_MACRO "LOCALSTATESDIR"
-#define RSPAMD_INSTALLPREFIX_MACRO "INSTALLPREFIX"
+#define RSPAMD_RUNDIR_MACRO "RUNDIR"
+#define RSPAMD_DBDIR_MACRO "DBDIR"
+#define RSPAMD_LOGDIR_MACRO "LOGDIR"
+#define RSPAMD_PLUGINSDIR_MACRO "PLUGINSDIR"
+#define RSPAMD_PREFIX_MACRO "PREFIX"
#define RSPAMD_VERSION_MACRO "VERSION"
static const gchar *
switch (*in) {
case 'C':
if (strncmp (in, RSPAMD_CONFDIR_MACRO, sizeof (RSPAMD_CONFDIR_MACRO) - 1) == 0) {
- *len += sizeof (ETC_PREFIX) - 1;
+ *len += sizeof (RSPAMD_CONFDIR) - 1;
in += sizeof (RSPAMD_CONFDIR_MACRO) - 1;
}
break;
+ case 'R':
+ if (strncmp (in, RSPAMD_RUNDIR_MACRO, sizeof (RSPAMD_RUNDIR_MACRO) - 1) == 0) {
+ *len += sizeof (RSPAMD_RUNDIR) - 1;
+ in += sizeof (RSPAMD_RUNDIR_MACRO) - 1;
+ }
+ break;
+ case 'D':
+ if (strncmp (in, RSPAMD_DBDIR_MACRO, sizeof (RSPAMD_DBDIR_MACRO) - 1) == 0) {
+ *len += sizeof (RSPAMD_DBDIR) - 1;
+ in += sizeof (RSPAMD_DBDIR_MACRO) - 1;
+ }
+ break;
case 'L':
- if (strncmp (in, RSPAMD_LOCALSTATESDIR_MACRO, sizeof (RSPAMD_LOCALSTATESDIR_MACRO) - 1) == 0) {
- *len += sizeof (LOCALSTATES_PREFIX) - 1;
- in += sizeof (RSPAMD_LOCALSTATESDIR_MACRO) - 1;
+ if (strncmp (in, RSPAMD_LOGDIR_MACRO, sizeof (RSPAMD_LOGDIR_MACRO) - 1) == 0) {
+ *len += sizeof (RSPAMD_LOGDIR) - 1;
+ in += sizeof (RSPAMD_LOGDIR_MACRO) - 1;
}
break;
- case 'I':
- if (strncmp (in, RSPAMD_INSTALLPREFIX_MACRO, sizeof (RSPAMD_INSTALLPREFIX_MACRO) - 1) == 0) {
- *len += sizeof (CMAKE_PREFIX) - 1;
- in += sizeof (RSPAMD_INSTALLPREFIX_MACRO) - 1;
+ case 'P':
+ if (strncmp (in, RSPAMD_PREFIX_MACRO, sizeof (RSPAMD_PREFIX_MACRO) - 1) == 0) {
+ *len += sizeof (RSPAMD_PREFIX) - 1;
+ in += sizeof (RSPAMD_PREFIX_MACRO) - 1;
+ }
+ else if (strncmp (in, RSPAMD_PLUGINSDIR_MACRO, sizeof (RSPAMD_PLUGINSDIR_MACRO) - 1) == 0) {
+ *len += sizeof (RSPAMD_PLUGINSDIR) - 1;
+ in += sizeof (RSPAMD_PLUGINSDIR_MACRO) - 1;
}
break;
case 'V':
switch (*v) {
case 'C':
if (strncmp (v, RSPAMD_CONFDIR_MACRO, sizeof (RSPAMD_CONFDIR_MACRO) - 1) == 0) {
- memcpy (d, ETC_PREFIX, sizeof (ETC_PREFIX) - 1);
- d += sizeof (ETC_PREFIX) - 1;
+ memcpy (d, RSPAMD_CONFDIR, sizeof (RSPAMD_CONFDIR) - 1);
+ d += sizeof (RSPAMD_CONFDIR) - 1;
in += sizeof (RSPAMD_CONFDIR_MACRO) - 1;
}
break;
+ case 'R':
+ if (strncmp (v, RSPAMD_RUNDIR_MACRO, sizeof (RSPAMD_RUNDIR_MACRO) - 1) == 0) {
+ memcpy (d, RSPAMD_RUNDIR, sizeof (RSPAMD_RUNDIR) - 1);
+ d += sizeof (RSPAMD_RUNDIR) - 1;
+ in += sizeof (RSPAMD_RUNDIR_MACRO) - 1;
+ }
+ break;
+ case 'D':
+ if (strncmp (v, RSPAMD_DBDIR_MACRO, sizeof (RSPAMD_DBDIR_MACRO) - 1) == 0) {
+ memcpy (d, RSPAMD_DBDIR, sizeof (RSPAMD_DBDIR) - 1);
+ d += sizeof (RSPAMD_DBDIR) - 1;
+ in += sizeof (RSPAMD_DBDIR_MACRO) - 1;
+ }
+ break;
case 'L':
- if (strncmp (v, RSPAMD_LOCALSTATESDIR_MACRO, sizeof (RSPAMD_LOCALSTATESDIR_MACRO) - 1) == 0) {
- memcpy (d, LOCALSTATES_PREFIX, sizeof (LOCALSTATES_PREFIX) - 1);
- d += sizeof (LOCALSTATES_PREFIX) - 1;
- in += sizeof (RSPAMD_LOCALSTATESDIR_MACRO) - 1;
+ if (strncmp (v, RSPAMD_LOGDIR_MACRO, sizeof (RSPAMD_LOGDIR_MACRO) - 1) == 0) {
+ memcpy (d, RSPAMD_LOGDIR, sizeof (RSPAMD_LOGDIR) - 1);
+ d += sizeof (RSPAMD_LOGDIR) - 1;
+ in += sizeof (RSPAMD_LOGDIR_MACRO) - 1;
}
break;
- case 'I':
- if (strncmp (v, RSPAMD_INSTALLPREFIX_MACRO, sizeof (RSPAMD_INSTALLPREFIX_MACRO) - 1) == 0) {
- memcpy (d, CMAKE_PREFIX, sizeof (CMAKE_PREFIX) - 1);
- d += sizeof (CMAKE_PREFIX) - 1;
- in += sizeof (RSPAMD_INSTALLPREFIX_MACRO) - 1;
+ case 'P':
+ if (strncmp (v, RSPAMD_PREFIX_MACRO, sizeof (RSPAMD_PREFIX_MACRO) - 1) == 0) {
+ memcpy (d, RSPAMD_PREFIX, sizeof (RSPAMD_PREFIX) - 1);
+ d += sizeof (RSPAMD_PREFIX) - 1;
+ in += sizeof (RSPAMD_PREFIX_MACRO) - 1;
+ }
+ else if (strncmp (v, RSPAMD_PLUGINSDIR_MACRO, sizeof (RSPAMD_PLUGINSDIR_MACRO) - 1) == 0) {
+ memcpy (d, RSPAMD_PLUGINSDIR, sizeof (RSPAMD_PLUGINSDIR) - 1);
+ d += sizeof (RSPAMD_PLUGINSDIR) - 1;
+ in += sizeof (RSPAMD_PLUGINSDIR_MACRO) - 1;
}
break;
case 'V':