- Add NO_ARCH

- Style nits
- Switch to options helpers
- Drop dirrm's from plist
- Handle links properly
- Switch to @postunexec

PR:		205570
Submitted by:	amdmi3
Approved by:	rnejdl@ringofsaturn.com (maintainer)
This commit is contained in:
Dmitry Marakasov 2015-12-25 18:27:25 +00:00
parent 43521c2a1e
commit 661134d799
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=404446
2 changed files with 21 additions and 33 deletions

View file

@ -18,6 +18,7 @@ RUN_DEPENDS= p5-Net-DNS>=0.68:${PORTSDIR}/dns/p5-Net-DNS \
USES= perl5 zip:infozip shebangfix
SHEBANG_FILES= *.pl
NO_BUILD= yes
NO_ARCH= yes
USE_PERL5= run
ASSP_USER= assp
@ -138,14 +139,17 @@ do-install:
${INSTALL_MAN} ${WRKDIR}/assp.8 ${STAGEDIR}${MAN8PREFIX}/man/man8
${INSTALL_MAN} ${WRKDIR}/assplog.8 ${STAGEDIR}${MAN8PREFIX}/man/man8
${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily
${INSTALL_SCRIPT} ${WRKDIR}/510.assp ${STAGEDIR}${PREFIX}/etc/periodic/daily/
${MKDIR} ${STAGEDIR}${ASSP_HOME}
${MKDIR} ${STAGEDIR}${ASSP_LOG}
@${MKDIR} ${STAGEDIR}${ASSP_HOME}
@${MKDIR} ${STAGEDIR}${ASSP_LOG}
.for f in files images rebuildspamdb.pl reports
${LN} -sf ${DATADIR}/${f} ${STAGEDIR}${ASSP_HOME}/
.endfor
${LN} -sf ${ASSP_LOG} ${STAGEDIR}${ASSP_HOME}/logs
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${STAGEDIR}${DOCSDIR}
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/docs/*.htm ${STAGEDIR}${DOCSDIR}
.endif
.include <bsd.port.mk>

View file

@ -98,32 +98,16 @@ sbin/assplog
%%DATADIR%%/stat.pl
%%PORTDOCS%%%%DOCSDIR%%/Legacy - ASSP Documentation.htm
%%PORTDOCS%%%%DOCSDIR%%/Regular Expression Tutorial.htm
%%PORTDOCS%%@dirrm %%DOCSDIR%%
man/man8/assp.8.gz
man/man8/assplog.8.gz
@dirrmtry %%DATADIR%%/reports
@dirrmtry %%DATADIR%%/logs
@dirrmtry %%DATADIR%%/images
@dirrmtry %%DATADIR%%/files
@dirrmtry %%DATADIR%%
@dirrmtry etc/periodic/daily
@dirrmtry etc/periodic
@exec ln -sf %D/%%DATADIR%%/files %%ASSP_HOME%%/
@unexec rm -f %%ASSP_HOME%%/files
@exec ln -sf %D/%%DATADIR%%/images %%ASSP_HOME%%/
@unexec rm -f %%ASSP_HOME%%/images
@exec ln -sf %D/%%DATADIR%%/rebuildspamdb.pl %%ASSP_HOME%%/
@unexec rm -f %%ASSP_HOME%%/rebuildspamdb.pl
@exec ln -sf %D/%%DATADIR%%/reports %%ASSP_HOME%%/
@unexec rm -f %%ASSP_HOME%%/reports
@exec ln -sf %%ASSP_LOG%% %%ASSP_HOME%%/logs
@unexec rm -f %%ASSP_HOME%%/logs
@cwd /
@owner %%ASSP_USER%%
@group %%ASSP_GROUP%%
@mode 750
@dirrmtry %%ASSP_LOG%%
@dirrmtry %%ASSP_HOME%%
@unexec if [ -d %%ASSP_HOME%% ]; then echo "If you are deinstalling ASSP completely, remove the %%ASSP_HOME%% directory."; fi
@unexec if [ -d %%ASSP_LOG%% ]; then echo "If you are deinstalling ASSP completely, remove the %%ASSP_LOG%% directory."; fi
@unexec echo "If you are deinstalling ASSP completely, delete the ASSP user and group."
%%ASSP_HOME%%/files
%%ASSP_HOME%%/images
%%ASSP_HOME%%/rebuildspamdb.pl
%%ASSP_HOME%%/reports
%%ASSP_HOME%%/logs
@dir %%DATADIR%%/logs
@dir(%%ASSP_USER%%,%%ASSP_GROUP%%,750) %%ASSP_LOG%%
@dir(%%ASSP_USER%%,%%ASSP_GROUP%%,750) %%ASSP_HOME%%
@postunexec if [ -d %%ASSP_HOME%% ]; then echo "If you are deinstalling ASSP completely, remove the %%ASSP_HOME%% directory."; fi
@postunexec if [ -d %%ASSP_LOG%% ]; then echo "If you are deinstalling ASSP completely, remove the %%ASSP_LOG%% directory."; fi
@postunexec echo "If you are deinstalling ASSP completely, delete the ASSP user and group."