aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-02-02 23:27:55 +0400
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-02-02 23:27:55 +0400
commit9fb28304cde41c5e3e4bd17daaad715337a6878c (patch)
treedf5c319a2f77b3dd0cd78f1e393dfe93770b0d77 /CMakeLists.txt
parent395bb422be0ff0293a7e6fe435014050950256ce (diff)
downloadrspamd-9fb28304cde41c5e3e4bd17daaad715337a6878c.tar.gz
rspamd-9fb28304cde41c5e3e4bd17daaad715337a6878c.zip
Final update for 0.5.4.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt60
1 files changed, 11 insertions, 49 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0432fc3c1..3ea4e2ea1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,13 +10,16 @@ PROJECT(rspamd C)
SET(RSPAMD_VERSION_MAJOR 0)
SET(RSPAMD_VERSION_MINOR 5)
-SET(RSPAMD_VERSION_PATCH 3)
+SET(RSPAMD_VERSION_PATCH 4)
SET(RSPAMD_VERSION "${RSPAMD_VERSION_MAJOR}.${RSPAMD_VERSION_MINOR}.${RSPAMD_VERSION_PATCH}")
SET(RSPAMD_MASTER_SITE_URL "http://bitbucket.org/vstakhov/rspamd")
-SET(RSPAMD_USER "nobody")
-SET(RSPAMD_GROUP "nobody")
+
+IF(NOT RSPAMD_USER)
+ SET(RSPAMD_USER "nobody")
+ SET(RSPAMD_GROUP "nobody")
+ENDIF(NOT RSPAMD_USER)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
@@ -1060,7 +1063,9 @@ 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 ${CMAKE_BINARY_DIR}/conf/rspamd.xml.sample DESTINATION ${ETC_PREFIX})
+IF(NOT DEBIAN_BUILD)
+ INSTALL(FILES ${CMAKE_BINARY_DIR}/conf/rspamd.xml.sample DESTINATION ${ETC_PREFIX})
+ENDIF(NOT DEBIAN_BUILD)
# Lua plugins
INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${ETC_PREFIX}/rspamd/plugins/lua)")
@@ -1094,51 +1099,8 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT BUILD_PORT)
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")
+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")
-
-# CPack section
-SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libevent-1.4-2, libgmime-2.0-2a")
-SET(CPACK_PACKAGE_CONTACT "vsevolod@highsecure.ru")
-SET(CPACK_PACKAGE_NAME rspamd)
-SET(CPACK_SOURCE_IGNORE_FILES "\\\\.swp$" "/\\\\.hg/")
-SET(CPACK_PACKAGE_VERSION_MAJOR ${RSPAMD_VERSION_MAJOR})
-SET(CPACK_PACKAGE_VERSION_MINOR ${RSPAMD_VERSION_MINOR})
-SET(CPACK_PACKAGE_VERSION_PATCH ${RSPAMD_VERSION_PATCH})
-INCLUDE(CPack)
-
-IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- INCLUDE("linux/cmake/DpkgDeb.cmake")
-ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
-
-IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
- INCLUDE("freebsd/cmake/PkgCreate.cmake")
-ENDIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
-
-SET(RPMNAME "rspamd")
-SET(PACKAGE_NAME "rspamd")
-SET(PACKAGE_RELEASE "1")
-SET(PACKAGE_SECTION "mail")
-SET(PACKAGE_PRIORITY "optional")
-SET(PACKAGE_HOMEPAGE "http://bitbucket.org/vstakhov/rspamd")
-SET(PACKAGE_MAINTAINER_NAME "vstakhov")
-SET(PACKAGE_MAINTAINER_EMAIL "vsevolod@highsecure.ru")
-SET(PACKAGE_DESCRIPTION_SUMMARY "rspamd - fast and modular antispam system written in C")
-SET(PACKAGE_DESCRIPTION "Fast and modular antispam system written in C")
-IF(GMIME24)
- SET(PACKAGE_DEPENDS "libc6, libevent-1.4-2, libgmime-2.4-2, liblua5.1-0, libxml-parser-perl, libterm-readkey-perl, libglib2.0-0")
-ELSE(GMIME24)
- SET(PACKAGE_DEPENDS "libc6, libevent-1.4-2, libgmime-2.0-2, libxml-parser-perl, libterm-readkey-perl, libglib2.0-0")
-ENDIF(GMIME24)
-
-SET(PACKAGE_VERSION "${RSPAMD_VERSION_MAJOR}.${RSPAMD_VERSION_MINOR}.${RSPAMD_VERSION_PATCH}")
-
-IF(DPKG_FOUND STREQUAL "YES")
- ADD_DEBIAN_PACKAGE("rspamd")
-ENDIF(DPKG_FOUND STREQUAL "YES")
-IF(PKGCREATE_FOUND STREQUAL "YES")
- ADD_FREEBSD_PACKAGE("rspamd" "freebsd/rspamd.plist")
-ENDIF(PKGCREATE_FOUND STREQUAL "YES")
+ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT DEBIAN_BUILD)