summaryrefslogtreecommitdiffstats
path: root/freebsd/port/Makefile
blob: 668d8d8d44a8ee6fcc833962c51d4dc91c943dd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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>