# Ports collection makefile for: squidstats
# Whom: Adrian Chadd <adrian@FreeBSD.org>
# Date Created: 10-December-2008
#
# $FreeBSD$
#

# TODO: clear out the www/data/graphs/* files before uninstalling!
# TODO: what about var/squid/squid.rrd ? How's that directory
#       created and deleted?!
# TODO: make sure that the squid and www users exist; those parameters
#       are currently not checked nor are they tunable.

PORTNAME=	squidstats
DISTVERSION=	51
CATEGORIES=	www
MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
DISTNAME=	squidstats-r51

MAINTAINER=	adrian@freebsd.org
COMMENT=	A collection of simple statistical analysis bits for Squid

RUN_DEPENDS=	p5-Config-IniFiles>=2.39:${PORTSDIR}/devel/p5-Config-IniFiles \
		p5-RRD-Simple>=1.44:${PORTSDIR}/databases/p5-RRD-Simple \
		p5-SNMP_Session>=1.11:${PORTSDIR}/net-mgmt/p5-SNMP_Session

USE_PERL5=	yes

#
# I don't like where the web stuff is put.
# Its entirely possible what -should- be done is dump
# everything web-related (cgi, graph data, etc) into one
# directory, and then provide config snippets to apache, etc
# to have it appear in the "right spot".
#
# Thats a later problem though. :)
#
PLIST_FILES=	etc/squidstats/config.ini \
	etc/squidstats/snmp_monitor.cfg \
	etc/squidstats/templates.conf \
	share/squidstats/templates/clients \
	share/squidstats/templates/dnsreq \
	share/squidstats/templates/fds \
	share/squidstats/templates/hitratio \
	share/squidstats/templates/icp \
	share/squidstats/templates/ipcachereq \
	share/squidstats/templates/outgoing \
	share/squidstats/templates/cache \
	share/squidstats/templates/cpu \
	share/squidstats/templates/dnssvc \
	share/squidstats/templates/fqdncachereq \
	share/squidstats/templates/httpsvc \
	share/squidstats/templates/incoming \
	share/squidstats/templates/objects \
	share/squidstats/templates/requests \
	bin/squidstats.pl \
	www/cgi-bin/graph-summary.cgi \
	www/data/graph.css

PLIST_DIRS=	etc/squidstats www/data www/data/graphs share/squidstats/templates share/squidstats var/squid

SUB_FILES=	pkg-message
SUB_LIST=	ARCH=${ARCH}

post-install:
	@${ECHO_CMD} "===> post-installation information for ${PKGNAME}:"
	@${ECHO_CMD} ""
	@${CAT} ${PKGMESSAGE}
	@${ECHO_CMD} ""

.include <bsd.port.mk>
