1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

- Stage support

PR:		190360
This commit is contained in:
Martin Wilke 2014-06-05 04:58:00 +00:00
parent e3e172a364
commit 146c76e881
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=356582
2 changed files with 16 additions and 17 deletions

View File

@ -17,10 +17,16 @@ RUN_DEPENDS= p5-MP3-Info>=0:${PORTSDIR}/audio/p5-MP3-Info \
USES= perl5 zip
USE_PERL5= run
USES+= shebangfix
SHEBANG_FILES= podcastamatic.pl
NO_BUILD= yes
NO_STAGE= yes
SUB_LIST= PORTNAME="${PORTNAME}"
OPTIONS_DEFINE= DOCS
.include <bsd.port.options.mk>
do-patch:
@${REINPLACE_CMD} -e "s|${PORTNAME}.conf|${PREFIX}/etc/${PORTNAME}.conf|"\
${WRKSRC}/${PORTNAME}.pl
@ -35,18 +41,11 @@ do-patch:
@${REINPLACE_CMD} -e "s|[wW]:|${PREFIX}/www|" ${WRKSRC}/example_${PORTNAME}.conf
do-install:
@${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.pl ${PREFIX}/bin/${PORTNAME}
@${INSTALL_DATA} ${WRKSRC}/example_${PORTNAME}.conf ${PREFIX}/etc/${PORTNAME}.conf.sample
test \! -f ${PREFIX}/etc/${PORTNAME}.conf && ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf ${PREFIX}/etc/${PORTNAME}.conf || true
@${MKDIR} ${PREFIX}/share/${PORTNAME}
@${INSTALL_DATA} ${WRKSRC}/style.css ${PREFIX}/share/${PORTNAME}/
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/readme.html ${DOCSDIR}
.endif
@${ECHO}
@${ECHO} "Edit ${PREFIX}/etc/${PORTNAME}.conf"
@${ECHO} "CSS in ${PREFIX}/share/${PORTNAME}/style.css"
@${ECHO}
@${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.pl ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
@${INSTALL_DATA} ${WRKSRC}/example_${PORTNAME}.conf ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
@${MKDIR} ${STAGEDIR}${PREFIX}/share/${PORTNAME}
@${INSTALL_DATA} ${WRKSRC}/style.css ${STAGEDIR}${PREFIX}/share/${PORTNAME}/
@${MKDIR} ${STAGEDIR}${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/readme.html ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>

View File

@ -1,7 +1,7 @@
@unexec cmp %D/etc/podcastamatic.conf.sample %D/etc/podcastamatic.conf && rm %D/etc/podcastamatic.conf || true
bin/podcastamatic
@unexec if cmp -s %D/etc/podcastamatic.conf %D/etc/podcastamatic.conf.sample; then rm -f %D/etc/podcastamatic.conf; fi
etc/podcastamatic.conf.sample
@exec [ -f %B/podcastamatic.conf ] || cp %F %B/podcastamatic.conf
@exec cp -n %D/%F %B/podcastamatic.conf
%%PORTDOCS%%%%DOCSDIR%%/readme.html
%%DATADIR%%/style.css
@dirrm %%DATADIR%%