Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Jan 2004 14:44:58 -0800 (PST)
From:      Jim Shewmaker <jims@bluenotch.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/60910: [new port] mail/graphdefang
Message-ID:  <200401042244.i04Miwcw093169@mail.trinetcom.com>
Resent-Message-ID: <200401042250.i04MoMSp040158@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         60910
>Category:       ports
>Synopsis:       [new port] mail/graphdefang
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 04 14:50:22 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Jim Shewmaker
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
>Environment:
System: FreeBSD mail.trinetcom.com 4.9-STABLE FreeBSD 4.9-STABLE #1: Sat Dec 20 03:46:24 PST 2003 jim@mail.trinetcom.com:/usr/obj/usr/src/sys/DELL1650 i386


	
>Description:
	Graphdefang is a utility to graph mail statistics produced with MIMEDefang.
>How-To-Repeat:
	
>Fix:

	

--- graphdefang.sh begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	graphdefang
#	graphdefang/pkg-plist
#	graphdefang/pkg-descr
#	graphdefang/Makefile
#	graphdefang/distinfo
#	graphdefang/pkg-message
#
echo c - graphdefang
mkdir -p graphdefang > /dev/null 2>&1
echo x - graphdefang/pkg-plist
sed 's/^X//' >graphdefang/pkg-plist << 'END-of-graphdefang/pkg-plist'
XBerkeleyDB
Xlibexec/graphdefang/graphdefanglib.pl
Xlibexec/graphdefang/graphdefang.pl
Xetc/mimedefang/graphdefang-config-mimedefang-example
Xwww/data/spam/graphdefang.cgi
Xwww/data/spam/index.php
X%%PORTDOCS%%share/examples/graphdefang/graphdefang-config-mimedefang-example
X%%PORTDOCS%%share/examples/graphdefang/graphdefang-config-spamd-example
X%%PORTDOCS%%share/examples/graphdefang/web/*
X%%PORTDOCS%%share/doc/graphdefang/README
X%%PORTDOCS%%@dirrm share/doc/graphdefang
X%%PORTDOCS%%@dirrm share/examples/graphdefang
END-of-graphdefang/pkg-plist
echo x - graphdefang/pkg-descr
sed 's/^X//' >graphdefang/pkg-descr << 'END-of-graphdefang/pkg-descr'
XFrom the John Kirkland's graphdefang homepage:
X
XGraphDefang is a configurable perl utility that parses arbitrary syslog entries and creates a set of configurable charts 
X(png files) with the data. It is possible to output the png files to the filesystem or to a web browser via a cgi. 
X
XWWW:  http://www.bl.org/~jpk/graphdefang/
X
X
END-of-graphdefang/pkg-descr
echo x - graphdefang/Makefile
sed 's/^X//' >graphdefang/Makefile << 'END-of-graphdefang/Makefile'
X# New ports collection makefile for:   graphdefang
X# Date created:        17 November 2003
X# Whom:                jims
X#
X# $FreeBSD$
X#
X
XPORTNAME=	graphdefang
XPORTVERSION=	0.9
XCATEGORIES=	mail
XMASTER_SITES=	http://www.bl.org/~jpk/graphdefang/download/:mymaster \
X		http://www.sleepycat.com/update/snapshot/:sleepycat
XDISTFILES=	${PORTNAME}-${PORTVERSION}.tgz:mymaster ${DBDISTFILE}.tar.gz:sleepycat
X
XDBDISTFILE=	db-4.1.25
X
XMAINTAINER=	jims@bluenotch.com
XCOMMENT=	utility to graph various stats from mimedefang
X
XNO_CONFIGURE=   "There is no configure or makefile in the source"
XNO_BUILD=yes
X#USE_PERL5=YES
X
XUSE_REINPLACE=yes
XWRKSRC=      ${WRKDIR}/${DISTNAME}
X.if !defined(WWWDIR)
XWWWDIR=/usr/local/www/data/spam
X.endif
X
X
X
XRUN_DEPENDS= \
X	${PREFIX}/mimedefang.pl:${PORTSDIR}/mail/mimedefang \
X	${SITE_PERL}/File/ReadBackwards.pm:${PORTSDIR}/devel/p5-File-ReadBackwards \
X 	${SITE_PERL}/GD.pm/:${PORTSDIR}/graphics/p5-GD \
X	${SITE_PERL}/GD/Graph.pm:${PORTSDIR}/graphics/p5-GD-Graph \
X	${SITE_PERL}/GD/TextUtil.pm:${PORTSDIR}/graphics/p5-GD-TextUtil \
X	${SITE_PERL}/Date/Parse.pm:${PORTSDIR}/devel/p5-TimeDate \
X	${SITE_PERL}/Date/Format.pm:${PORTSDIR}/devel/p5-TimeDate \
X	${SITE_PERL}/MLDBM.pm:${PORTSDIR}/databases/p5-MLDBM 
X
Xpost-extract:
X	@${REINPLACE_CMD} \
X		-e 's|/home/jpk/public_html/spam|${WWWDIR}|' \
X		-e 's|.MYDIR/SummaryDB.db|/var/db/${PORTNAME}/SummaryDB.db|' \
X		-e 's|.GRAPHDEFANGDIR/SummaryDB.db|/var/db/${PORTNAME}/SummaryDB.db|' \
X		-e 's|.MYDIR/graphdefang-config|${PREFIX}/etc/mimedefang/graphdefang-config|' \
X		${WRKSRC}/*.*
X	@${REINPLACE_CMD} \
X		-e 's|/home/jpk/public_html/spam|${WWWDIR}|' \
X		-e 's|/home/jpk/graphdefang|${PREFIX}/libexec/${PORTNAME}|' \
X		-e 's|.GRAPHDEFANGDIR/SummaryDB.db|/bar/db/${PORTNAME}/SummaryDB.db|' \
X		${WRKSRC}/web/*.*
X
X# Now for a generic BerkleyDB.4.1 (too bad ports doesn't work, I'm too busy and unmotivated to figure it out)
Xpre-install:
X	@(cd ${WRKDIR}/${DBDISTFILE}/dist; ./configure; make)
X	@(cd ${WRKDIR}/${DBDISTFILE}/perl/DB_File; perl Makefile.PL; make; make test)
X
Xdo-install:
X	@${MKDIR} ${PREFIX}/libexec/${PORTNAME}
X	@${MKDIR} ${PREFIX}/libexec/${PORTNAME}/event
X	@${MKDIR} ${PREFIX}/libexec/${PORTNAME}/event/mimedefang.pl
X	@${MKDIR} /var/db/${PORTNAME}
X	@${INSTALL_SCRIPT} ${WRKSRC}/graphdefang.pl ${PREFIX}/libexec/${PORTNAME}
X	@${INSTALL_SCRIPT} ${WRKSRC}/graphdefanglib.pl ${PREFIX}/libexec/${PORTNAME}
X	@${INSTALL_SCRIPT} ${WRKSRC}/web/graphdefang.cgi ${WWWDIR}
X	@${INSTALL_SCRIPT} ${WRKSRC}/web/index.php ${WWWDIR}
X	@${INSTALL_DATA} ${WRKSRC}/graphdefang-config-mimedefang-example ${PREFIX}/etc/mimedefang
X	@${CP} ${WRKSRC}/event/mimedefang.pl/* ${PREFIX}/libexec/${PORTNAME}/event/mimedefang.pl
X	@(cd ${WRKDIR}/${DBDISTFILE}/dist; make install)
X	@${LN} -s ${PREFIX}/BerkeleyDB.4.1 ${PREFIX}/BerkeleyDB
X	@(cd ${WRKDIR}/${DBDISTFILE}/perl/DB_File; make install)
X
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${EXAMPLESDIR}
X	@${MKDIR} ${DOCSDIR}
X	@${INSTALL_DATA} ${WRKSRC}/graphdefang-config-mimedefang-example ${EXAMPLESDIR}
X	@${INSTALL_DATA} ${WRKSRC}/graphdefang-config-spamd-example ${EXAMPLESDIR}
X	@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
X.endif
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
END-of-graphdefang/Makefile
echo x - graphdefang/distinfo
sed 's/^X//' >graphdefang/distinfo << 'END-of-graphdefang/distinfo'
XMD5 (graphdefang-0.9.tgz) = 0087a32649b903050b487b6f2055c369
XMD5 (db-4.1.25.tar.gz) = df71961002b552c0e72c6e4e358f27e1
END-of-graphdefang/distinfo
echo x - graphdefang/pkg-message
sed 's/^X//' >graphdefang/pkg-message << 'END-of-graphdefang/pkg-message'
X--------------------------
XTo use graphdefang, insert MDLOG commands in your mimedefang-filter file 
X(man mimedefang-filter for more info).
X
Xyou can run the libexec/graphdefang.pl with cron to get regular updates, 
Xor use the graphdefang.cgi to update graphs immediately.
X
X--------------------------
END-of-graphdefang/pkg-message
exit
--- graphdefang.sh ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401042244.i04Miwcw093169>