ports/190360: [patch] Add staging support to www/podcastamatic
Joseph Benden
joe at thrallingpenguin.com
Wed May 28 23:20:00 UTC 2014
>Number: 190360
>Category: ports
>Synopsis: [patch] Add staging support to www/podcastamatic
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed May 28 23:20:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Joseph Benden
>Release: FreeBSD 11
>Organization:
>Environment:
FreeBSD lucy 11.0-CURRENT FreeBSD 11.0-CURRENT #4 r264887: Thu Apr 24 12:43:46 MST 2014 root at lucy:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
Adds staging support to www/podcastamatic.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
diff --git a/www/podcastamatic/Makefile b/www/podcastamatic/Makefile
index 1f8f7c3..121d7f3 100644
--- a/www/podcastamatic/Makefile
+++ b/www/podcastamatic/Makefile
@@ -17,10 +17,13 @@ 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}"
+SUB_FILES= pkg-message
+
do-patch:
@${REINPLACE_CMD} -e "s|${PORTNAME}.conf|${PREFIX}/etc/${PORTNAME}.conf|"\
${WRKSRC}/${PORTNAME}.pl
@@ -35,18 +38,16 @@ 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}/
+ @${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}/
.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/readme.html ${DOCSDIR}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/readme.html ${STAGEDIR}${DOCSDIR}
.endif
- @${ECHO}
- @${ECHO} "Edit ${PREFIX}/etc/${PORTNAME}.conf"
- @${ECHO} "CSS in ${PREFIX}/share/${PORTNAME}/style.css"
- @${ECHO}
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
diff --git a/www/podcastamatic/files/pkg-message.in b/www/podcastamatic/files/pkg-message.in
new file mode 100644
index 0000000..000e68f
--- /dev/null
+++ b/www/podcastamatic/files/pkg-message.in
@@ -0,0 +1,4 @@
+
+Edit %%PREFIX%%/etc/%%PORTNAME%%.conf
+CSS in %%PREFIX%%/share/%%PORTNAME%%/style.css
+
diff --git a/www/podcastamatic/pkg-plist b/www/podcastamatic/pkg-plist
index c4d411d..38e4b66 100644
--- a/www/podcastamatic/pkg-plist
+++ b/www/podcastamatic/pkg-plist
@@ -1,7 +1,7 @@
- at unexec cmp %D/etc/podcastamatic.conf.sample %D/etc/podcastamatic.conf && rm %D/etc/podcastamatic.conf || true
bin/podcastamatic
+ at 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
- at exec [ -f %B/podcastamatic.conf ] || cp %F %B/podcastamatic.conf
+ at exec cp -n %D/%F %B/podcastamatic.conf
%%PORTDOCS%%%%DOCSDIR%%/readme.html
%%DATADIR%%/style.css
@dirrm %%DATADIR%%
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list