blob: 63cf2305cb5a57b47ac332274c18d9904bfd2289 (
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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
# New ports collection makefile for: spamass-milter
# Date created: 29 April 2002
# Whom: Eugene M. Kim <ab@astralblue.net>
#
# $FreeBSD$
#
PORTNAME= spamass-milter
PORTVERSION= 0.3.1
PORTREVISION= 10
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SAVANNAH}
MASTER_SITE_SUBDIR= spamass-milt
MAINTAINER= ports@FreeBSD.org
COMMENT= Sendmail Milter (mail filter) plugin for SpamAssassin
BUILD_DEPENDS= spamc:${PORTSDIR}/mail/p5-Mail-SpamAssassin
RUN_DEPENDS= ${BUILD_DEPENDS}
MAKE_JOBS_SAFE= yes
##
# Use the following quirks to choose which sendmail to use (ports or system):
#
# WITH_SENDMAIL_BASE=yes
# or
# WITH_SENDMAIL_PORT=yes
#
# If unspecified, give base precedence.
#
.include <bsd.port.pre.mk>
.if defined(WITH_ADDAUTH_PATCH)
EXTRA_PATCHES= ${FILESDIR}/extra-patch-addauth
.endif
.if defined(WITH_REJECTTEXT_PATCH)
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-rejecttext1
.if defined(WITH_ADDAUTH_PATCH)
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-rejecttext2a
.else
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-rejecttext2
.endif
.endif
.if exists(${LOCALBASE}/lib/libldap.so)
WITH_LDAP=yes
.endif
.if !defined(WITHOUT_LDAP) && defined(WITH_LDAP)
USE_OPENLDAP=yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
.endif
.if !defined(WITH_SENDMAIL_BASE) && \
!defined(WITH_SENDMAIL_PORT) && \
WITH_SENDMAIL_BASE=yes
.endif
.if defined(WITH_SENDMAIL_BASE)
.if exists(/usr/lib/libmilter.a)
MILTERBASE= /usr
.else
IGNORE= base system sendmail not found or too old, rebuild with WITH_SENDMAIL_PORT=yes
.endif
.endif
.if defined(WITH_SENDMAIL_PORT)
BUILD_DEPENDS+= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail
MILTERBASE?= ${LOCALBASE}
.endif
.if !defined(NOPORTDOCS)
PORTDOCS= AUTHORS ChangeLog NEWS README TODO
.endif
MILTERINC= ${MILTERBASE}/include
MILTERLIB= ${MILTERBASE}/lib
CPPFLAGS+= -I${MILTERINC}
LDFLAGS+= -L${MILTERLIB}
USE_RC_SUBR= spamass-milter
GNU_CONFIGURE= yes
CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
SUB_FILES= pkg-message
MAN1= spamass-milter.1
pre-patch:
.if !defined(WITH_SENDMAIL_PORT)
@${ECHO_CMD} ""
@${ECHO_CMD} "By default, ${PORTNAME} builds against the base system."
@${ECHO_CMD} "If you want to use the sendmail port please set the environment"
@${ECHO_CMD} "variable WITH_SENDMAIL_PORT"
@${ECHO_CMD} ""
.endif
.if !defined(WITH_ADDAUTH_PATCH)
@${ECHO_CMD} ""
@${ECHO_CMD} "You may set environment variable WITH_ADDAUTH_PATCH to bypass"
@${ECHO_CMD} "checks if a connection authenticated via SMTP."
@${ECHO_CMD} ""
.endif
.if !defined(WITH_REJECTTEXT_PATCH)
@${ECHO_CMD} ""
@${ECHO_CMD} "You may set environment variable WITH_REJECTTEXT_PATCH to be"
@${ECHO_CMD} "able to customize the SMTP reject message."
@${ECHO_CMD} ""
.endif
post-patch:
@${SED} -e's,%%PREFIX%%,${PREFIX},g' \
${FILESDIR}/activation.txt > ${WRKDIR}/activation.txt
.if !defined(WITHOUT_LDAP) && defined(WITH_LDAP)
@${REINPLACE_CMD} -e 's|-lmilter|-lmilter -lldap|g' ${WRKSRC}/configure
.endif
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKDIR}/activation.txt ${DOCSDIR}/activation.txt
.for f in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
.endfor
.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
|