aboutsummaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-11-21 16:37:46 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-11-21 16:37:46 +0300
commitefe1a722f2804d5a5d7905ed80158e97f7fe01f6 (patch)
tree724976f76cf3d3cb36c1ceb41d57051cdcf59300 /debian
parent38f028f8090e7c1f8456928b76719c9e52962fa9 (diff)
downloadrspamd-efe1a722f2804d5a5d7905ed80158e97f7fe01f6.tar.gz
rspamd-efe1a722f2804d5a5d7905ed80158e97f7fe01f6.zip
* Add debian package information.
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog17
-rw-r--r--debian/compat1
-rw-r--r--debian/control17
-rw-r--r--debian/copyright33
-rw-r--r--debian/docs1
-rw-r--r--debian/rspamd-doc.docs1
-rw-r--r--debian/rspamd-doc.install1
-rw-r--r--debian/rspamd.default2
-rwxr-xr-xdebian/rspamd.init154
-rw-r--r--debian/rspamd.logrotate12
-rwxr-xr-xdebian/rules6
-rw-r--r--debian/source/format1
12 files changed, 246 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 000000000..b0b161bce
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,17 @@
+rspamd (0.4.5-1) unstable; urgency=low
+
+ * Upgrade to 0.4.5
+
+ -- Vsevolod Stakhov <vsevolod@highsecure.ru> Mon, 21 Nov 2011 17:04:33 +0400
+
+rspamd (0.4.4-1) unstable; urgency=low
+
+ * Upgrade to 0.4.4
+
+ -- Vsevolod Stakhov <vsevolod@highsecure.ru> Tue, 15 Nov 2011 17:54:33 +0400
+
+rspamd (0.4.3-1) unstable; urgency=low
+
+ * Initial release
+
+ -- Vsevolod Stakhov <vsevolod@highsecure.ru> Tue, 16 Aug 2011 17:54:33 +0400
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 000000000..7f8f011eb
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/debian/control b/debian/control
new file mode 100644
index 000000000..7c2279fe2
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,17 @@
+Source: rspamd
+Section: mail
+Priority: extra
+Maintainer: Vsevolod Stakhov <vsevolod@highsecure.ru>
+Build-Depends: debhelper (>= 7.0.50~), cmake, libevent1-dev(>= 1.3), libglib2.0-dev (>= 2.16.0), libgmime-2.4-dev, liblua5.1-0-dev, libpcre3-dev, cdbs
+Standards-Version: 3.9.1
+Homepage: https://bitbucket.org/vstakhov/rspamd/
+Vcs-Hg: https://bitbucket.org/vstakhov/rspamd/
+Vcs-Browser: https://bitbucket.org/vstakhov/rspamd/src
+
+Package: rspamd
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Fast spam filtering system
+ Rspamd is fast, modular and lightweight spam filter. It is designed to work
+ with big ammount of mail and can be easily extended with own filters written in
+ lua.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 000000000..60d1ce290
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,33 @@
+Format: http://dep.debian.net/deps/dep5
+Upstream-Name: rspamd
+Source: https://bitbucket.org/vstakhov/rspamd
+
+Files: contrib/lgpl/*
+Copyright: 1999, 2000 Scott Wimer
+Copyright: 2004, Matthias Clasen <mclasen@redhat.com>
+Copyright: 2005 - 2007, Marco Barisione <marco@barisione.org>
+License: LGPL-2+
+
+
+Files: *
+Copyright: 2008-2011 Vsevolod Stakhov <vsevolod@highsecure.ru>
+License: BSD
+
+Files: debian/*
+Copyright: 2011 Vsevolod Stakhov <vsevolod@highsecure.ru>
+License: GPL-2+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 000000000..e845566c0
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+README
diff --git a/debian/rspamd-doc.docs b/debian/rspamd-doc.docs
new file mode 100644
index 000000000..d4f454258
--- /dev/null
+++ b/debian/rspamd-doc.docs
@@ -0,0 +1 @@
+#DOCS#
diff --git a/debian/rspamd-doc.install b/debian/rspamd-doc.install
new file mode 100644
index 000000000..d4f454258
--- /dev/null
+++ b/debian/rspamd-doc.install
@@ -0,0 +1 @@
+#DOCS#
diff --git a/debian/rspamd.default b/debian/rspamd.default
new file mode 100644
index 000000000..a9246e776
--- /dev/null
+++ b/debian/rspamd.default
@@ -0,0 +1,2 @@
+RSPAMD_USERNAME=nobody
+RSPAMD_GROUPNAME=nogroup
diff --git a/debian/rspamd.init b/debian/rspamd.init
new file mode 100755
index 000000000..c8d7cd695
--- /dev/null
+++ b/debian/rspamd.init
@@ -0,0 +1,154 @@
+#! /bin/bash
+### BEGIN INIT INFO
+# Provides: rspamd
+# Required-Start: $syslog $remote_fs
+# Required-Stop: $syslog $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Rspamd spam filtering system
+# Description: Rspamd is fast and modular spam filtering system written in C
+### END INIT INFO
+
+# Author: Vsevolod Stakhov <vsevolod@highsecure.ru>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="Rspamd"
+NAME=rspamd
+DAEMON=/usr/bin/$NAME
+DAEMON_ARGS="-c /etc/rspamd.xml"
+DESC="spam filtering system"
+PIDFILE=/var/run/rspamd/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+RSPAMD_USERNAME=nobody
+RSPAMD_GROUPNAME=nogroup
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+FILES=(/etc/default/rspamd_*.conf)
+# check for alternative config schema
+if [ -r "${FILES[0]}" ]; then
+ CONFIGS=(/etc/default/rspamd_*.conf)
+else
+ CONFIGS=(/etc/default/$NAME)
+fi;
+
+CONFIG_NUM=${#CONFIGS[@]}
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+ # Return
+ # 0 if daemon has been started
+ # 1 if daemon was already running
+ # 2 if daemon could not be started
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+ || return 1
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+ $DAEMON_ARGS -u $RSPAMD_USERNAME -g $RSPAMD_GROUPNAME \
+ || return 2
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+ # Return
+ # 0 if daemon has been stopped
+ # 1 if daemon was already stopped
+ # 2 if daemon could not be stopped
+ # other if a failure occurred
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+ RETVAL="$?"
+ [ "$RETVAL" = 2 ] && return 2
+ # Wait for children to finish too if this is a daemon that forks
+ # and if the daemon is only ever run from this initscript.
+ # If the above conditions are not satisfied then add some other code
+ # that waits for the process to drop all resources that could be
+ # needed by services started subsequently. A last resort is to
+ # sleep for some time.
+ start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
+ [ "$?" = 2 ] && return 2
+ # Many daemons don't delete their pidfiles when they exit.
+ rm -f $PIDFILE
+ return "$RETVAL"
+}
+
+#
+# Function that sends a SIGHUP to the daemon/service
+#
+do_reload() {
+ start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
+ return 0
+}
+
+_retcode=0
+
+for ((i=0; i < $CONFIG_NUM; i++)); do
+ SCRIPT=${CONFIGS[${i}]}
+ . ${SCRIPT}
+ case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ status)
+ status_of_proc -p $PIDFILE "$DAEMON" "$NAME" || _retcode=$?
+ ;;
+ reload|force-reload)
+ log_daemon_msg "Reloading $DESC" "$NAME"
+ do_reload
+ log_end_msg $?
+ ;;
+ restart)
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ *)
+ echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+ exit 3
+ ;;
+ esac
+done
+exit $_retcode
+:
diff --git a/debian/rspamd.logrotate b/debian/rspamd.logrotate
new file mode 100644
index 000000000..2d0175677
--- /dev/null
+++ b/debian/rspamd.logrotate
@@ -0,0 +1,12 @@
+/var/log/rspamd/rspamd.log{
+ daily
+ rotate 4
+ delaycompress
+ compress
+ notifempty
+ missingok
+ postrotate
+ reload rspamd >/dev/null 2>&1 || true
+ endscript
+}
+
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 000000000..3ae78f020
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,6 @@
+#!/usr/bin/make -f
+
+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
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 000000000..163aaf8d8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)