2011-02-02 16:40:58 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= rspamd
|
2020-02-26 22:26:37 +01:00
|
|
|
PORTVERSION= 2.4
|
2011-02-02 16:40:58 +01:00
|
|
|
CATEGORIES= mail
|
|
|
|
|
|
|
|
MAINTAINER= vsevolod@FreeBSD.org
|
|
|
|
COMMENT= Fast spam filtering system
|
|
|
|
|
2016-02-05 00:04:43 +01:00
|
|
|
LICENSE= APACHE20
|
2018-09-27 18:27:56 +02:00
|
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE.md
|
2012-06-09 15:03:54 +02:00
|
|
|
|
2016-04-01 16:16:16 +02:00
|
|
|
LIB_DEPENDS= libpcre.so:devel/pcre \
|
2019-10-14 18:06:01 +02:00
|
|
|
libicui18n.so:devel/icu \
|
|
|
|
libsodium.so:security/libsodium
|
2016-07-25 16:50:44 +02:00
|
|
|
BUILD_DEPENDS= ragel:devel/ragel
|
2018-03-21 19:22:06 +01:00
|
|
|
RUN_DEPENDS= ca_root_nss>=3.*:security/ca_root_nss
|
2013-12-02 17:07:53 +01:00
|
|
|
|
2018-12-25 21:25:39 +01:00
|
|
|
USES= cmake compiler:c11 gnome perl5 pkgconfig \
|
2018-09-27 18:27:56 +02:00
|
|
|
sqlite ssl
|
2018-09-20 20:05:05 +02:00
|
|
|
USE_LDCONFIG= yes
|
|
|
|
USE_PERL5= build run
|
|
|
|
USE_GNOME= glib20
|
|
|
|
|
2016-08-05 12:20:22 +02:00
|
|
|
CONFLICTS_INSTALL= rspamd-devel
|
2015-12-17 17:29:22 +01:00
|
|
|
|
2019-03-16 13:24:02 +01:00
|
|
|
USERS= rspamd
|
|
|
|
GROUPS= rspamd
|
|
|
|
|
2020-02-06 17:59:24 +01:00
|
|
|
OPTIONS_DEFINE= BLAS CGP GPERF LUAJIT
|
|
|
|
OPTIONS_DEFINE_amd64= HYPERSCAN
|
|
|
|
OPTIONS_DEFAULT_amd64= LUAJIT
|
|
|
|
OPTIONS_DEFAULT_armv7= LUAJIT
|
|
|
|
OPTIONS_DEFAULT_i386= LUAJIT
|
|
|
|
OPTIONS_DEFAULT_powerpc= LUAJIT
|
2018-03-16 19:53:44 +01:00
|
|
|
OPTIONS_SUB= yes
|
2017-10-22 10:55:19 +02:00
|
|
|
|
2020-02-06 17:59:24 +01:00
|
|
|
BLAS_DESC= Use OpenBLAS to accelerate KANN
|
|
|
|
CGP_DESC= Install Communigate Pro(tm) helper
|
|
|
|
GPERF_DESC= Google perf-tools profiling
|
|
|
|
HYPERSCAN_DESC= Use hyperscan optimizations (amd64 only)
|
|
|
|
LUAJIT_DESC= Use LuaJIT instead of standard Lua
|
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 \
|
2019-10-14 18:06:01 +02:00
|
|
|
-DLIBDIR=${PREFIX}/lib/rspamd
|
2011-02-02 16:40:58 +01:00
|
|
|
|
2017-05-02 15:46:25 +02:00
|
|
|
USE_GITHUB= yes
|
|
|
|
|
2018-03-16 19:53:44 +01:00
|
|
|
USE_RC_SUBR= rspamd
|
2011-02-02 16:40:58 +01:00
|
|
|
|
2019-11-23 23:04:25 +01:00
|
|
|
BLAS_CMAKE_ON= -DENABLE_BLAS=ON
|
|
|
|
BLAS_USES= blaslapack:openblas
|
|
|
|
|
2018-03-16 19:53:44 +01:00
|
|
|
GPERF_CMAKE_ON= -DENABLE_GPERF_TOOLS=ON
|
|
|
|
GPERF_LIB_DEPENDS= libprofiler.so:devel/google-perftools
|
2011-02-02 16:40:58 +01:00
|
|
|
|
2018-03-16 19:53:44 +01:00
|
|
|
HYPERSCAN_CMAKE_ON= -DENABLE_HYPERSCAN=ON
|
|
|
|
HYPERSCAN_LIB_DEPENDS= libhs.so:devel/hyperscan
|
2016-02-04 23:50:43 +01:00
|
|
|
|
2020-02-06 17:59:24 +01:00
|
|
|
LUAJIT_LIB_DEPENDS= libluajit-5.1.so:lang/luajit
|
|
|
|
LUAJIT_USES_OFF= lua:51
|
2020-01-27 22:21:32 +01:00
|
|
|
|
2018-03-16 19:53:44 +01:00
|
|
|
CGP_RUN_DEPENDS+= \
|
2017-03-07 19:56:10 +01:00
|
|
|
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
|
2018-03-16 19:53:44 +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
|
2019-10-14 18:06:01 +02:00
|
|
|
${RM} ${STAGEDIR}/${ETCDIR}/rspamd.conf.sample
|
2015-12-22 18:33:04 +01:00
|
|
|
# Linux specific
|
|
|
|
${RM} ${STAGEDIR}/${ETCDIR}/rspamd.systemd.conf
|
|
|
|
${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
|
2018-03-16 19:53:44 +01:00
|
|
|
post-install-CGP-on:
|
2017-03-07 19:56:10 +01:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/utils/cgp_rspamd.pl ${STAGEDIR}${PREFIX}/bin/rspamd-cgp-helper
|
2015-12-22 18:33:04 +01:00
|
|
|
|
2013-05-24 07:47:16 +02:00
|
|
|
.include <bsd.port.mk>
|