forked from Lainports/freebsd-ports
security/scamp: support stage
- Use @sample Approved by: portmgr (stage blanket)
This commit is contained in:
parent
036cc85c08
commit
7e091dbe7e
2 changed files with 9 additions and 34 deletions
|
|
@ -25,38 +25,20 @@ RUN_DEPENDS+= curl>=7.24.0_2:${PORTSDIR}/ftp/curl
|
|||
NO_BUILD= yes
|
||||
SUB_FILES= pkg-message
|
||||
|
||||
MAN1= scamp.1
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
NO_STAGE= yes
|
||||
.include <bsd.port.options.mk>
|
||||
PORTDOCS= README CHANGE.LOG INSTALL Release.pdf
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|CLAMAV_DB=$${CLAMAV_DB:-""}|CLAMAV_DB=$${CLAMAV_DB:-\"/var/db/clamav\"}|g' ${WRKSRC}/${PORTNAME}.sh
|
||||
@${REINPLACE_CMD} -e 's|CONFIG_DIR=$${CONFIG_DIR:-"/etc/scamp"}|CONFIG_DIR=$${CONFIG_DIR:-"${ETCDIR}"}|g' ${WRKSRC}/${PORTNAME}.sh
|
||||
|
||||
post-install:
|
||||
@if [ ! -d ${ETCDIR} ]; then \
|
||||
${MKDIR} ${ETCDIR} ; \
|
||||
fi
|
||||
|
||||
@${INSTALL_DATA} ${FILESDIR}/default.sample ${ETCDIR}
|
||||
|
||||
@if [ ! -f ${PREFIX}/etc/scamp/default ]; then \
|
||||
${CP} -p ${PREFIX}/etc/scamp/default.sample ${PREFIX}/etc/scamp/default ; \
|
||||
fi
|
||||
|
||||
do-install:
|
||||
cd ${WRKSRC} && ${INSTALL_SCRIPT} ${PORTNAME}.sh ${PREFIX}/bin
|
||||
cd ${WRKSRC} && ${INSTALL_MAN} scamp.1 ${MANPREFIX}/man/man1
|
||||
|
||||
# Documentation
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
cd ${WRKSRC} && ${INSTALL_DATA} README CHANGE.LOG INSTALL Release.pdf ${DOCSDIR}
|
||||
.endif
|
||||
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
cd ${WRKSRC} && ${INSTALL_SCRIPT} ${PORTNAME}.sh ${STAGEDIR}${PREFIX}/bin
|
||||
cd ${WRKSRC} && ${INSTALL_MAN} scamp.1 ${STAGEDIR}${MANPREFIX}/man/man1
|
||||
@${MKDIR} ${STAGEDIR}${ETCDIR}
|
||||
${INSTALL_DATA} ${FILESDIR}/default.sample ${STAGEDIR}${ETCDIR}
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,4 @@
|
|||
bin/scamp.sh
|
||||
%%PORTDOCS%%%%DOCSDIR%%/CHANGE.LOG
|
||||
%%PORTDOCS%%%%DOCSDIR%%/INSTALL
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Release.pdf
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
||||
@exec mkdir -p %D/etc/scamp
|
||||
@unexec if cmp -s %D/etc/scamp/default.sample %D/etc/scamp/default; then rm -f %D/etc/scamp/default; fi
|
||||
etc/scamp/default.sample
|
||||
@exec if [ ! -f %D/etc/scamp/default ] ; then cp -p %D/%F %B/default; fi
|
||||
man/man1/scamp.1.gz
|
||||
@sample etc/scamp/default.sample
|
||||
@dirrmtry etc/scamp
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue