aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2014-06-05 12:58:00 +0800
committermiwi <miwi@FreeBSD.org>2014-06-05 12:58:00 +0800
commit517fcaeb014b7c83ba8c7c31dfab7f7253a09d91 (patch)
tree36aa1627bd93ce0036de4ed0b2aa2873b0a55696 /www
parent641c5f1748fe42bb2926e1698ffab2f53bad651d (diff)
downloadfreebsd-ports-gnome-517fcaeb014b7c83ba8c7c31dfab7f7253a09d91.tar.gz
freebsd-ports-gnome-517fcaeb014b7c83ba8c7c31dfab7f7253a09d91.tar.zst
freebsd-ports-gnome-517fcaeb014b7c83ba8c7c31dfab7f7253a09d91.zip
- Stage support
PR: 190360
Diffstat (limited to 'www')
-rw-r--r--www/podcastamatic/Makefile29
-rw-r--r--www/podcastamatic/pkg-plist4
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 <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>
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%%