summaryrefslogtreecommitdiff
path: root/mail/scam-backscatter/Makefile
blob: 650ec4fbafa28149458c5ea9719f4570b21cb618 (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
# Created by: Janne Snabb <snabb@epipe.com>
# $FreeBSD$

PORTNAME=	scam-backscatter
PORTVERSION=	1.5.1
CATEGORIES=	mail
MASTER_SITES=	http://www.elandsys.com/scam/scam-backscatter/ \
		http://dist.epipe.com/mirrors/scam-backscatter/
DISTNAME=	scamback-${PORTVERSION}
EXTRACT_SUFX=	.tgz

MAINTAINER=	snabb@epipe.com
COMMENT=	Address verification milter to prevent spam backscatter

WRKSRC=		${WRKDIR}/scamback
USE_RC_SUBR=	scam-backscatter
SUB_FILES=	pkg-message

MAKEFILE=	Makefile.freebsd
ALL_TARGET=

OPTIONS_DEFINE=	ALLDOMAINS EHLO USEMAILERTABLE DOCS
ALLDOMAINS_DESC=	Verify any domain with the backend
EHLO_DESC=		Use EHLO instead of HELO in SMTP session
USEMAILERTABLE_DESC=	Use mailertable to map domains to backends

NO_STAGE=	yes
.include <bsd.port.options.mk>
.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk"

LDFLAGS+=	${SENDMAIL_LDFLAGS}
LIBS+=		-lmilter
LIBS+=		${SENDMAIL_LDADD}

CFLAGS+=	${PTHREAD_CFLAGS}
LIBS+=		${PTHREAD_LIBS}

.if ${PORT_OPTIONS:MALLDOMAINS}
CFLAGS+=	-DALLDOMAINS
.endif
.if ${PORT_OPTIONS:MEHLO}
CFLAGS+=	-DEHLO
.endif
.if ${PORT_OPTIONS:MUSEMAILERTABLE}
CFLAGS+=	-DUSEMAILERTABLE
.endif

MAKE_ARGS+=	CC="${CC}" CCFLAGS="${CFLAGS}" CFLAGS="" \
		LDFLAGS="${LDFLAGS}" LIBS="${LIBS}"

post-patch:
	@${REINPLACE_CMD} -e \
	    's|/var/spool/scam/scam-back\.pid|/var/run/scam-back\.pid|g; \
	    s|/etc/mail/scam\.conf|${PREFIX}/etc/mail/scam-back\.conf|g;' \
	    ${WRKSRC}/scam-back.c

do-install:
	${MKDIR} ${PREFIX}/etc/mail
	${INSTALL_PROGRAM} ${WRKSRC}/scam-back ${PREFIX}/libexec/scam-back
	${INSTALL_DATA} ${WRKSRC}/scam.conf ${PREFIX}/etc/mail/scam-back.conf.sample

post-install:
.if ${PORT_OPTIONS:MDOCS}
	${MKDIR} ${DOCSDIR}
	${INSTALL_MAN} ${WRKSRC}/INSTALL ${DOCSDIR}
	${INSTALL_MAN} ${WRKSRC}/License ${DOCSDIR}
.endif
	${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>