net-mgmt/cricket: STAGEify, minor cleanups, add'l patch

PR:		192326
Submitted by:	fullermd@over-yonder.net
This commit is contained in:
Kurt Jaeger 2014-08-02 04:57:30 +00:00
parent c9797be5d5
commit f6b494b8b8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=363783
3 changed files with 26 additions and 20 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= cricket
PORTVERSION= 1.0.5
PORTREVISION= 9
PORTREVISION= 10
CATEGORIES= net-mgmt
MASTER_SITES= SF
@ -25,34 +25,28 @@ SUB_FILES= pkg-message
USERS= cricket
GROUPS= www
NO_STAGE= yes
CRICKETBASE= ${STAGEDIR}${PREFIX}/cricket
.include <bsd.port.pre.mk>
post-patch:
@${REINPLACE_CMD} -e 's,/home/cricket,${PREFIX},g' \
${REINPLACE_CMD} -e 's,/home/cricket,${PREFIX},g' \
${WRKSRC}/cricket-conf.pl.sample
@${REINPLACE_CMD} -e 's,/usr/local/net/bin/ssh,/usr/bin/ssh,g' \
${REINPLACE_CMD} -e 's,/usr/local/net/bin/ssh,/usr/bin/ssh,g' \
${WRKSRC}/sample-config/news-server/Defaults
do-install:
@${MKDIR} -m 755 ${PREFIX}/cricket/cricket-${PORTVERSION}
@${CP} -R ${WRKSRC}/* ${PREFIX}/cricket/cricket-${PORTVERSION}
@${FIND} ${PREFIX}/cricket/cricket-${PORTVERSION} -name \*.orig -or \
${MKDIR} -m 755 ${CRICKETBASE}/cricket-${PORTVERSION}
${CP} -R ${WRKSRC}/* ${CRICKETBASE}/cricket-${PORTVERSION}
${FIND} ${CRICKETBASE}/cricket-${PORTVERSION} -name \*.orig -or \
-name \*.bak | ${XARGS} ${RM} -f
${CHOWN} -R ${USERS}:${GROUPS} ${PREFIX}/cricket
@if [ -L ${PREFIX}/cricket/cricket ]; then \
${ECHO_MSG} "Updating ${PREFIX}/cricket/cricket symbolic link"; \
${RM} ${PREFIX}/cricket/cricket; \
fi
${LN} -s ${PREFIX}/cricket/cricket-${PORTVERSION} \
${PREFIX}/cricket/cricket
@if [ -f ${LOCALBASE}/cricket/compile ] ; then \
${LN} -s cricket-${PORTVERSION} \
${CRICKETBASE}/cricket
if [ -f ${LOCALBASE}/cricket/compile ] ; then \
${ECHO_MSG} "You should migrate manually to use new cricket"; \
${ECHO_MSG} "installation scheme."; \
fi
@${INSTALL_DATA} ${WRKSRC}/cricket-conf.pl.sample ${PREFIX}/etc/cricket-conf.pl.dist
post-install:
@${CAT} ${PKGMESSAGE}
${INSTALL_DATA} ${WRKSRC}/cricket-conf.pl.sample \
${STAGEDIR}${PREFIX}/etc/cricket-conf.pl.dist
.include <bsd.port.post.mk>

View File

@ -0,0 +1,10 @@
--- grapher.cgi.orig 2014-08-01 19:00:52.520583589 -0500
+++ grapher.cgi 2014-08-01 19:01:57.223574944 -0500
@@ -1490,6 +1490,7 @@
# things we pick up form the target dict
my($rrd) = $targRef->{'rrd-datafile'};
$lasttime = scalar(localtime(RRDs::last($rrd)));
+ $lasttime =~ s/:/\\:/g;
# use the dslist to create a set of defs/cdefs

View File

@ -1,3 +1,5 @@
@owner cricket
@group www
cricket/cricket
cricket/cricket-%%VERSION%%/CHANGES
cricket/cricket-%%VERSION%%/COPYING
@ -164,4 +166,4 @@ etc/cricket-conf.pl.dist
@dirrm cricket/cricket-%%VERSION%%/doc/neta-paper
@dirrm cricket/cricket-%%VERSION%%/doc
@dirrm cricket/cricket-%%VERSION%%
@dirrm cricket/
@dirrmtry cricket/