From 146c76e881dcbae98f0055052335671147ce077b Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Thu, 5 Jun 2014 04:58:00 +0000 Subject: [PATCH] - Stage support PR: 190360 --- www/podcastamatic/Makefile | 29 ++++++++++++++--------------- www/podcastamatic/pkg-plist | 4 ++-- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/www/podcastamatic/Makefile b/www/podcastamatic/Makefile index 1f8f7c360bb8..5defa251f0b8 100644 --- a/www/podcastamatic/Makefile +++ b/www/podcastamatic/Makefile @@ -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 + 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 diff --git a/www/podcastamatic/pkg-plist b/www/podcastamatic/pkg-plist index c4d411de9aac..38e4b663d07a 100644 --- a/www/podcastamatic/pkg-plist +++ b/www/podcastamatic/pkg-plist @@ -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%%