Index: head/www/squidstats/Makefile =================================================================== --- head/www/squidstats/Makefile (revision 362753) +++ head/www/squidstats/Makefile (revision 362754) @@ -1,26 +1,27 @@ # Created by: Adrian Chadd # $FreeBSD$ PORTNAME= squidstats PORTVERSION= 54 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} DISTNAME= squidstats-r${PORTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= 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 USES= perl5 shebangfix SHEBANG_FILES= graph/src/stats.pl.in USERS= squid GROUPS= squid +PLIST_SUB+= WWWOWN=${WWWOWN} SQUID_USER=${USERS} SUB_FILES= pkg-message .include Index: head/www/squidstats/files/patch-graph__src__Makefile =================================================================== --- head/www/squidstats/files/patch-graph__src__Makefile (revision 362753) +++ head/www/squidstats/files/patch-graph__src__Makefile (revision 362754) @@ -1,38 +1,38 @@ ---- ./graph/src/Makefile.orig 2014-07-19 13:30:29.000000000 +0200 -+++ ./graph/src/Makefile 2014-07-19 13:32:27.000000000 +0200 +--- ./graph/src/Makefile.orig 2009-01-07 19:20:02.000000000 +0100 ++++ ./graph/src/Makefile 2014-07-24 01:02:02.000000000 +0200 @@ -33,21 +33,21 @@ $(RM) stats.pl config.ini graph-summary.cgi install_templates: - $(INSTALL_DIR) -m 0755 $(TEMPLATEDIR) + $(INSTALL_DIR) -m 0755 $(DESTDIR)$(TEMPLATEDIR) @for dep in $(TEMPLATES); do \ - echo $(INSTALL) -m 0644 templates/$$dep $(TEMPLATEDIR)/$$dep; \ - $(INSTALL) -m 0644 templates/$$dep $(TEMPLATEDIR)/$$dep; \ + echo $(INSTALL) -m 0644 templates/$$dep $(DESTDIR)$(TEMPLATEDIR)/$$dep; \ + $(INSTALL) -m 0644 templates/$$dep $(DESTDIR)$(TEMPLATEDIR)/$$dep; \ done install: all install_templates - $(INSTALL_DIR) -m 0755 -o $(WEB_USER) $(GRAPH_DATADIR) - $(INSTALL_DIR) -m 0755 -o $(STATS_USER) $(RRD_DATADIR) - $(INSTALL_DIR) -m 0755 $(WEB_DATADIR) - $(INSTALL_DIR) -m 0755 $(CGIDIR) - $(INSTALL_DIR) -m 0755 $(ETCDIR) - $(INSTALL) -m 0755 stats.pl $(BINDIR)/squidstats.pl - $(INSTALL) -m 0755 graph-summary.cgi $(CGIDIR)/graph-summary.cgi - $(INSTALL) -m 0644 config.ini $(ETCDIR)/config.ini - $(INSTALL) -m 0644 templates.conf $(ETCDIR)/templates.conf - $(INSTALL) -m 0644 snmp_monitor.cfg $(ETCDIR)/snmp_monitor.cfg - $(INSTALL) -m 0644 graph.css $(WEB_DATADIR)/graph.css -+ $(INSTALL_DIR) -m 0755 -o $(WEB_USER) $(DESTDIR)$(GRAPH_DATADIR) -+ $(INSTALL_DIR) -m 0755 -o $(STATS_USER) $(DESTDIR)$(RRD_DATADIR) ++ $(INSTALL_DIR) -m 0755 $(DESTDIR)$(GRAPH_DATADIR) ++ $(INSTALL_DIR) -m 0755 $(DESTDIR)$(RRD_DATADIR) + $(INSTALL_DIR) -m 0755 $(DESTDIR)$(WEB_DATADIR) + $(INSTALL_DIR) -m 0755 $(DESTDIR)$(CGIDIR) + $(INSTALL_DIR) -m 0755 $(DESTDIR)$(ETCDIR) + $(INSTALL) -m 0755 stats.pl $(DESTDIR)$(BINDIR)/squidstats.pl + $(INSTALL) -m 0755 graph-summary.cgi $(DESTDIR)$(CGIDIR)/graph-summary.cgi + $(INSTALL) -m 0644 config.ini $(DESTDIR)$(ETCDIR)/config.ini + $(INSTALL) -m 0644 templates.conf $(DESTDIR)$(ETCDIR)/templates.conf + $(INSTALL) -m 0644 snmp_monitor.cfg $(DESTDIR)$(ETCDIR)/snmp_monitor.cfg + $(INSTALL) -m 0644 graph.css $(DESTDIR)$(WEB_DATADIR)/graph.css Index: head/www/squidstats/pkg-plist =================================================================== --- head/www/squidstats/pkg-plist (revision 362753) +++ head/www/squidstats/pkg-plist (revision 362754) @@ -1,29 +1,33 @@ bin/squidstats.pl %%ETCDIR%%/config.ini %%ETCDIR%%/snmp_monitor.cfg %%ETCDIR%%/templates.conf %%DATADIR%%/htdocs/graph.css %%DATADIR%%/templates/cache %%DATADIR%%/templates/clients %%DATADIR%%/templates/cpu %%DATADIR%%/templates/dnsreq %%DATADIR%%/templates/dnssvc %%DATADIR%%/templates/fds %%DATADIR%%/templates/fqdncachereq %%DATADIR%%/templates/hitratio %%DATADIR%%/templates/httpsvc %%DATADIR%%/templates/icp %%DATADIR%%/templates/incoming %%DATADIR%%/templates/ipcachereq %%DATADIR%%/templates/objects %%DATADIR%%/templates/outgoing %%DATADIR%%/templates/requests www/cgi-bin/graph-summary.cgi @dirrm %%ETCDIR%% @dirrm %%DATADIR%%/htdocs @dirrm %%DATADIR%%/templates @dirrm %%DATADIR%% @dirrmtry www/cgi-bin +@cwd / +@comment set directory owner +@exec chown -R %%WWWOWN%% "/var/db/squidstats/graphs" +@exec chown -R %%SQUID_USER%% "/var/db/squidstats/rrd" @unexec rmdir "/var/db/squidstats/graphs" >/dev/null 2>&1 || : @unexec rmdir "/var/db/squidstats/rrd" >/dev/null 2>&1 || : @unexec rmdir "/var/db/squidstats" >/dev/null 2>&1 || :