ports/156883: Fix port: mail/mailscanner: Correct DEPENDS, fix PREFIX error
Chris Rees
utisoft at gmail.com
Sun May 8 13:00:21 UTC 2011
>Number: 156883
>Category: ports
>Synopsis: Fix port: mail/mailscanner: Correct DEPENDS, fix PREFIX error
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun May 08 13:00:18 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Chris Rees
>Release:
>Organization:
>Environment:
>Description:
Mailscanner's port has two fairly serious problems at the moment:
RUN_DEPENDS+= ${BUILD_DEPENDS}
although not necessarily bad would be better as:
RUN_DEPENDS:= ${BUILD_DEPENDS}
to avoid sucking in extra RUN_DEPENDS.
Also,
${LN} -s ${LOCALBASE}/sbin/mailscanner ${PREFIX}/sbin/MailScanner
makes absolutely no sense at all, since ${PREFIX}/sbin/mailscanner is installed in the line above it; if PREFIX!=LOCALBASE that's an error.
Also I took the opportunity to remove a stale %%RC_SUBR%% reinplace, and integrated three calls of perl to one call of sed.
>How-To-Repeat:
>Fix:
- Use PREFIX instead of LOCALBASE for files installed by this port
- Remove obsolete %%RC_SUBR%% reference
- Use RUN_DEPENDS:= ${BUILD_DEPENDS} to avoid pulling in extras
Submitted by: Chris Rees (utisoft at gmail.com)
Patch attached with submission follows:
Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/mail/mailscanner/Makefile,v
retrieving revision 1.94
diff -u -r1.94 Makefile
--- Makefile 11 Apr 2011 15:01:50 -0000 1.94
+++ Makefile 8 May 2011 12:48:11 -0000
@@ -34,7 +34,7 @@
${SITE_PERL}/OLE/Storage_Lite.pm:${PORTSDIR}/devel/p5-OLE-Storage_Lite \
${SITE_PERL}/Sys/SigAction.pm:${PORTSDIR}/devel/p5-Sys-SigAction
-RUN_DEPENDS+= ${BUILD_DEPENDS} \
+RUN_DEPENDS:= ${BUILD_DEPENDS} \
bash:${PORTSDIR}/shells/bash \
tnef:${PORTSDIR}/converters/tnef \
wget:${PORTSDIR}/ftp/wget
@@ -152,19 +152,12 @@
${PERL} -pi -e \
's,/opt/MailScanner/lib,${PREFIX}/libexec/MailScanner,g; \
s,/bin/false,/usr/bin/false,;' ${WRKSRC}/etc/virus.scanners.conf
- ${PERL} -pi -e \
- 's,/bin/bash,${LOCALBASE}/bin/bash,g; \
- s,/opt/MailScanner/etc,${PREFIX}/etc/MailScanner,g; \
- s,/opt/MailScanner/bin,${PREFIX}/libexec/MailScanner,g;' \
- ${WRKSRC}/bin/update_virus_scanners
- ${PERL} -pi -e \
- 's,/bin/bash,${LOCALBASE}/bin/bash,g; \
- s,/opt/MailScanner/bin,${PREFIX}/libexec/MailScanner,g; \
- s,%%RC_SUBR%%,/etc/rc.subr,g;' \
- ${WRKSRC}/bin/cron/update_virus_scanners.cron
- ${PERL} -pi -e \
- 's,/bin/bash,${LOCALBASE}/bin/bash,g; \
- s,/opt/MailScanner/etc,${PREFIX}/etc/MailScanner,g;' \
+ ${REINPLACE_CMD} \
+ -e 's,/bin/bash,${LOCALBASE}/bin/bash,g' \
+ -e 's,/opt/MailScanner/etc,${PREFIX}/etc/MailScanner,g' \
+ -e 's,/opt/MailScanner/bin,${PREFIX}/libexec/MailScanner,g' \
+ ${WRKSRC}/bin/update_virus_scanners \
+ ${WRKSRC}/bin/cron/update_virus_scanners.cron \
${WRKSRC}/bin/update_bad_phishing_emails
${PERL} -pi -e \
's,/bin/bash,${LOCALBASE}/bin/bash,g; \
@@ -229,7 +222,7 @@
# Step 1: Install bin files
#
${INSTALL_SCRIPT} ${WRKSRC}/bin/MailScanner ${PREFIX}/sbin/mailscanner
- ${LN} -s ${LOCALBASE}/sbin/mailscanner ${PREFIX}/sbin/MailScanner
+ ${LN} -s ${PREFIX}/sbin/mailscanner ${PREFIX}/sbin/MailScanner
#
# Step 2: Install libexec files
#
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list