From 958b071eb0e393bd733021593f3135d4ef4d10a0 Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Wed, 13 Sep 2006 10:35:59 +0000 Subject: drraw is a simple web based presentation front-end for RRDtool that allows you to interactively build graphs of your own design. A graph definition can be turned into a template which may be applied to many Round Robin Database files. drraw specializes in providing an easy means of displaying data stored with RRDtool and does not care about how the data is collected, making it a great complement to other RRDtool front-ends. WWW: http://web.taranis.org/drraw/ PR: ports/101664 Submitted by: Jim Riggs --- www/drraw/Makefile | 67 ++++++++++++++++++++++++++++++++++++++++ www/drraw/distinfo | 3 ++ www/drraw/files/patch-drraw.cgi | 11 +++++++ www/drraw/files/patch-drraw.conf | 44 ++++++++++++++++++++++++++ www/drraw/pkg-descr | 9 ++++++ www/drraw/pkg-plist | 14 +++++++++ 6 files changed, 148 insertions(+) create mode 100644 www/drraw/Makefile create mode 100644 www/drraw/distinfo create mode 100644 www/drraw/files/patch-drraw.cgi create mode 100644 www/drraw/files/patch-drraw.conf create mode 100644 www/drraw/pkg-descr create mode 100644 www/drraw/pkg-plist (limited to 'www/drraw') diff --git a/www/drraw/Makefile b/www/drraw/Makefile new file mode 100644 index 000000000000..02d2703559a0 --- /dev/null +++ b/www/drraw/Makefile @@ -0,0 +1,67 @@ +# New ports collection makefile for: drraw +# Date created: 2006-08-08 +# Whom: Jim Riggs +# +# $FreeBSD$ +# + +PORTNAME= drraw +PORTVERSION= 2.1.3 +CATEGORIES= www +MASTER_SITES= http://web.taranis.org/drraw/dist/ +EXTRACT_SUFX= .tgz + +MAINTAINER= ports@christianserving.org +COMMENT= A simple web-based presentation front-end for RRDtool + +RUN_DEPENDS+= ${SITE_PERL}/RRDp.pm:${PORTSDIR}/net/rrdtool + +USE_PERL5_RUN= yes + +NO_BUILD= yes + +PORTDOCS= CHANGES INSTALL LICENSE README.EVENTS WISHLIST + +WWWDIR?= www +CONFDIR?= etc +DATADIRS?= "/var/db/rrdtool" => "[Label1] " +SAVEDDIR?= /var/db/${PORTNAME}/saved +TMPDIR?= /var/db/${PORTNAME}/tmp + +PLIST_SUB+= WWWDIR=${WWWDIR} CONFDIR=${CONFDIR} + +post-patch: + @${REINPLACE_CMD} -e 's|%%CONFDIR%%|${PREFIX}/${CONFDIR}|g' ${WRKSRC}/drraw.cgi + + @${CP} -p ${WRKSRC}/drraw.conf ${WRKSRC}/drraw.conf-dist + @${REINPLACE_CMD} \ + -e 's|%%DATADIRS%%|${DATADIRS}|g' \ + -e 's|%%SAVEDDIR%%|${SAVEDDIR}|g' \ + -e 's|%%TMPDIR%%|${TMPDIR}|g' \ + ${WRKSRC}/drraw.conf-dist + +do-install: + ${INSTALL_DATA} ${WRKSRC}/drraw.conf-dist ${PREFIX}/${CONFDIR} + + ${MKDIR} ${PREFIX}/${WWWDIR}/${PORTNAME} + ${INSTALL_SCRIPT} ${WRKSRC}/drraw.cgi ${PREFIX}/${WWWDIR}/${PORTNAME} + + ${MKDIR} ${PREFIX}/${WWWDIR}/${PORTNAME}/icons +.for theFile in bomb.gif folder.gif folder.open.gif generic.gif link.gif text.gif unknown.gif + ${INSTALL_DATA} ${WRKSRC}/icons/${theFile} ${PREFIX}/${WWWDIR}/${PORTNAME}/icons +.endfor + +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} +. for theFile in ${PORTDOCS} + ${INSTALL_DATA} ${WRKSRC}/${theFile} ${DOCSDIR} +. endfor +.endif + +post-install: + @if [ ! -f ${PREFIX}/etc/drraw.conf ];\ + then \ + ${CP} -p ${PREFIX}/etc/drraw.conf-dist ${PREFIX}/etc/drraw.conf; \ + fi + +.include diff --git a/www/drraw/distinfo b/www/drraw/distinfo new file mode 100644 index 000000000000..7e5c117cdf5f --- /dev/null +++ b/www/drraw/distinfo @@ -0,0 +1,3 @@ +MD5 (drraw-2.1.3.tgz) = 99466034678b46784fcd4463882b6c8a +SHA256 (drraw-2.1.3.tgz) = c3290781426f81327632b4b0da80360882438f3d44cca81fdeaa3f9b22c3674e +SIZE (drraw-2.1.3.tgz) = 45970 diff --git a/www/drraw/files/patch-drraw.cgi b/www/drraw/files/patch-drraw.cgi new file mode 100644 index 000000000000..88f3059cbcf1 --- /dev/null +++ b/www/drraw/files/patch-drraw.cgi @@ -0,0 +1,11 @@ +--- drraw.cgi.orig Mon Jul 24 13:30:01 2006 ++++ drraw.cgi Mon Jul 24 13:31:42 2006 +@@ -49,7 +49,7 @@ + + # The configuration file is expected to be found in the same directory + # as drraw itself. You may customize this to be elsewhere. +-my $config = (dirname($0) =~ /(.*)/)[0] . "/drraw.conf"; # Untaint ++my $config = '%%CONFDIR%%/drraw.conf'; # Untaint + + ############################################################################### + ## STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP ## diff --git a/www/drraw/files/patch-drraw.conf b/www/drraw/files/patch-drraw.conf new file mode 100644 index 000000000000..21df3e41a005 --- /dev/null +++ b/www/drraw/files/patch-drraw.conf @@ -0,0 +1,44 @@ +--- drraw.conf.orig Sat Nov 13 14:01:22 2004 ++++ drraw.conf Mon Jul 24 13:39:49 2006 +@@ -21,8 +21,7 @@ + # Directories where Round Robin Databases may be found + # They will be searched recursively for files matching *.rrd (Round Robin + # Database files) and *.evt (Event files). +-%datadirs = ('/here/are/some/files' => '[Label1] ', +- '/here/are/other/files' => '[Label2] ', ++%datadirs = (%%DATADIRS%% + ); + + # This function is used to sort *.rrd and *.evt filenames before displaying +@@ -69,8 +68,8 @@ + # These directories MUST EXIST and the user running CGI scripts must have + # read AND write access to them. It is entirely safe to delete any content + # found in the temporary directory. +-$saved_dir = '/somewhere/drraw/saved'; +-$tmp_dir = '/somewhere/drraw/tmp'; ++$saved_dir = '%%SAVEDDIR%%'; ++$tmp_dir = '%%TMPDIR%%'; + # By default, critical errors are shown in the produced HTML pages produced + # and sent to standard error (which web servers typically write to some + # logfile). If the following is defined, such errors will be written to +@@ -157,13 +156,13 @@ + # Icons used in the browser + # These may be copied from the drraw distribution if they are missing from + # your web server installation. +-#$icon_new = '/icons/generic.gif'; +-#$icon_closed = '/icons/folder.gif'; +-#$icon_open = '/icons/folder.open.gif'; +-#$icon_text = '/icons/text.gif'; +-#$icon_help = '/icons/unknown.gif'; +-#$icon_bug = '/icons/bomb.gif'; +-#$icon_link = '/icons/link.gif'; ++$icon_new = 'icons/generic.gif'; ++$icon_closed = 'icons/folder.gif'; ++$icon_open = 'icons/folder.open.gif'; ++$icon_text = 'icons/text.gif'; ++$icon_help = 'icons/unknown.gif'; ++$icon_bug = 'icons/bomb.gif'; ++$icon_link = 'icons/link.gif'; + + # Custom Style Sheet + # $CSS diff --git a/www/drraw/pkg-descr b/www/drraw/pkg-descr new file mode 100644 index 000000000000..ef876982366e --- /dev/null +++ b/www/drraw/pkg-descr @@ -0,0 +1,9 @@ +drraw is a simple web based presentation front-end for RRDtool that +allows you to interactively build graphs of your own design. A graph +definition can be turned into a template which may be applied to many +Round Robin Database files. drraw specializes in providing an easy +means of displaying data stored with RRDtool and does not care about +how the data is collected, making it a great complement to other +RRDtool front-ends. + +WWW: http://web.taranis.org/drraw/ diff --git a/www/drraw/pkg-plist b/www/drraw/pkg-plist new file mode 100644 index 000000000000..87b9c46633d0 --- /dev/null +++ b/www/drraw/pkg-plist @@ -0,0 +1,14 @@ +@comment $FreeBSD$ +@unexec if cmp -s %D/%%CONFDIR%%/drraw.conf-dist %D/%%CONFDIR%%/drraw.conf; then rm -f %D/%%CONFDIR%%/drraw.conf; fi +%%CONFDIR%%/drraw.conf-dist +@exec if [ ! -f %D/%%CONFDIR%%/drraw.conf ]; then cp -p %D/%F %B/drraw.conf; fi +%%WWWDIR%%/drraw/drraw.cgi +%%WWWDIR%%/drraw/icons/bomb.gif +%%WWWDIR%%/drraw/icons/folder.gif +%%WWWDIR%%/drraw/icons/folder.open.gif +%%WWWDIR%%/drraw/icons/generic.gif +%%WWWDIR%%/drraw/icons/link.gif +%%WWWDIR%%/drraw/icons/text.gif +%%WWWDIR%%/drraw/icons/unknown.gif +@dirrm %%WWWDIR%%/drraw/icons +@dirrm %%WWWDIR%%/drraw -- cgit v1.2.3