Bug 191697 - [ staging ] mail/mimedefang
Summary: [ staging ] mail/mimedefang
Status: Closed DUPLICATE of bug 191537
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Many People
Assignee: Guido Falsi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-07 13:12 UTC by Dan Lukes
Modified: 2014-07-07 15:40 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Lukes 2014-07-07 13:12:49 UTC
mail/mimedefang require staging or will be removed

Fix:
Patch is attached. 

--- mail/mimedefang/Makefile.orig	2014-07-07 14:54:20.000000000 +0200
+++ mail/mimedefang/Makefile	2014-07-07 15:08:22.000000000 +0200
@@ -39,17 +39,16 @@
 			--with-ipheader \
 			--prefix=${PREFIX}
 
-MAN1=	mimedefang-util.1
-MAN5=	mimedefang-filter.5
-MAN7=	mimedefang-notify.7 mimedefang-protocol.7
-MAN8=	mimedefang.8 mimedefang.pl.8 mimedefang-multiplexor.8 \
-	md-mx-ctrl.8 watch-mimedefang.8 watch-multiple-mimedefangs.8
+PLIST_FILES+=	man/man1/mimedefang-util.1.gz
+PLIST_FILES+=	man/man5/mimedefang-filter.5.gz
+PLIST_FILES+=	man/man7/mimedefang-notify.7.gz man/man7/mimedefang-protocol.7.gz
+PLIST_FILES+=	man/man8/mimedefang.8.gz man/man8/mimedefang.pl.8.gz man/man8/mimedefang-multiplexor.8.gz \
+		man/man8/md-mx-ctrl.8.gz man/man8/watch-mimedefang.8.gz man/man8/watch-multiple-mimedefangs.8.gz
 
 SUB_FILES=	pkg-message
 
 CONFIG_FILES=	mimedefang-filter sa-mimedefang.cf mimedefang-ip-key
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 .if !exists( /usr/include/libmilter/mfapi.h )
@@ -77,24 +76,23 @@
 
 post-install:
 	@${REINPLACE_CMD} -e 's,%%CHMOD%%,${CHMOD},g' ${WRKSRC}/examples/init-script
-	@${INSTALL_SCRIPT} ${WRKSRC}/examples/init-script ${PREFIX}/etc/rc.d/mimedefang
+	@${INSTALL_SCRIPT} ${WRKSRC}/examples/init-script ${STAGEDIR}${PREFIX}/etc/rc.d/mimedefang
 .if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
-	@${INSTALL_DATA} ${WRKSRC}/README* ${DOCSDIR}/
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	@${INSTALL_DATA} ${WRKSRC}/README* ${STAGEDIR}${DOCSDIR}/
 .endif
 .for f in ${CONFIG_FILES}
-	@if [ ! -f ${ETCDIR}/${f} ]; then \
-		${CP} -p ${ETCDIR}/${f}.example ${ETCDIR}/${f} ; \
-	fi
+	${ECHO_CMD} "@unexec if cmp -s %D/${ETCDIR_REL}/${f}.example %D/${ETCDIR_REL}/${f}; then rm %D/${ETCDIR_REL}/${f}; fi" >> ${TMPPLIST}
+	${ECHO_CMD} "@exec if [ ! -f %D/${ETCDIR_REL}/${f} ]; then cp -p %D/${ETCDIR_REL}/${f}.example %D/${ETCDIR_REL}/${f}; fi" >> ${TMPPLIST}
 .endfor
 
 .if ${PORT_OPTIONS:MEXAMPLES}
-	@${MKDIR} ${EXAMPLESDIR}
+	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
 	@cd ${WRKSRC}/examples/ && ${INSTALL_DATA} stream-by-domain-filter \
-		suggested-minimum-filter-for-windows-clients README ${EXAMPLESDIR}/
+		suggested-minimum-filter-for-windows-clients README ${STAGEDIR}${EXAMPLESDIR}/
 .endif
-	@[ -d ${SPOOLDIR} ] && ${CHGRP} ${MAILUSER} ${SPOOLDIR}
-	@[ -d ${QUARANTINEDIR} ] && ${CHGRP} ${MAILUSER} ${QUARANTINEDIR}
+	@[ -d ${SPOOLDIR} ] && ${CHGRP} ${MAILUSER} ${STAGEDIR}${SPOOLDIR}
+	@[ -d ${QUARANTINEDIR} ] && ${CHGRP} ${MAILUSER} ${STAGEDIR}${QUARANTINEDIR}
 	@${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.mk>
Comment 1 Guido Falsi freebsd_committer freebsd_triage 2014-07-07 15:40:39 UTC
I'm marking this as duplicate since there is already a stanging PR for mail/mimedefang.

I'm checking your patch too anyway.

*** This bug has been marked as a duplicate of bug 191537 ***