Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Nov 2004 08:40:22 -0800 (PST)
From:      Linh Pham <question+fbsdports@closedsrc.org>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        perl@freebsd.org
Subject:   mail/p5-Mail-SpamAssassin: add WITH_SPF_QUERY hook to include p5-Mail-SPF-Query as a run depend
Message-ID:  <20041118164022.4668B45037@q.closedsrc.org>

next in thread | raw e-mail | index | archive | help

>Submitter-Id:	current-users
>Originator:	Linh Pham
>Organization:	
>Confidential:	no 
>Synopsis:	mail/p5-Mail-SpamAssassin: add WITH_SPF_QUERY hook to include p5-Mail-SPF-Query as a run depend
>Severity:	non-critical
>Priority:	medium
>Category:	ports
>Class:		change-request
>Release:	FreeBSD 5.2.1-RELEASE-p11 i386
>Environment:
System: FreeBSD q.internal.closedsrc.org 5.2.1-RELEASE-p11 FreeBSD 5.2.1-RELEASE-p11 #3: Thu Oct 14 23:10:30 PDT 2004 question@q.internal.closedsrc.org:/usr/obj/usr/src/sys/Q i386
>Description:
With SpamAssassin 3.0.0 and higher, it includes support for querying SPF
information while processing messages (the SPF plugin is enabled by default
in the installed ${PREFIX}/etc/mail/spamassassin/init.pre), but requires
mail/p5-Mail-SPF-Query to be installed in order to actually work.

Since SPF does include the workload and network requirements of the machine
by a little bit (even greater for high-volume mail servers), including
p5-Mail-SPF-Query by default would not be wise; so I added a hook into
the port's Makefile to allow the user to install mail/p5-Mail-SPF-Query
along with SpamAssassin. I also included a message in pre-fetch explaining
the hook.

Also bumped the PORTREVISION number in the included patch.
>How-To-Repeat:
>Fix:

--- sa-with-spf.diff begins here ---
--- p5-Mail-SpamAssassin.orig/Makefile	Thu Oct 28 09:45:16 2004
+++ p5-Mail-SpamAssassin/Makefile	Thu Nov 18 08:28:58 2004
@@ -7,7 +7,7 @@
 
 PORTNAME=	Mail-SpamAssassin
 PORTVERSION=	3.0.1
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	mail perl5
 MASTER_SITES=	${MASTER_SITE_APACHE:S/$/:apache/} ${MASTER_SITE_PERL_CPAN:S/$/:cpan/}
 MASTER_SITE_SUBDIR=	spamassassin/:apache Mail/:cpan
@@ -28,6 +28,10 @@
 	       	CONTACT_ADDRESS="the administrator of that system" \
 		BUILD_SPAMC=yes RUN_NET_TESTS=yes
 
+.if defined(WITH_SPF_QUERY)
+RUN_DEPENDS+=	spfd:${PORTSDIR}/mail/p5-Mail-SPF-Query
+.endif
+
 .if !defined(WITHOUT_OPENSSL)
 USE_OPENSSL=	yes
 CFLAGS+=	-I${OPENSSLINC}
@@ -74,6 +78,19 @@
 USE_RC_SUBR=	yes
 SED_SCRIPT=	-e 's|%%PREFIX%%|${PREFIX}|g' \
 		-e 's|%%RC_SUBR%%|${RC_SUBR}|g'
+
+pre-fetch:
+.if !defined(WITH_SPF_QUERY)
+	@${ECHO_MSG} ""
+	@${ECHO_MSG} "================================================================"
+	@${ECHO_MSG} "SpamAssassin includes support for querying SPF information, but"
+	@${ECHO_MSG} "requires mail/p5-Mail-SPF-Query to be installed. If you want to"
+	@${ECHO_MSG} "use the SPF functionality, press CTRL+C and include"
+	@${ECHO_MSG} "WITH_SPF_QUERY=YES in the make env."
+	@${ECHO_MSG} "================================================================"
+	@${ECHO_MSG} ""
+.endif
+
 post-patch:
 	@${FIND} ${WRKSRC} -name \*.orig -delete
 	@${SED} -e 's#B_CONFDIR)/local.cf#B_CONFDIR)/local.cf.sample#g' \
--- sa-with-spf.diff ends here ---




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041118164022.4668B45037>