diff --git a/mail/amavis-logwatch/Makefile b/mail/amavis-logwatch/Makefile index aff5bdc3b313..e123eeb4f840 100644 --- a/mail/amavis-logwatch/Makefile +++ b/mail/amavis-logwatch/Makefile @@ -7,7 +7,7 @@ CATEGORIES= mail MASTER_SITES= SF/logreporters/${PORTNAME}/release/${PORTVERSION} EXTRACT_SUFX= .tgz -MAINTAINER= ports@FreeBSD.org +MAINTAINER= ports@FreeBSD.org COMMENT= Amavisd-new log parser LICENSE= MIT @@ -16,36 +16,35 @@ LICENSE_FILE= ${WRKSRC}/LICENSE PORTDOCS= Bugs Changes README PORTEXAMPLES= ${PORTNAME}.conf -MAN1= ${PORTNAME}.1 - -USES= perl5 +USES= perl5 shebangfix USE_PERL5= run NO_BUILD= yes +SHEBANG_FILES= amavis-logwatch +OPTIONS_DEFINE= EXAMPLES DOCS +OPTIONS_DEFAULT=EXAMPLES DOCS + +.include -NO_STAGE= yes post-patch: @cd ${WRKSRC} && ${REINPLACE_CMD} -e '\ s!/usr/local/etc!${ETCDIR}! \ ' ${PORTNAME} ${PORTNAME}.1 README do-install: - ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin - ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${MAN1PREFIX}/man/man1 + ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 @${CP} ${WRKSRC}/${PORTNAME}.conf ${WRKSRC}/${PORTNAME}.conf.sample - @${MKDIR} ${ETCDIR} - ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf.sample ${ETCDIR} + @${MKDIR} ${STAGEDIR}${ETCDIR} + ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf.sample ${STAGEDIR}${ETCDIR} post-install: - @if [ ! -f ${ETCDIR}/${PORTNAME}.conf ]; then \ - ${CP} -p ${ETCDIR}/${PORTNAME}.conf.sample ${ETCDIR}/${PORTNAME}.conf; \ - fi -.if !defined(NOPORTDOCS) - @${MKDIR} ${DOCSDIR} - cd ${WRKSRC} && ${INSTALL_MAN} ${PORTDOCS} ${DOCSDIR} +.if ${PORT_OPTIONS:MDOCS} + @${MKDIR} ${STAGEDIR}${DOCSDIR} + cd ${WRKSRC} && ${INSTALL_MAN} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} .endif -.if !defined(NOPORTEXAMPLES) - @${MKDIR} ${EXAMPLESDIR} - cd ${WRKSRC} && ${INSTALL_DATA} ${PORTEXAMPLES} ${EXAMPLESDIR} +.if ${PORT_OPTIONS:MEXAMPLES} + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + cd ${WRKSRC} && ${INSTALL_DATA} ${PORTEXAMPLES} ${STAGEDIR}${EXAMPLESDIR} .endif .include diff --git a/mail/amavis-logwatch/pkg-plist b/mail/amavis-logwatch/pkg-plist index 4b055a90204b..56901ad30750 100644 --- a/mail/amavis-logwatch/pkg-plist +++ b/mail/amavis-logwatch/pkg-plist @@ -1,5 +1,4 @@ -@unexec if cmp -s %D/%%ETCDIR%%/amavis-logwatch.conf.sample %D/%%ETCDIR%%/amavis-logwatch.conf; then rm -f %D/%%ETCDIR%%/amavis-logwatch.conf; fi %%ETCDIR%%/amavis-logwatch.conf.sample -@exec if [ ! -f %B/amavis-logwatch.conf ] ; then cp -p %B/%f %B/amavis-logwatch.conf; fi +man/man1/amavis-logwatch.1.gz @dirrmtry %%ETCDIR%% bin/amavis-logwatch