2011-02-02 16:40:58 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= rspamd
|
2017-04-19 18:21:33 +02:00
|
|
|
PORTVERSION= 1.5.6
|
2011-02-02 16:40:58 +01:00
|
|
|
CATEGORIES= mail
|
2013-12-27 16:16:01 +01:00
|
|
|
MASTER_SITES= http://rspamd.com/downloads/
|
2011-02-02 16:40:58 +01:00
|
|
|
|
|
|
|
MAINTAINER= vsevolod@FreeBSD.org
|
|
|
|
COMMENT= Fast spam filtering system
|
|
|
|
|
2016-02-05 00:04:43 +01:00
|
|
|
LICENSE= APACHE20
|
2012-06-09 15:03:54 +02:00
|
|
|
|
2016-04-01 16:16:16 +02:00
|
|
|
LIB_DEPENDS= libpcre.so:devel/pcre \
|
2017-02-20 03:57:04 +01:00
|
|
|
libevent.so:devel/libevent \
|
2016-09-01 14:23:30 +02:00
|
|
|
libluajit-5.1.so:lang/luajit \
|
2017-03-02 12:45:10 +01:00
|
|
|
libfann.so:math/fann \
|
|
|
|
libicui18n.so:devel/icu
|
2016-07-25 16:50:44 +02:00
|
|
|
BUILD_DEPENDS= ragel:devel/ragel
|
2013-12-02 17:07:53 +01:00
|
|
|
|
2016-08-05 12:20:22 +02:00
|
|
|
CONFLICTS_INSTALL= rspamd-devel
|
2015-12-17 17:29:22 +01:00
|
|
|
|
2017-03-07 19:56:10 +01:00
|
|
|
OPTIONS_DEFINE= GPERF REDIRECTOR HYPERSCAN GD CGP
|
|
|
|
OPTIONS_DEFAULT= GD
|
2015-12-22 18:33:04 +01:00
|
|
|
GPERF_DESC= Google perf-tools profiling
|
2013-05-24 07:47:16 +02:00
|
|
|
REDIRECTOR_DESC= Install HTTP redirector
|
2016-02-04 23:50:43 +01:00
|
|
|
HYPERSCAN_DESC= Use hyperscan optimizations (amd64 only)
|
2017-03-07 19:56:10 +01:00
|
|
|
GD_DESC= Enable libgd support for images fuzzy hashes
|
|
|
|
CGP_DESC= Install Communigate Pro(tm) helper
|
2011-02-02 16:40:58 +01:00
|
|
|
|
2011-02-07 17:53:04 +01:00
|
|
|
USE_RC_SUBR= rspamd
|
2011-02-02 16:40:58 +01:00
|
|
|
|
2015-12-22 18:33:04 +01:00
|
|
|
SUB_FILES= pkg-message rspamd.newsyslog.conf.sample
|
2011-02-02 16:40:58 +01:00
|
|
|
PLIST_SUB+= ETCDIR=etc/rspamd \
|
|
|
|
RSPAMDVERSION=${PORTVERSION}
|
2013-12-02 17:07:53 +01:00
|
|
|
CMAKE_ARGS+= -DCONFDIR=${PREFIX}/etc/rspamd \
|
2015-05-14 12:54:32 +02:00
|
|
|
-DLOGDIR=/var/log/rspamd \
|
|
|
|
-DDBDIR=/var/db/rspamd \
|
|
|
|
-DRUNDIR=/var/run/rspamd \
|
|
|
|
-DMANDIR=${MANPREFIX}/man \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
|
|
|
|
-DBUILD_PORT=yes \
|
|
|
|
-DLIBDIR=${PREFIX}/lib/rspamd \
|
2017-03-07 19:56:10 +01:00
|
|
|
-DNO_SHARED=ON \
|
|
|
|
-DENABLE_FANN=ON
|
2011-02-02 16:40:58 +01:00
|
|
|
|
2017-03-07 19:56:10 +01:00
|
|
|
USES= cmake:outsource gettext tar:xz pkgconfig perl5 \
|
2016-08-05 12:20:22 +02:00
|
|
|
compiler:c11 sqlite ssl
|
2011-02-02 16:40:58 +01:00
|
|
|
USE_LDCONFIG= yes
|
2015-01-02 12:44:59 +01:00
|
|
|
USE_PERL5= build
|
2011-02-02 16:40:58 +01:00
|
|
|
|
|
|
|
USE_GNOME= glib20
|
|
|
|
|
2013-05-24 07:47:16 +02:00
|
|
|
.include <bsd.port.options.mk>
|
2011-02-02 16:40:58 +01:00
|
|
|
|
2017-03-07 19:56:10 +01:00
|
|
|
.if ${PORT_OPTIONS:MGD}
|
|
|
|
CMAKE_ARGS+= -DENABLE_GD=ON
|
|
|
|
LIB_DEPENDS+= libgd.so:graphics/gd
|
|
|
|
.else
|
|
|
|
CMAKE_ARGS+= -DENABLE_GD=OFF
|
|
|
|
.endif
|
|
|
|
|
2013-05-24 07:47:16 +02:00
|
|
|
.if ${PORT_OPTIONS:MGPERF}
|
2011-02-02 16:40:58 +01:00
|
|
|
CMAKE_ARGS+= -DENABLE_GPERF_TOOLS=ON
|
2016-04-01 16:16:16 +02:00
|
|
|
LIB_DEPENDS+= libprofiler.so:devel/google-perftools
|
2011-02-02 16:40:58 +01:00
|
|
|
.endif
|
|
|
|
|
2016-02-04 23:50:43 +01:00
|
|
|
.if ${PORT_OPTIONS:MHYPERSCAN}
|
2016-08-05 12:20:22 +02:00
|
|
|
CMAKE_ARGS+= -DENABLE_HYPERSCAN=ON
|
2016-10-19 10:12:19 +02:00
|
|
|
LIB_DEPENDS+= libhs.so:devel/hyperscan
|
2016-08-05 12:20:22 +02:00
|
|
|
ONLY_FOR_ARCHS= amd64
|
2016-02-04 23:50:43 +01:00
|
|
|
.endif
|
|
|
|
|
2013-05-24 07:47:16 +02:00
|
|
|
.if ${PORT_OPTIONS:MREDIRECTOR}
|
2015-09-21 15:24:24 +02:00
|
|
|
USE_PERL5+= run
|
2011-02-02 16:40:58 +01:00
|
|
|
CMAKE_ARGS+= -DENABLE_REDIRECTOR=ON
|
|
|
|
PLIST_SUB+= REDIRECTOR=""
|
2011-02-07 17:53:04 +01:00
|
|
|
USE_RC_SUBR+= rspamd_redirector
|
2011-02-02 16:40:58 +01:00
|
|
|
RUN_DEPENDS+= \
|
2016-04-01 16:16:16 +02:00
|
|
|
p5-IO-Socket-SSL>=0:security/p5-IO-Socket-SSL \
|
|
|
|
p5-IO-String>=0:devel/p5-IO-String \
|
|
|
|
p5-XML-Parser>=0:textproc/p5-XML-Parser \
|
|
|
|
p5-Term-ReadKey>=0:devel/p5-Term-ReadKey \
|
|
|
|
p5-POE-Component-Client-DNS>=0:dns/p5-POE-Component-Client-DNS \
|
|
|
|
p5-POE-Component-Client-HTTP>=0:www/p5-POE-Component-Client-HTTP \
|
|
|
|
p5-POE-Component-Server-HTTP>=0:www/p5-POE-Component-Server-HTTP \
|
|
|
|
p5-Cache-Memcached-Fast>=0:databases/p5-Cache-Memcached-Fast \
|
|
|
|
p5-Proc-PidUtil>=0:sysutils/p5-Proc-PidUtil \
|
2017-03-07 19:56:10 +01:00
|
|
|
p5-Proc-Daemon>=0:devel/p5-Proc-Daemon
|
2011-02-02 16:40:58 +01:00
|
|
|
.else
|
2016-08-05 12:20:22 +02:00
|
|
|
PLIST_SUB+= REDIRECTOR="@comment "
|
2011-02-02 16:40:58 +01:00
|
|
|
.endif
|
|
|
|
|
2017-03-07 19:56:10 +01:00
|
|
|
.if ${PORT_OPTIONS:MCGP}
|
|
|
|
USE_PERL5+= run
|
|
|
|
PLIST_SUB+= CGP=""
|
|
|
|
RUN_DEPENDS+= \
|
|
|
|
p5-AnyEvent-HTTP>=0:www/p5-AnyEvent-HTTP \
|
|
|
|
p5-AnyEvent>=0:devel/p5-AnyEvent \
|
|
|
|
p5-EV>=0:devel/p5-EV \
|
|
|
|
p5-JSON-XS>=0:converters/p5-JSON-XS
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= CGP="@comment "
|
|
|
|
.endif
|
2016-12-02 12:58:21 +01:00
|
|
|
|
2017-03-07 19:56:10 +01:00
|
|
|
post-install:
|
|
|
|
@${MKDIR} \
|
2014-07-18 15:58:10 +02:00
|
|
|
${STAGEDIR}/var/log/rspamd \
|
|
|
|
${STAGEDIR}/var/db/rspamd \
|
|
|
|
${STAGEDIR}/var/run/rspamd
|
2015-12-22 18:33:04 +01:00
|
|
|
# Linux specific
|
|
|
|
${RM} ${STAGEDIR}/${ETCDIR}/rspamd.systemd.conf
|
|
|
|
# No need, since rspamd.conf.sample is a same
|
|
|
|
${RM} ${STAGEDIR}/${ETCDIR}/rspamd.sysvinit.conf
|
|
|
|
${INSTALL_DATA} ${WRKDIR}/rspamd.newsyslog.conf.sample ${STAGEDIR}${ETCDIR}
|
2017-03-07 19:56:10 +01:00
|
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d
|
|
|
|
${LN} -s ${ETCDIR}/rspamd.newsyslog.conf ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d
|
|
|
|
.if ${PORT_OPTIONS:MCGP}
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/utils/cgp_rspamd.pl ${STAGEDIR}${PREFIX}/bin/rspamd-cgp-helper
|
|
|
|
.endif
|
2015-12-22 18:33:04 +01:00
|
|
|
|
2013-05-24 07:47:16 +02:00
|
|
|
.include <bsd.port.mk>
|