Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Aug 2014 13:37:46 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r365186 - head/mail/milter-greylist
Message-ID:  <201408171337.s7HDbktD015971@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Sun Aug 17 13:37:46 2014
New Revision: 365186
URL: http://svnweb.freebsd.org/changeset/ports/365186
QAT: https://qat.redports.org/buildarchive/r365186/

Log:
  mail/milter-greylist: Fix and simplify makefile
  
  This port was conditionally installing manpages per option, which is
  not allowed.  While fixing this, align it with the recently modernized
  milter-greylist-devel port, which includes:
  
   * Remove assignment of BUILD_DEPENDS to RUN_DEPENDS (illegal).  The
     BUILD_DEPENDS is empty by default
   * Use options to set dependencies and configure arguments
   * Use PORTDOCS and PORTEXAMPLES
   * Wrap to 80 columns
   * Combine post-install target with do-install target
   * include local .mk with relative path instead of hardcoded PORTSDIR
  
  PR:		192740
  Submitted by:	Daniel Austin (per my request)
  Approved by:	Just Fix It

Modified:
  head/mail/milter-greylist/Makefile
  head/mail/milter-greylist/pkg-plist

Modified: head/mail/milter-greylist/Makefile
==============================================================================
--- head/mail/milter-greylist/Makefile	Sun Aug 17 13:15:18 2014	(r365185)
+++ head/mail/milter-greylist/Makefile	Sun Aug 17 13:37:46 2014	(r365186)
@@ -3,7 +3,7 @@
 
 PORTNAME=	milter-greylist
 PORTVERSION=	4.4.3
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	mail
 MASTER_SITES=	ftp://ftp.espci.fr/pub/milter-greylist/ \
 		http://fossies.org/unix/privat/
@@ -30,71 +30,71 @@ MAKE_JOBS_UNSAFE=	yes
 # installed port preference over it.
 ##
 
-OPTIONS_DEFINE=		MANPAGES SPF GEOIP CURL LDAP P0F POSTFIX DOCS EXAMPLES
-OPTIONS_DEFAULT=	MANPAGES
+OPTIONS_DEFINE=		SPF GEOIP CURL LDAP P0F POSTFIX DOCS EXAMPLES
 SPF_DESC=		SPF support
 CURL_DESC=		curl support
 P0F_DESC=		P0F support
 POSTFIX_DESC=		Use Postfix instead of Sendmail
 
+P0F_RUN_DEPENDS+=	p0f:${PORTSDIR}/net-mgmt/p0f
+SPF_BUILD_DEPENDS+=	libspf2>=1.2.5:${PORTSDIR}/mail/libspf2
+CURL_BUILD_DEPENDS+=	curl>=7.18:${PORTSDIR}/ftp/curl
+GEOIP_BUILD_DEPENDS+=	GeoIP>=1.4.4:${PORTSDIR}/net/GeoIP
+
+POSTFIX_CONFIGURE_ENABLE=	postfix
+P0F_CONFIGURE_ENABLE=		p0f306
+
 .include <bsd.port.options.mk>
 
-.if ${PORT_OPTIONS:MMANPAGES}
-PLIST_FILES+=	man/man5/greylist.conf.5.gz \
-		man/man8/milter-greylist.8.gz
-.endif
 .if ${PORT_OPTIONS:MSPF}
-BUILD_DEPENDS+=	libspf2>=1.2.5:${PORTSDIR}/mail/libspf2
 CONFIGURE_ARGS+=	--with-libspf2=${LOCALBASE}
 .endif
+
 .if ${PORT_OPTIONS:MGEOIP}
-BUILD_DEPENDS+=	GeoIP>=1.4.4:${PORTSDIR}/net/GeoIP
 CONFIGURE_ARGS+=	--with-libGeoIP=${LOCALBASE}
 .endif
+
 .if ${PORT_OPTIONS:MCURL}
-BUILD_DEPENDS+=	curl>=7.18:${PORTSDIR}/ftp/curl
 CONFIGURE_ARGS+=	--with-libcurl=${LOCALBASE}
 .endif
+
 .if ${PORT_OPTIONS:MLDAP}
+# We can't use LDAP_CONFIGURE_WITH because configure script is buggy
 USE_OPENLDAP=yes
 CONFIGURE_ARGS+=	--with-openldap
 .endif
-.if ${PORT_OPTIONS:MP0F}
-RUN_DEPENDS+=	p0f:${PORTSDIR}/net-mgmt/p0f
-CONFIGURE_ARGS+=	--enable-p0f306
-.endif
-.if ${PORT_OPTIONS:MPOSTFIX}
-CONFIGURE_ARGS+=	--enable-postfix
-.else
+
+.if ! ${PORT_OPTIONS:MPOSTFIX}
 LDFLAGS+=	${SENDMAIL_LDFLAGS}
 LIBS+=		${SENDMAIL_LDADD}
 .endif
-RUN_DEPENDS+=	${BUILD_DEPENDS}
 
 CFLAGS+=	${PTHREAD_CFLAGS}
 LIBS+=		${PTHREAD_LIBS}
 
 GNU_CONFIGURE=	yes
-CONFIGURE_ARGS+=	--with-user=mailnull --with-libmilter=${MILTERBASE} \
-			--enable-dnsrbl --with-thread-safe-resolver \
+CONFIGURE_ARGS+=	--with-user=mailnull \
+			--with-libmilter=${MILTERBASE} \
+			--enable-dnsrbl \
+			--with-thread-safe-resolver \
 			--with-dumpfile=/var/milter-greylist/greylist.db
 
 ALL_TARGET=	milter-greylist
 SUB_FILES+=	pkg-message
-
 USE_RC_SUBR=	milter-greylist
+PORTDOCS=	README
+PORTEXAMPLES=	greylist.conf
 
 do-install:
 	${MKDIR} ${STAGEDIR}${PREFIX}/etc/mail
-.if ${PORT_OPTIONS:MMANPAGES}
-	${INSTALL_MAN} ${WRKSRC}/greylist.conf.5 ${STAGEDIR}${PREFIX}/man/man5/
-	${INSTALL_MAN} ${WRKSRC}/milter-greylist.8 ${STAGEDIR}${PREFIX}/man/man8/
-.endif
-	${INSTALL_PROGRAM} ${WRKSRC}/milter-greylist ${STAGEDIR}${PREFIX}/libexec/
+	${INSTALL_MAN} ${WRKSRC}/greylist.conf.5 \
+		${STAGEDIR}${PREFIX}/man/man5/
+	${INSTALL_MAN} ${WRKSRC}/milter-greylist.8 \
+		${STAGEDIR}${PREFIX}/man/man8/
+	${INSTALL_PROGRAM} ${WRKSRC}/milter-greylist \
+		${STAGEDIR}${PREFIX}/libexec/
 	${INSTALL_DATA} ${WRKSRC}/greylist.conf \
 		${STAGEDIR}${PREFIX}/etc/mail/greylist.conf.sample
-
-post-install:
 .if ${PORT_OPTIONS:MDOCS}
 	${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}/
@@ -104,6 +104,6 @@ post-install:
 	${INSTALL_DATA} ${WRKSRC}/greylist.conf ${STAGEDIR}${EXAMPLESDIR}/
 .endif
 
-.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk"
+.include "${.CURDIR}/../sendmail/bsd.milter.mk"
 
 .include <bsd.port.mk>

Modified: head/mail/milter-greylist/pkg-plist
==============================================================================
--- head/mail/milter-greylist/pkg-plist	Sun Aug 17 13:15:18 2014	(r365185)
+++ head/mail/milter-greylist/pkg-plist	Sun Aug 17 13:37:46 2014	(r365186)
@@ -1,11 +1,9 @@
 libexec/milter-greylist
+man/man5/greylist.conf.5.gz
+man/man8/milter-greylist.8.gz
 etc/mail/greylist.conf.sample
-%%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/greylist.conf
 @exec /bin/mkdir -p /var/milter-greylist
 @exec /usr/sbin/chown -R mailnull:mailnull /var/milter-greylist
 @exec [ -f /var/db/milter-greylist/greylist.db ] && printf '\n\n************************************************************\n************************************************************\n**                                                        **\n**                        WARNING                         **\n**                                                        **\n** The default dump file location has changed.            **\n** Please move greylist.db from /var/db/milter-greylist/  **\n** to /var/milter-greylist/ and update your greylist.conf **\n** accordingly.                                           **\n**                                                        **\n************************************************************\n************************************************************\n' ||true
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
-%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
 @dirrmtry etc/mail
 @unexec [ -f /var/milter-greylist/greylist.db ] || rmdir /var/milter-greylist || true



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