blob: 715cef3be05ff94633b497871e1e63c8dff8ac4e (
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
|
# Created by: Eugene M. Kim <ab@astralblue.net>
# $FreeBSD$
PORTNAME= spamass-milter
PORTVERSION= 0.3.2
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SAVANNAH}
MASTER_SITE_SUBDIR= spamass-milt
MAINTAINER= m.tsatsenko@gmail.com
COMMENT= Sendmail Milter (mail filter) plugin for SpamAssassin
BUILD_DEPENDS= spamc:${PORTSDIR}/mail/p5-Mail-SpamAssassin
RUN_DEPENDS:= ${BUILD_DEPENDS}
LICENSE= GPLv2
OPTIONS_DEFINE= ADDAUTH_PATCH REJECTTEXT_PATCH LDAP SENDMAIL_PORT IPV6
ADDAUTH_PATCH_DESC= Bypass checks for SMTP AUTH connections
REJECTTEXT_PATCH_DESC= Customize SMTP reject message
SENDMAIL_PORT_DESC= Build against sendmail port
NO_STAGE= yes
.include <bsd.port.pre.mk>
ORIG_ARGS= fd:mMp:P:r:u:D:i:b:B:e:x
NEW_ARGS:= ${ORIG_ARGS}
.if ${PORT_OPTIONS:MADDAUTH_PATCH}
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-addauth
NEW_ARGS:= ${NEW_ARGS}a
.endif
.if ${PORT_OPTIONS:MREJECTTEXT_PATCH}
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-rejecttext1
NEW_ARGS:= ${NEW_ARGS}R:
.endif
.if ${PORT_OPTIONS:MIPV6}
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-ipv6
.endif
# extra-patch-options is modified in pre-patch
.if ${ORIG_ARGS} != ${NEW_ARGS}
EXTRA_PATCHES+= ${WRKDIR}/extra-patch-options
.endif
.if exists(${LOCALBASE}/lib/libldap.so)
WITH_LDAP=yes
.undef WITHOUT_LDAP
.endif
.if ${PORT_OPTIONS:MLDAP}
USE_OPENLDAP=yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
.endif
.if ${PORT_OPTIONS:MDOCS}
PORTDOCS= AUTHORS ChangeLog NEWS README TODO
.endif
USE_RC_SUBR= spamass-milter
GNU_CONFIGURE= yes
SUB_FILES= pkg-message
MAN1= spamass-milter.1
pre-patch:
.if ${ORIG_ARGS} != ${NEW_ARGS}
@${SED} -e 's|%NEW_ARGS%|${NEW_ARGS}|' ${FILESDIR}/extra-patch-options > ${WRKDIR}/extra-patch-options
.endif
post-patch:
@${SED} -e's,%%PREFIX%%,${PREFIX},g' \
${FILESDIR}/activation.txt > ${WRKDIR}/activation.txt
.if ${PORT_OPTIONS:MLDAP} && ${PORT_OPTIONS:MLDAP}
@${REINPLACE_CMD} -e 's|-lmilter|-lmilter -lldap|g' ${WRKSRC}/configure
.endif
post-install:
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKDIR}/activation.txt ${DOCSDIR}/activation.txt
.for f in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
.endfor
.endif
@${CAT} ${PKGMESSAGE}
.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk"
.include <bsd.port.post.mk>
|