From 1ac49a8c1e495dafa84f715605d1bcb014f467e9 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 6 Aug 2012 16:05:46 +0400 Subject: [PATCH] More fixes for debian. Suggested by: Laszlo Boszormenyi (GCS) --- debian/control | 2 +- debian/copyright | 33 +++++++++++++++------------------ debian/rules | 8 +++++++- lib/CMakeLists.txt | 39 ++++++++++++++++++--------------------- 4 files changed, 41 insertions(+), 41 deletions(-) diff --git a/debian/control b/debian/control index f3e454c6c..d1fac97c3 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: rspamd Section: mail Priority: extra Maintainer: Vsevolod Stakhov -Build-Depends: debhelper (>= 7.0.50~), cmake, libevent-dev(>= 1.3), libglib2.0-dev (>= 2.16.0), libgmime-2.6-dev, liblua5.1-0-dev, libpcre3-dev, cdbs +Build-Depends: debhelper (>= 7.0.50~), dpkg-dev (>= 1.16.1~), cmake, libevent-dev (>= 1.3), libglib2.0-dev (>= 2.16.0), libgmime-2.6-dev, liblua5.1-0-dev, libpcre3-dev, cdbs Standards-Version: 3.9.3 Homepage: https://bitbucket.org/vstakhov/rspamd/ Vcs-Hg: https://bitbucket.org/vstakhov/rspamd/ diff --git a/debian/copyright b/debian/copyright index fc21732bb..4fcc64092 100644 --- a/debian/copyright +++ b/debian/copyright @@ -51,27 +51,24 @@ License: Expat Files: * Copyright: 2008-2012 Vsevolod Stakhov -License: BSD-2-clause +License: BSD Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: + modification, are permitted under the terms of the BSD License. . - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. . - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - . - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL AUTHOR BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + On Debian systems, the complete text of the BSD License can be + found in `/usr/share/common-licenses/BSD'. Files: debian/* Copyright: 2011-2012 Vsevolod Stakhov diff --git a/debian/rules b/debian/rules index 66d53e314..931c80c35 100755 --- a/debian/rules +++ b/debian/rules @@ -1,6 +1,12 @@ #!/usr/bin/make -f +#export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +include /usr/share/dpkg/buildflags.mk include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/cmake.mk -DEB_CMAKE_NORMAL_ARGS+= -DETC_PREFIX=/etc -DMAN_PREFIX=/usr/share/man -DLOCALSTATES_PREFIX=/var/run -DLIBDIR=/usr/lib -DINCLUDEDIR=/usr/inlude -DNO_SHARED=ON -DDEBIAN_BUILD=1 +DEB_CMAKE_NORMAL_ARGS+= -DETC_PREFIX=/etc -DMAN_PREFIX=/usr/share/man -DLOCALSTATES_PREFIX=/var/run -DLIBDIR=/usr/lib -DINCLUDEDIR=/usr/include -DNO_SHARED=ON -DDEBIAN_BUILD=1 +clean:: + rm -f src/modules.c + diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 46f7f9fd5..c09f30875 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -84,29 +84,30 @@ IF(NO_SHARED MATCHES "OFF") ENDIF(NO_SHARED MATCHES "OFF") # Rspamd client -ADD_LIBRARY(rspamdclient SHARED ${LIBRSPAMDCLIENTSRC}) -ADD_LIBRARY(rspamdclient_static STATIC ${LIBRSPAMDCLIENTSRC}) IF(NOT DEBIAN_BUILD) -SET_TARGET_PROPERTIES(rspamdclient PROPERTIES PUBLIC_HEADER "client/librspamdclient.h") + ADD_LIBRARY(rspamdclient SHARED ${LIBRSPAMDCLIENTSRC}) + ADD_LIBRARY(rspamdclient_static STATIC ${LIBRSPAMDCLIENTSRC}) + SET_TARGET_PROPERTIES(rspamdclient PROPERTIES PUBLIC_HEADER "client/librspamdclient.h") + IF(CMAKE_COMPILER_IS_GNUCC) + SET_TARGET_PROPERTIES(rspamdclient PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing") + SET_TARGET_PROPERTIES(rspamdclient_static PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing") + ENDIF(CMAKE_COMPILER_IS_GNUCC) + TARGET_LINK_LIBRARIES(rspamdclient rspamd-util) + TARGET_LINK_LIBRARIES(rspamdclient_static ${CMAKE_REQUIRED_LIBRARIES}) + TARGET_LINK_LIBRARIES(rspamdclient_static ${GLIB2_LIBRARIES}) +ELSE(NOT DEBIAN_BUILD) + ADD_LIBRARY(rspamdclient STATIC ${LIBRSPAMDCLIENTSRC}) + IF(CMAKE_COMPILER_IS_GNUCC) + SET_TARGET_PROPERTIES(rspamdclient PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing") + ENDIF(CMAKE_COMPILER_IS_GNUCC) + TARGET_LINK_LIBRARIES(rspamdclient rspamd-util) + TARGET_LINK_LIBRARIES(rspamdclient ${CMAKE_REQUIRED_LIBRARIES}) + TARGET_LINK_LIBRARIES(rspamdclient ${GLIB2_LIBRARIES}) ENDIF(NOT DEBIAN_BUILD) -IF(CMAKE_COMPILER_IS_GNUCC) -SET_TARGET_PROPERTIES(rspamdclient PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing") -SET_TARGET_PROPERTIES(rspamdclient_static PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing") -ENDIF(CMAKE_COMPILER_IS_GNUCC) - -TARGET_LINK_LIBRARIES(rspamdclient rspamd-util) - -TARGET_LINK_LIBRARIES(rspamdclient_static ${CMAKE_REQUIRED_LIBRARIES}) -TARGET_LINK_LIBRARIES(rspamdclient_static ${GLIB2_LIBRARIES}) - - IF(NOT DEBIAN_BUILD) SET_TARGET_PROPERTIES(rspamdclient PROPERTIES VERSION ${RSPAMD_VERSION}) SET_TARGET_PROPERTIES(rspamdclient_static PROPERTIES VERSION ${RSPAMD_VERSION}) -ELSE(NOT DEBIAN_BUILD) - SET_TARGET_PROPERTIES(rspamdclient PROPERTIES SOVERSION ${RSPAMD_VERSION}) - SET_TARGET_PROPERTIES(rspamdclient PROPERTIES VERSION ${RSPAMD_VERSION}) ENDIF(NOT DEBIAN_BUILD) IF(GLIB_COMPAT) @@ -119,10 +120,6 @@ IF(NOT DEBIAN_BUILD) LIBRARY DESTINATION ${LIBDIR} PUBLIC_HEADER DESTINATION ${INCLUDEDIR} ARCHIVE DESTINATION ${LIBDIR}) -ELSE(NOT DEBIAN_BUILD) - INSTALL(TARGETS rspamdclient - LIBRARY DESTINATION ${LIBDIR} - NAMELINK_SKIP) ENDIF(NOT DEBIAN_BUILD) -- 2.39.5