@@ -507,7 +507,7 @@ ADD_CUSTOM_COMMAND(OUTPUT src/modules.c | |||
IF(PERL_EXECUTABLE) | |||
ADD_CUSTOM_COMMAND(OUTPUT perl/Makefile | |||
DEPENDS perl/Makefile.PL | |||
COMMAND ${PERL_EXECUTABLE} ./Makefile.PL | |||
COMMAND ${PERL_EXECUTABLE} ./Makefile.PL PREFIX=${CMAKE_INSTALL_PREFIX} INSTALLMAN3DIR=${CMAKE_INSTALL_PREFIX}/man/man3 | |||
WORKING_DIRECTORY perl) | |||
CONFIGURE_FILE(perl/Makefile.PL.in perl/Makefile.PL) | |||
ADD_CUSTOM_TARGET(perlmodule |
@@ -0,0 +1,85 @@ | |||
# New ports collection makefile for: rspamd | |||
# Date created: 2010-03-24 | |||
# Whom: Vsevolod Stakhov <vsevolod@FreeBSD.org> | |||
# | |||
# $FreeBSD$ | |||
# | |||
PORTNAME= rspamd | |||
PORTVERSION= 0.2.9 | |||
CATEGORIES= mail | |||
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} | |||
MAINTAINER= vsevolod@FreeBSD.org | |||
COMMENT= Fast spam filtering system | |||
RUN_DEPENDS= ${SITE_PERL}/IO/Socket/SSL.pm:${PORTSDIR}/security/p5-IO-Socket-SSL \ | |||
${SITE_PERL}/IO/String.pm:${PORTSDIR}/devel/p5-IO-String | |||
LIB_DEPENDS= pcre.0:${PORTSDIR}/devel/pcre \ | |||
gmime-2.0:${PORTSDIR}/mail/gmime2 \ | |||
event-1.4:${PORTSDIR}/devel/libevent | |||
USE_GNOME= glib20 | |||
USE_CMAKE= yes | |||
USE_LDCONFIG= yes | |||
WANT_PERL= yes | |||
USE_PERL5= yes | |||
OPTIONS= RSPAMD_GPERF "Enable google perf-tools profiling" off \ | |||
RSPAMD_JUDY "Enable judy arrays usage for performance" off \ | |||
RSPAMD_LUA "Enable lua plugins support in rspamd" on \ | |||
RSPAMD_OPTFLAGS "Turn on compiler optimizations" off \ | |||
RSPAMD_REDIRECTOR "Install HTTP redirector" off \ | |||
RSPAMD_STATIC "Build static version of rspamd" off | |||
MAN3= Mail::Rspamd::Client.3 | |||
CMAKE_ARGS+= -DETC_PREFIX=${PREFIX}/etc -DPREFIX=${PREFIX} | |||
PLIST_SUB+= ETCDIR=etc/rspamd | |||
.include <bsd.port.pre.mk> | |||
.if defined(WITH_RSPAMD_GPERF) | |||
CMAKE_ARGS+= -DENABLE_GPERF_TOOLS=ON | |||
LIB_DEPENDS+= profiler.0:${PORTSDIR}/devel/google-perftools | |||
.endif | |||
.if defined(WITH_RSPAMD_JUDY) | |||
LIB_DEPENDS+= Judy:${PORTSDIR}/devel/judy | |||
.endif | |||
.if defined(WITH_RSPAMD_LUA) | |||
USE_LUA= 5.1- | |||
PLIST_SUB+= LUA="" | |||
.else | |||
CMAKE_ARGS+= -DENABLE_LUA=OFF | |||
PLIST_SUB+= LUA="@comment" | |||
.endif | |||
.if defined(WITH_RSPAMD_OPTFLAGS) | |||
CMAKE_ARGS+= -DENABLE_OPTIMIZATION=ON | |||
.endif | |||
.if defined(WITH_RSPAMD_REDIRECTOR) | |||
CMAKE_ARGS+= -DENABLE_REDIRECTOR=ON | |||
PLIST_SUB+= REDIRECTOR="" | |||
RUN_DEPENDS+= ${SITE_PERL}/POE/Component/Client/DNS.pm:${PORTSDIR}/dns/p5-POE-Component-Client-DNS \ | |||
${SITE_PERL}/POE/Component/Client/HTTP.pm:${PORTSDIR}/www/p5-POE-Component-Client-HTTP \ | |||
${SITE_PERL}/POE/Component/Server/HTTP.pm:${PORTSDIR}/www/p5-POE-Component-Server-HTTP \ | |||
${SITE_PERL}/${PERL_ARCH}/Cache/Memcached/Fast.pm:${PORTSDIR}/databases/p5-Cache-Memcached-Fast \ | |||
${SITE_PERL}/Proc/PidUtil.pm:${PORTSDIR}/sysutils/p5-Proc-PidUtil \ | |||
${SITE_PERL}/Proc/Daemon.pm:${PORTSDIR}/devel/p5-Proc-Daemon \ | |||
${SITE_PERL}/${PERL_ARCH}/Digest/SHA256.pm:${PORTSDIR}/security/p5-Digest-SHA256 \ | |||
${SITE_PERL}/SWF/File.pm:${PORTSDIR}/graphics/p5-SWF-File | |||
.else | |||
PLIST_SUB+= REDIRECTOR="@comment" | |||
.endif | |||
.if defined(WITH_RSPAMD_STATIC) | |||
CMAKE_ARGS+= -DENABLE_STATIC=ON | |||
PLIST_SUB+= CPLUGINS="@comment" | |||
USE_LDCONFIG= no | |||
.else | |||
PLIST_SUB+= CPLUGINS="" | |||
.endif | |||
.include <bsd.port.post.mk> |
@@ -0,0 +1,3 @@ | |||
MD5 (rspamd-0.2.9.tar.gz) = 45b99d5914610e805782dbcd16f44241 | |||
SHA256 (rspamd-0.2.9.tar.gz) = 78b944f24c3f9af6781db97ec68b7a4d8f62d157e3b9a05456254e30c54b8f46 | |||
SIZE (rspamd-0.2.9.tar.gz) = 578750 |
@@ -0,0 +1,13 @@ | |||
diff -r f2989bcf7b80 CMakeLists.txt | |||
--- CMakeLists.txt Tue Mar 23 18:40:50 2010 +0300 | |||
+++ CMakeLists.txt Wed Mar 24 18:51:53 2010 +0300 | |||
@@ -507,7 +507,7 @@ | |||
IF(PERL_EXECUTABLE) | |||
ADD_CUSTOM_COMMAND(OUTPUT perl/Makefile | |||
DEPENDS perl/Makefile.PL | |||
- COMMAND ${PERL_EXECUTABLE} ./Makefile.PL | |||
+ COMMAND ${PERL_EXECUTABLE} ./Makefile.PL PREFIX=${CMAKE_INSTALL_PREFIX} INSTALLMAN3DIR=${CMAKE_INSTALL_PREFIX}/man/man3 INSTALLSITEMAN3DIR=${CMAKE_INSTALL_PREFIX}/man/man3 | |||
WORKING_DIRECTORY perl) | |||
CONFIGURE_FILE(perl/Makefile.PL.in perl/Makefile.PL) | |||
ADD_CUSTOM_TARGET(perlmodule | |||
@@ -0,0 +1,57 @@ | |||
--- perl/Rspamd.pm 2010-03-24 16:39:28.000000000 +0300 | |||
+++ perl/Rspamd.pm 2010-03-24 19:35:13.000000000 +0300 | |||
@@ -1,54 +0,0 @@ | |||
-package Mail::Rspamd; | |||
- | |||
-use 5.006001; | |||
-use strict; | |||
-use warnings; | |||
- | |||
-require Exporter; | |||
- | |||
-our @ISA = qw(Exporter); | |||
-our @EXPORT = qw( | |||
- module_init | |||
- module_reload | |||
- LOG_ERROR | |||
- LOG_WARNING | |||
- LOG_MESSAGE | |||
- LOG_INFO | |||
- LOG_DEBUG | |||
-); | |||
- | |||
-our $VERSION = '0.0.1'; | |||
- | |||
-require XSLoader; | |||
-XSLoader::load('Rspamd', $VERSION); | |||
- | |||
-sub module_init { | |||
- my ($cfg) = @_; | |||
-} | |||
- | |||
-sub module_reload { | |||
- my ($cfg) = @_; | |||
-} | |||
- | |||
-use constant LOG_ERROR => 1 << 3; | |||
-use constant LOG_WARNING => 1 << 4; | |||
-use constant LOG_MESSAGE => 1 << 5; | |||
-use constant LOG_INFO => 1 << 6; | |||
-use constant LOG_DEBUG => 1 << 7; | |||
- | |||
-1; | |||
-__END__ | |||
- | |||
-=head1 NAME | |||
- | |||
-rspamd - Perl interface to the rspamd API | |||
- | |||
-=head1 SYNOPSIS | |||
- | |||
- use rspamd; | |||
- | |||
-=head1 DESCRIPTION | |||
- | |||
-TODO: Not ready yet | |||
- | |||
-=cut |
@@ -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. | |||
WWW: http://rspamd.sourceforge.net |
@@ -0,0 +1,35 @@ | |||
bin/rspamc | |||
bin/rspamd | |||
etc/rc.d/rspamd.sh | |||
%%REDIRECTOR%%bin/rspamd-redirector | |||
%%REDIRECTOR%%etc/rc.d/redirector.sh | |||
etc/rspamd.conf.sample | |||
@unexec if cmp -s %D/%%ETCDIR%%/2tld.inc %D/%%ETCDIR%%/2tld.inc.orig; then rm -f %D/%%ETCDIR%%/2tld.inc; fi | |||
%%ETCDIR%%/2tld.inc.orig | |||
@unexec if cmp -s %D/%%ETCDIR%%/drugs.inc %D/%%ETCDIR%%/drugs.inc.orig; then rm -f %D/%%ETCDIR%%/drugs.inc; fi | |||
%%ETCDIR%%/drugs.inc.orig | |||
@unexec if cmp -s %D/%%ETCDIR%%/fraud.inc %D/%%ETCDIR%%/fraud.inc.orig; then rm -f %D/%%ETCDIR%%/fraud.inc; fi | |||
%%ETCDIR%%/fraud.inc.orig | |||
@unexec if cmp -s %D/%%ETCDIR%%/headers.inc %D/%%ETCDIR%%/headers.inc.orig; then rm -f %D/%%ETCDIR%%/headers.inc; fi | |||
%%ETCDIR%%/headers.inc.orig | |||
@unexec if cmp -s %D/%%ETCDIR%%/html.inc %D/%%ETCDIR%%/html.inc.orig; then rm -f %D/%%ETCDIR%%/html.inc; fi | |||
%%ETCDIR%%/html.inc.orig | |||
@unexec if cmp -s %D/%%ETCDIR%%/lotto.inc %D/%%ETCDIR%%/lotto.inc.orig; then rm -f %D/%%ETCDIR%%/lotto.inc; fi | |||
%%ETCDIR%%/lotto.inc.orig | |||
%%LUA%%%%ETCDIR%%/plugins/lua/forged_recipients.lua | |||
%%LUA%%%%ETCDIR%%/plugins/lua/maillist.lua | |||
%%LUA%%%%ETCDIR%%/plugins/lua/once_received.lua | |||
%%LUA%%%%ETCDIR%%/plugins/lua/received_rbl.lua | |||
%%LUA%%%%ETCDIR%%/plugins/lua/whitelist.lua | |||
%%LUA%%@dirrmtry %%ETCDIR%%/plugins/lua | |||
@dirrmtry %%ETCDIR%%/plugins | |||
@dirrmtry %%ETCDIR%% | |||
%%CPLUGINS%%lib/librspamd_ipmark.so | |||
%%CPLUGINS%%lib/librspamd_regmark.so | |||
%%SITE_PERL%%/Mail/Rspamd/Client.pm | |||
@dirrm %%SITE_PERL%%/Mail/Rspamd | |||
@dirrmtry %%SITE_PERL%%/Mail |
@@ -1,54 +0,0 @@ | |||
package Mail::Rspamd; | |||
use 5.006001; | |||
use strict; | |||
use warnings; | |||
require Exporter; | |||
our @ISA = qw(Exporter); | |||
our @EXPORT = qw( | |||
module_init | |||
module_reload | |||
LOG_ERROR | |||
LOG_WARNING | |||
LOG_MESSAGE | |||
LOG_INFO | |||
LOG_DEBUG | |||
); | |||
our $VERSION = '0.0.1'; | |||
require XSLoader; | |||
XSLoader::load('Rspamd', $VERSION); | |||
sub module_init { | |||
my ($cfg) = @_; | |||
} | |||
sub module_reload { | |||
my ($cfg) = @_; | |||
} | |||
use constant LOG_ERROR => 1 << 3; | |||
use constant LOG_WARNING => 1 << 4; | |||
use constant LOG_MESSAGE => 1 << 5; | |||
use constant LOG_INFO => 1 << 6; | |||
use constant LOG_DEBUG => 1 << 7; | |||
1; | |||
__END__ | |||
=head1 NAME | |||
rspamd - Perl interface to the rspamd API | |||
=head1 SYNOPSIS | |||
use rspamd; | |||
=head1 DESCRIPTION | |||
TODO: Not ready yet | |||
=cut |