summaryrefslogtreecommitdiff
path: root/mail/spamass-milter
diff options
context:
space:
mode:
authorMuhammad Moinur Rahman <bofh@FreeBSD.org>2023-02-11 06:28:23 -0600
committerMuhammad Moinur Rahman <bofh@FreeBSD.org>2023-02-11 06:32:43 -0600
commit9bce8280df4b4b9e107b3d643d87a2f89b3adae4 (patch)
tree3a3bb881c1f8ccbe93925ea843be67174f02e2b5 /mail/spamass-milter
parentsysutils/uutils: Cross-platform Rust rewrite of the GNU coreutils (diff)
mail/spamass-milter: Fix build
- While converting USE_LDAP=yes to USES=ldap this port was missed. Fix this. - Utilize OPTIONS framework - Utilize USES=localbase - Refactor conditional PORTDOCS as by function this is conditional PR: 269485 Reported by: dinoex Approved by: portmgr (just-fix-it) Fixes: 6e1233b Mk/**ldap.mk: Convert USE_LDAP to USES=ldap
Diffstat (limited to 'mail/spamass-milter')
-rw-r--r--mail/spamass-milter/Makefile35
1 files changed, 14 insertions, 21 deletions
diff --git a/mail/spamass-milter/Makefile b/mail/spamass-milter/Makefile
index 1148b1b1acc0..99d8db475e19 100644
--- a/mail/spamass-milter/Makefile
+++ b/mail/spamass-milter/Makefile
@@ -8,14 +8,24 @@ MAINTAINER= bmah@FreeBSD.org
COMMENT= Sendmail Milter (mail filter) plugin for SpamAssassin
WWW= https://savannah.nongnu.org/projects/spamass-milt/
+LICENSE= GPLv2
+
BUILD_DEPENDS= spamc:mail/spamassassin
RUN_DEPENDS:= ${BUILD_DEPENDS}
-LICENSE= GPLv2
+USE_RC_SUBR= spamass-milter
+
+GNU_CONFIGURE= yes
+
+SUB_FILES= pkg-message
+
+PORTDOCS= AUTHORS ChangeLog NEWS README TODO
OPTIONS_DEFINE= LDAP MILTER_PORT DOCS
MILTER_PORT_DESC= Build against libmilter port
+LDAP_USES= ldap localbase:ldflags
+
.include <bsd.port.pre.mk>
.if exists(${LOCALBASE}/lib/libldap.so)
@@ -23,36 +33,19 @@ WITH_LDAP=yes
.undef WITHOUT_LDAP
.endif
-.if ${PORT_OPTIONS:MLDAP}
-USE+= ldap
-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
-
post-patch:
@${SED} -e's,%%PREFIX%%,${PREFIX},g' \
${FILESDIR}/activation.txt > ${WRKDIR}/activation.txt
-.if ${PORT_OPTIONS:MLDAP} && ${PORT_OPTIONS:MLDAP}
+
+post-patch-LDAP-on:
@${REINPLACE_CMD} -e 's|-lmilter|-lmilter -lldap|g' ${WRKSRC}/configure
-.endif
-post-install:
-.if ${PORT_OPTIONS:MDOCS}
+post-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKDIR}/activation.txt ${STAGEDIR}${DOCSDIR}/activation.txt
.for f in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
.endfor
-.endif
.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk"
.include <bsd.port.post.mk>