aboutsummaryrefslogtreecommitdiffstats
path: root/mail/rspamd-devel
diff options
context:
space:
mode:
authorvsevolod <vsevolod@FreeBSD.org>2015-12-18 00:29:22 +0800
committervsevolod <vsevolod@FreeBSD.org>2015-12-18 00:29:22 +0800
commit0a8983b9c1684a711e1c95ba294cf4fd722811d5 (patch)
treeb44d92a157d164a455ca75fce1ff09c5073a5b9b /mail/rspamd-devel
parenteb099e1f0f740084822cdf50bb2bae314896c92b (diff)
downloadfreebsd-ports-gnome-0a8983b9c1684a711e1c95ba294cf4fd722811d5.tar.gz
freebsd-ports-gnome-0a8983b9c1684a711e1c95ba294cf4fd722811d5.tar.zst
freebsd-ports-gnome-0a8983b9c1684a711e1c95ba294cf4fd722811d5.zip
Add rspamd-devel - development version of rspamd spam filter
Diffstat (limited to 'mail/rspamd-devel')
-rw-r--r--mail/rspamd-devel/Makefile89
-rw-r--r--mail/rspamd-devel/distinfo2
-rw-r--r--mail/rspamd-devel/files/patch-CMakeLists.txt22
-rw-r--r--mail/rspamd-devel/files/rspamd.in58
-rw-r--r--mail/rspamd-devel/files/rspamd_redirector.in31
-rw-r--r--mail/rspamd-devel/pkg-descr5
-rw-r--r--mail/rspamd-devel/pkg-plist100
7 files changed, 307 insertions, 0 deletions
diff --git a/mail/rspamd-devel/Makefile b/mail/rspamd-devel/Makefile
new file mode 100644
index 000000000000..97e0e79feea5
--- /dev/null
+++ b/mail/rspamd-devel/Makefile
@@ -0,0 +1,89 @@
+# $FreeBSD$
+
+PORTNAME= rspamd
+PORTVERSION= 1.1.0.a.17122015
+CATEGORIES= mail
+MASTER_SITES= http://rspamd.com/downloads/
+
+MAINTAINER= vsevolod@FreeBSD.org
+COMMENT= Fast spam filtering system dev version
+
+LICENSE= BSD2CLAUSE
+
+LIB_DEPENDS= libpcre.so:${PORTSDIR}/devel/pcre \
+ libgmime-2.4.so:${PORTSDIR}/mail/gmime24 \
+ libevent.so:${PORTSDIR}/devel/libevent2 \
+ libluajit-5.1.so:${PORTSDIR}/lang/luajit \
+ libhiredis.so:${PORTSDIR}/databases/hiredis
+
+RSPAMD_VERSION= 1.1.0
+CONFLICTS_INSTALL= rspamd
+WRKSRC= ${WRKDIR}/${PORTNAME}-${RSPAMD_VERSION}
+
+OPTIONS_DEFINE= GPERF REDIRECTOR
+GPERF_DESC= google perf-tools profiling
+REDIRECTOR_DESC= Install HTTP redirector
+
+USE_RC_SUBR= rspamd
+
+PLIST_SUB+= ETCDIR=etc/rspamd \
+ RSPAMDVERSION=${RSPAMD_VERSION}
+CMAKE_ARGS+= -DCONFDIR=${PREFIX}/etc/rspamd \
+ -DLOGDIR=/var/log/rspamd \
+ -DDBDIR=/var/db/rspamd \
+ -DRUNDIR=/var/run/rspamd \
+ -DMANDIR=${MANPREFIX}/man \
+ -DCMAKE_INSTALL_PREFIX=${PREFIX} \
+ -DBUILD_PORT=yes \
+ -DFORCE_GMIME24=yes \
+ -DLIBDIR=${PREFIX}/lib/rspamd \
+ -DNO_SHARED=ON
+
+USES= cmake:outsource gettext iconv pkgconfig tar:xz perl5 \
+ compiler:c11
+USE_LDCONFIG= yes
+USE_PERL5= build
+
+USE_GNOME= glib20
+USE_OPENSSL= yes
+USE_SQLITE= yes
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MGPERF}
+ CMAKE_ARGS+= -DENABLE_GPERF_TOOLS=ON
+ LIB_DEPENDS+= libprofiler.so:${PORTSDIR}/devel/google-perftools
+.endif
+
+.if ${PORT_OPTIONS:MREDIRECTOR}
+ USE_PERL5+= run
+ CMAKE_ARGS+= -DENABLE_REDIRECTOR=ON
+ PLIST_SUB+= REDIRECTOR=""
+ USE_RC_SUBR+= rspamd_redirector
+ RUN_DEPENDS+= \
+ p5-IO-Socket-SSL>=0:${PORTSDIR}/security/p5-IO-Socket-SSL \
+ p5-IO-String>=0:${PORTSDIR}/devel/p5-IO-String \
+ p5-XML-Parser>=0:${PORTSDIR}/textproc/p5-XML-Parser \
+ p5-Term-ReadKey>=0:${PORTSDIR}/devel/p5-Term-ReadKey \
+ p5-POE-Component-Client-DNS>=0:${PORTSDIR}/dns/p5-POE-Component-Client-DNS \
+ p5-POE-Component-Client-HTTP>=0:${PORTSDIR}/www/p5-POE-Component-Client-HTTP \
+ p5-POE-Component-Server-HTTP>=0:${PORTSDIR}/www/p5-POE-Component-Server-HTTP \
+ p5-Cache-Memcached-Fast>=0:${PORTSDIR}/databases/p5-Cache-Memcached-Fast \
+ p5-Proc-PidUtil>=0:${PORTSDIR}/sysutils/p5-Proc-PidUtil \
+ p5-Proc-Daemon>=0:${PORTSDIR}/devel/p5-Proc-Daemon \
+ p5-SWF-File>=0:${PORTSDIR}/graphics/p5-SWF-File
+.else
+ PLIST_SUB+= REDIRECTOR="@comment "
+.endif
+
+post-stage:
+ ${INSTALL} -d \
+ ${STAGEDIR}/var/log/rspamd \
+ ${STAGEDIR}/var/db/rspamd \
+ ${STAGEDIR}/var/run/rspamd
+ # Linux specific
+ ${RM} ${STAGEDIR}/${ETCDIR}/rspamd.systemd.conf
+ # No need, since rspamd.conf.sample is a same
+ ${RM} ${STAGEDIR}/${ETCDIR}/rspamd.sysvinit.conf
+
+.include <bsd.port.mk>
diff --git a/mail/rspamd-devel/distinfo b/mail/rspamd-devel/distinfo
new file mode 100644
index 000000000000..3f36c9fdf372
--- /dev/null
+++ b/mail/rspamd-devel/distinfo
@@ -0,0 +1,2 @@
+SHA256 (rspamd-1.1.0.a.17122015.tar.xz) = 7fbc96177d9fd563068586dc020489463582d63938813ab0cbf337ef0baf80ad
+SIZE (rspamd-1.1.0.a.17122015.tar.xz) = 1234800
diff --git a/mail/rspamd-devel/files/patch-CMakeLists.txt b/mail/rspamd-devel/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..208f082170f2
--- /dev/null
+++ b/mail/rspamd-devel/files/patch-CMakeLists.txt
@@ -0,0 +1,22 @@
+--- CMakeLists.txt.orig 2015-12-17 14:52:24.000000000 +0000
++++ CMakeLists.txt 2015-12-17 16:21:31.231703000 +0000
+@@ -1103,6 +1103,19 @@
+ ENDIF(WANT_SYSTEMD_UNITS MATCHES "ON")
+ IF(BUILD_PORT)
+ INSTALL_IF_NOT_EXISTS(${MAIN_CONF} ${CONFDIR} "rspamd.conf" ".sample")
++ INSTALL_IF_NOT_EXISTS("conf/common.conf" ${CONFDIR} "common.conf" ".sample")
++ INSTALL_IF_NOT_EXISTS("conf/logging.inc" ${CONFDIR} "logging.inc" ".sample")
++ INSTALL_IF_NOT_EXISTS("conf/options.inc" ${CONFDIR} "options.inc" ".sample")
++ INSTALL_IF_NOT_EXISTS("conf/worker-controller.inc" ${CONFDIR} "worker-controller.inc" ".sample")
++ INSTALL_IF_NOT_EXISTS("conf/worker-normal.inc" ${CONFDIR} "worker-normal.inc" ".sample")
++ INSTALL_IF_NOT_EXISTS("conf/2tld.inc" ${CONFDIR} "2tld.inc" ".sample")
++ INSTALL_IF_NOT_EXISTS("conf/composites.conf" ${CONFDIR} "composites.conf" ".sample")
++ INSTALL_IF_NOT_EXISTS("conf/metrics.conf" ${CONFDIR} "metrics.conf" ".sample")
++ INSTALL_IF_NOT_EXISTS("conf/modules.conf" ${CONFDIR} "modules.conf" ".sample")
++ INSTALL_IF_NOT_EXISTS("conf/statistic.conf" ${CONFDIR} "statistic.conf" ".sample")
++ INSTALL_IF_NOT_EXISTS("conf/surbl-whitelist.inc" ${CONFDIR} "surbl-whitelist.inc" ".sample")
++ INSTALL_IF_NOT_EXISTS("conf/dmarc_whitelist.inc" ${CONFDIR} "dmarc_whitelist.inc" ".sample")
++ INSTALL_IF_NOT_EXISTS("conf/spf_dkim_whitelist.inc" ${CONFDIR} "spf_dkim_whitelist.inc" ".sample")
+ ELSE(BUILD_PORT)
+ INSTALL_IF_NOT_EXISTS(${MAIN_CONF} ${CONFDIR} "rspamd.conf" "")
+ ENDIF(BUILD_PORT)
diff --git a/mail/rspamd-devel/files/rspamd.in b/mail/rspamd-devel/files/rspamd.in
new file mode 100644
index 000000000000..8e4700885356
--- /dev/null
+++ b/mail/rspamd-devel/files/rspamd.in
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: rspamd
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following line to /etc/rc.conf to enable rspamd:
+#
+# rspamd_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable rspamd.
+#
+# rspamd_user (str): Default to "nobody".
+#
+# rspamd_group (str): Default to "nobody".
+#
+# rspamd_flags (str): Default to "-c %%PREFIX%%/etc/rspamd.xml".
+
+. /etc/rc.subr
+
+name=rspamd
+rcvar=rspamd_enable
+
+load_rc_config $name
+
+: ${rspamd_enable:="NO"}
+: ${rspamd_user="nobody"}
+: ${rspamd_group="nobody"}
+: ${rspamd_flags="-c %%PREFIX%%/etc/rspamd/rspamd.conf"}
+
+pidfile=${rspamd_pidfile:-"/var/run/rspamd/rspamd.pid"}
+
+command=%%PREFIX%%/bin/rspamd
+command_adm=%%PREFIX%%/bin/rspamadm
+restart_precmd="rspamd_checkconfig"
+reload_precmd="rspamd_checkconfig"
+configtest_cmd="rspamd_checkconfig"
+reopenlog_cmd="reopenlog_cmd"
+
+required_files=%%PREFIX%%/etc/rspamd/rspamd.conf
+command_args="-u ${rspamd_user} -g ${rspamd_group}"
+sig_reload="HUP"
+extra_commands="reload configtest reopenlog"
+stop_postcmd="rm -f $pidfile"
+
+rspamd_checkconfig()
+{
+ echo "Performing sanity check on rspamd configuration:"
+ eval ${command_adm} configtest ${rspamd_flags}
+}
+
+reopenlog_cmd()
+{
+ pkill -USR1 -F $pidfile
+}
+
+run_rc_command "$1"
diff --git a/mail/rspamd-devel/files/rspamd_redirector.in b/mail/rspamd-devel/files/rspamd_redirector.in
new file mode 100644
index 000000000000..d719ee240af0
--- /dev/null
+++ b/mail/rspamd-devel/files/rspamd_redirector.in
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: rspamd_redirector
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following line to /etc/rc.conf to enable rspamd_redirector:
+#
+# rspamd_redirector_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable redirector.
+
+. /etc/rc.subr
+
+name="rspamd_redirector"
+rcvar=rspamd_redirector_enable
+
+load_rc_config $name
+
+: ${rspamd_redirector_enable:="NO"}
+
+pidfile=${rspamd_redirector_pidfile:-"/var/run/rspamd/redirector.pid"}
+
+command="%%PREFIX%%/bin/rspamd-redirector"
+command_interpreter="%%PREFIX%%/bin/perl"
+extra_commands="reload"
+sig_reload="USR1"
+stop_postcmd="rm -f $pidfile"
+
+run_rc_command "$1"
diff --git a/mail/rspamd-devel/pkg-descr b/mail/rspamd-devel/pkg-descr
new file mode 100644
index 000000000000..a5a88f5032ca
--- /dev/null
+++ b/mail/rspamd-devel/pkg-descr
@@ -0,0 +1,5 @@
+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. This port provides development version of rspamd.
+
+WWW: https://rspamd.com
diff --git a/mail/rspamd-devel/pkg-plist b/mail/rspamd-devel/pkg-plist
new file mode 100644
index 000000000000..d65bd120bf4e
--- /dev/null
+++ b/mail/rspamd-devel/pkg-plist
@@ -0,0 +1,100 @@
+bin/rspamd-%%RSPAMDVERSION%%
+bin/rspamd
+bin/rspamadm-%%RSPAMDVERSION%%
+bin/rspamadm
+bin/rspamc-%%RSPAMDVERSION%%
+bin/rspamc
+%%REDIRECTOR%%bin/rspamd-redirector
+@sample %%ETCDIR%%/2tld.inc.sample
+@sample %%ETCDIR%%/common.conf.sample
+@sample %%ETCDIR%%/composites.conf.sample
+@sample %%ETCDIR%%/dmarc_whitelist.inc.sample
+@sample %%ETCDIR%%/logging.inc.sample
+@sample %%ETCDIR%%/metrics.conf.sample
+@sample %%ETCDIR%%/modules.conf.sample
+%%ETCDIR%%/modules.d/chartable.conf
+%%ETCDIR%%/modules.d/dkim.conf
+%%ETCDIR%%/modules.d/dmarc.conf
+%%ETCDIR%%/modules.d/emails.conf
+%%ETCDIR%%/modules.d/forged_recipients.conf
+%%ETCDIR%%/modules.d/fuzzy_check.conf
+%%ETCDIR%%/modules.d/hfilter.conf
+%%ETCDIR%%/modules.d/ip_score.conf
+%%ETCDIR%%/modules.d/maillist.conf
+%%ETCDIR%%/modules.d/multimap.conf
+%%ETCDIR%%/modules.d/once_received.conf
+%%ETCDIR%%/modules.d/phishing.conf
+%%ETCDIR%%/modules.d/ratelimit.conf
+%%ETCDIR%%/modules.d/regexp.conf
+%%ETCDIR%%/modules.d/spf.conf
+%%ETCDIR%%/modules.d/surbl.conf
+%%ETCDIR%%/modules.d/whitelist.conf
+@sample %%ETCDIR%%/options.inc.sample
+@sample %%ETCDIR%%/rspamd.conf.sample
+@sample %%ETCDIR%%/spf_dkim_whitelist.inc.sample
+@sample %%ETCDIR%%/statistic.conf.sample
+@sample %%ETCDIR%%/surbl-whitelist.inc.sample
+@sample %%ETCDIR%%/worker-controller.inc.sample
+@sample %%ETCDIR%%/worker-normal.inc.sample
+lib/rspamd/librspamd-actrie.so
+%%DATADIR%%/effective_tld_names.dat
+%%DATADIR%%/lua/dmarc.lua
+%%DATADIR%%/lua/emails.lua
+%%DATADIR%%/lua/forged_recipients.lua
+%%DATADIR%%/lua/fun.lua
+%%DATADIR%%/lua/hfilter.lua
+%%DATADIR%%/lua/ip_score.lua
+%%DATADIR%%/lua/maillist.lua
+%%DATADIR%%/lua/multimap.lua
+%%DATADIR%%/lua/once_received.lua
+%%DATADIR%%/lua/phishing.lua
+%%DATADIR%%/lua/ratelimit.lua
+%%DATADIR%%/lua/rbl.lua
+%%DATADIR%%/lua/settings.lua
+%%DATADIR%%/lua/spamassassin.lua
+%%DATADIR%%/lua/trie.lua
+%%DATADIR%%/lua/whitelist.lua
+%%DATADIR%%/rules/html.lua
+%%DATADIR%%/rules/http_headers.lua
+%%DATADIR%%/rules/misc.lua
+%%DATADIR%%/rules/regexp/drugs.lua
+%%DATADIR%%/rules/regexp/fraud.lua
+%%DATADIR%%/rules/regexp/headers.lua
+%%DATADIR%%/rules/regexp/lotto.lua
+%%DATADIR%%/rules/rspamd.classifiers.lua
+%%DATADIR%%/rules/rspamd.lua
+%%DATADIR%%/www/README.md
+%%DATADIR%%/www/css/datatables.min.css
+%%DATADIR%%/www/css/glyphicons-halflings-regular.woff
+%%DATADIR%%/www/css/glyphicons-halflings-regular.woff2
+%%DATADIR%%/www/css/rspamd.css
+%%DATADIR%%/www/favicon.ico
+%%DATADIR%%/www/img/asc.png
+%%DATADIR%%/www/img/desc.png
+%%DATADIR%%/www/img/spinner.gif
+%%DATADIR%%/www/img/spinner.png
+%%DATADIR%%/www/index.html
+%%DATADIR%%/www/js/d3pie.min.js
+%%DATADIR%%/www/js/datatables.min.js
+%%DATADIR%%/www/js/rspamd.js
+%%DATADIR%%/www/plugins.txt
+%%DATADIR%%/www/react-index.html
+%%DATADIR%%/www/src/Gruntfile.js
+%%DATADIR%%/www/src/common.js
+%%DATADIR%%/www/src/components/app.jsx
+%%DATADIR%%/www/src/components/dashboard.jsx
+%%DATADIR%%/www/src/components/login.jsx
+%%DATADIR%%/www/src/components/piechart.jsx
+%%DATADIR%%/www/src/components/rrdgraph.jsx
+%%DATADIR%%/www/src/package.json
+man/man1/rspamadm.1.gz
+man/man1/rspamc.1.gz
+man/man8/rspamd.8.gz
+@dir %%EXAMPLESDIR%%
+@owner nobody
+@group nobody
+@dir /var/db/rspamd
+@dir /var/log/rspamd
+@dir /var/run/rspamd
+@owner
+@group