INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${ETC_PREFIX}/rspamd)")
INSTALL(FILES conf/2tld.inc RENAME 2tld.inc.orig DESTINATION ${ETC_PREFIX}/rspamd)
-IF(NOT EXISTS ${ETC_PREFIX}/rspamd/2tld.inc)
+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)
+ENDIF(NOT EXISTS ${ETC_PREFIX}/rspamd/2tld.inc OR BUILD_PORT)
INSTALL(FILES conf/surbl-whitelist.inc RENAME surbl-whitelist.inc DESTINATION ${ETC_PREFIX}/rspamd)
-IF(NOT EXISTS ${ETC_PREFIX}/rspamd/surbl-whitelist.inc)
+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)
+ENDIF(NOT EXISTS ${ETC_PREFIX}/rspamd/surbl-whitelist.inc OR BUILD_PORT)
INSTALL(FILES ${CMAKE_BINARY_DIR}/conf/rspamd.xml.sample DESTINATION ${ETC_PREFIX})
FOREACH(LUA_CONF ${LUA_CONFIGS})
GET_FILENAME_COMPONENT(_rp ${LUA_CONF} PATH)
INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${ETC_PREFIX}/rspamd/lua/${_rp})")
- IF(NOT EXISTS ${DESTDIR}/${ETC_PREFIX}/rspamd/lua/${LUA_CONF})
+ IF(NOT EXISTS ${DESTDIR}/${ETC_PREFIX}/rspamd/lua/${LUA_CONF} OR BUILD_PORT)
INSTALL(FILES "conf/lua/${LUA_CONF}" DESTINATION ${ETC_PREFIX}/rspamd/lua/${_rp})
- ENDIF(NOT EXISTS ${DESTDIR}/${ETC_PREFIX}/rspamd/lua/${LUA_CONF})
+ ENDIF(NOT EXISTS ${DESTDIR}/${ETC_PREFIX}/rspamd/lua/${LUA_CONF} OR BUILD_PORT)
ENDFOREACH(LUA_CONF)
# Manual pages