aboutsummaryrefslogtreecommitdiff
path: root/mail/rmilter/Makefile
blob: 243de12064f0df056cb9de64d37593078cef9a30 (plain) (blame)
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
# $FreeBSD$

PORTNAME=	rmilter
PORTVERSION=	1.7.5
CATEGORIES=	mail

MAINTAINER=	vsevolod@FreeBSD.org
COMMENT=	Milter that performs rspamd, clamav, and other checks

LICENSE=	BSD2CLAUSE

LIB_DEPENDS=	libpcre.so:${PORTSDIR}/devel/pcre \
		libopendkim.so:${PORTSDIR}/mail/opendkim

USE_GITHUB=	yes
GH_ACCOUNT=	vstakhov

USE_RC_SUBR=	yes
USES=		cmake:outsource bison
USE_OPENSSL=	yes

USERS=		_rmilter
GROUPS=		_rmilter

CMAKE_ARGS+=	-DENABLE_DKIM=ON

WITH_SENDMAIL_BASE=	yes

.include <bsd.port.pre.mk>

# Workaround to prevent bsd.milter.mk from breaking the build with the recent clang
WITHOUT_MILTER_LDFLAGS=	yes
.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk"

post-patch:
	${SED} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
		${WRKSRC}/freebsd/rmilter > ${WRKDIR}/rmilter

do-install:
	${INSTALL_SCRIPT} ${WRKDIR}/rmilter ${STAGEDIR}${PREFIX}/etc/rc.d/
	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/rmilter ${STAGEDIR}${PREFIX}/sbin
	${INSTALL_DATA} ${WRKSRC}/rmilter.conf.sample ${STAGEDIR}${PREFIX}/etc/
	${INSTALL_MAN} ${WRKSRC}/doc/rmilter.8 ${STAGEDIR}${MAN8PREFIX}/man/man8/

post-stage:
	${INSTALL} -d ${STAGEDIR}/var/run/rmilter
.include <bsd.port.post.mk>