summaryrefslogtreecommitdiff
path: root/www/squidanalyzer
diff options
context:
space:
mode:
authoradam <adam>2013-09-03 10:08:25 +0000
committeradam <adam>2013-09-03 10:08:25 +0000
commitd007667e0f0c3bd61c33b9a4826cbe2775ba4d79 (patch)
treeff939c052f31cbf1d8644e3d62c75cd33adf06f7 /www/squidanalyzer
parentdcfcfd8d9d288e523683d5ee8945064cc74dac85 (diff)
downloadpkgsrc-d007667e0f0c3bd61c33b9a4826cbe2775ba4d79.tar.gz
Squid proxy native log analyser and reports generator with full statistics
about times, hits, bytes, users, networks, top urls and top domains. Statistic reports are oriented toward user and bandwidth control; this is not a pure cache statistics generator. SquidAnalyzer use flat files to store data and don't need any SQL, SQL Lite or Berkeley databases. This log analyzer is incremental and should be run in a daily cron or more often on huge network trafic.
Diffstat (limited to 'www/squidanalyzer')
-rw-r--r--www/squidanalyzer/DESCR10
-rw-r--r--www/squidanalyzer/Makefile31
-rw-r--r--www/squidanalyzer/PLIST21
-rw-r--r--www/squidanalyzer/distinfo6
-rw-r--r--www/squidanalyzer/patches/patch-Makefile.PL32
5 files changed, 100 insertions, 0 deletions
diff --git a/www/squidanalyzer/DESCR b/www/squidanalyzer/DESCR
new file mode 100644
index 00000000000..6d7dfa669a6
--- /dev/null
+++ b/www/squidanalyzer/DESCR
@@ -0,0 +1,10 @@
+Squid proxy native log analyser and reports generator with full statistics
+about times, hits, bytes, users, networks, top urls and top domains. Statistic
+reports are oriented toward user and bandwidth control; this is not a pure
+cache statistics generator.
+
+SquidAnalyzer use flat files to store data and don't need any SQL, SQL Lite or
+Berkeley databases.
+
+This log analyzer is incremental and should be run in a daily cron or more
+often on huge network trafic.
diff --git a/www/squidanalyzer/Makefile b/www/squidanalyzer/Makefile
new file mode 100644
index 00000000000..6aa6332531e
--- /dev/null
+++ b/www/squidanalyzer/Makefile
@@ -0,0 +1,31 @@
+# $NetBSD: Makefile,v 1.1 2013/09/03 10:08:25 adam Exp $
+
+DISTNAME= squidanalyzer-5.2
+CATEGORIES= www
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=squid-report/}
+
+MAINTAINER= adam@NetBSD.org
+HOMEPAGE= http://squidanalyzer.darold.net/
+COMMENT= Squid proxy native log analyser and reports generator
+LICENSE= gnu-gpl-v3
+
+DEPENDS+= p5-GD-Graph3d>=0.63:../../graphics/p5-GD-Graph3d
+
+USE_LANGUAGES= # empty
+USE_TOOLS+= perl:run
+REPLACE_PERL+= squid-analyzer
+
+PERL5_PACKLIST= auto/SquidAnalyzer/.packlist
+MAKE_PARAMS+= BINDIR=${PREFIX}/bin
+MAKE_PARAMS+= CONFDIR=${EGDIR}
+MAKE_PARAMS+= DESTDIR=${DESTDIR}
+MAKE_PARAMS+= ETCDIR=${PKG_SYSCONFDIR}
+MAKE_PARAMS+= HTMLDIR=${PREFIX}/share/squidanalyzer
+MAKE_PARAMS+= LOGFILE=${VARBASE}/squid/access.log
+MAKE_PARAMS+= MANDIR=${PREFIX}/${PKGMANDIR}/man3
+
+EGDIR= ${PREFIX}/share/examples/squidanalyzer
+CONF_FILES= ${EGDIR}/squidanalyzer.conf ${PKG_SYSCONFDIR}/squidanalyzer.conf
+
+.include "../../lang/perl5/module.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/www/squidanalyzer/PLIST b/www/squidanalyzer/PLIST
new file mode 100644
index 00000000000..598e80f8378
--- /dev/null
+++ b/www/squidanalyzer/PLIST
@@ -0,0 +1,21 @@
+@comment $NetBSD: PLIST,v 1.1 2013/09/03 10:08:25 adam Exp $
+bin/squid-analyzer
+man/man3/squidanalyzer.3
+share/examples/squidanalyzer/excluded
+share/examples/squidanalyzer/lang/de_DE.txt
+share/examples/squidanalyzer/lang/en_US.txt
+share/examples/squidanalyzer/lang/fr_FR.txt
+share/examples/squidanalyzer/lang/pt_BR.txt
+share/examples/squidanalyzer/network-aliases
+share/examples/squidanalyzer/squidanalyzer.conf
+share/examples/squidanalyzer/user-aliases
+share/squidanalyzer/flotr2.js
+share/squidanalyzer/images/back-arrow.png
+share/squidanalyzer/images/cursor.png
+share/squidanalyzer/images/domain.png
+share/squidanalyzer/images/info.png
+share/squidanalyzer/images/logo-squidanalyzer.png
+share/squidanalyzer/images/network.png
+share/squidanalyzer/images/user.png
+share/squidanalyzer/sorttable.js
+share/squidanalyzer/squidanalyzer.css
diff --git a/www/squidanalyzer/distinfo b/www/squidanalyzer/distinfo
new file mode 100644
index 00000000000..828fa300611
--- /dev/null
+++ b/www/squidanalyzer/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2013/09/03 10:08:25 adam Exp $
+
+SHA1 (squidanalyzer-5.2.tar.gz) = a11eaecb3e152373ea3fc3da8ba0511f47dd6cef
+RMD160 (squidanalyzer-5.2.tar.gz) = 8b7e5aa350ad5e15a5c5d88b86bf2fb97bff45b1
+Size (squidanalyzer-5.2.tar.gz) = 144481 bytes
+SHA1 (patch-Makefile.PL) = 474b2fd61e911d5b4d301331d1391ccd40601c2e
diff --git a/www/squidanalyzer/patches/patch-Makefile.PL b/www/squidanalyzer/patches/patch-Makefile.PL
new file mode 100644
index 00000000000..24c0845f95c
--- /dev/null
+++ b/www/squidanalyzer/patches/patch-Makefile.PL
@@ -0,0 +1,32 @@
+$NetBSD: patch-Makefile.PL,v 1.1 2013/09/03 10:08:26 adam Exp $
+
+Introduce ETCDIR, where real configuration files are installed.
+
+--- Makefile.PL.orig 2013-09-02 20:53:21.000000000 +0000
++++ Makefile.PL
+@@ -4,7 +4,7 @@ use ExtUtils::MakeMaker;
+
+ use strict;
+
+-my @ALLOWED_ARGS = ('LOGFILE','BINDIR','CONFDIR','HTMLDIR','BASEURL','DOCDIR','MANDIR','QUIET','INSTALLDIRS','DESTDIR');
++my @ALLOWED_ARGS = ('LOGFILE','BINDIR','ETCDIR','CONFDIR','HTMLDIR','BASEURL','DOCDIR','MANDIR','QUIET','INSTALLDIRS','DESTDIR');
+
+ # Parse command line arguments and store them as environment variables
+ while ($_ = shift) {
+@@ -24,6 +24,7 @@ if (! -d $default_log ) {
+ # Default install path
+ my $LOGFILE = $ENV{LOGFILE} || $default_log;
+ my $BINDIR = $ENV{BINDIR} || '/usr/local/bin';
++my $ETCDIR = $ENV{ETCDIR} || '/etc/squidanalyzer';
+ my $CONFDIR = $ENV{CONFDIR} || '/etc/squidanalyzer';
+ my $HTMLDIR = $ENV{HTMLDIR} || '/var/www/squidanalyzer';
+ my $BASEURL = $ENV{BASEURL} || '/squidreport';
+@@ -129,7 +130,7 @@ close(INST);
+ `chmod 755 install_all.sh`;
+
+ # Change path into the default configuration file
+-`perl -p -i -e 's#/etc/squidanalyzer#$CONFDIR#' etc/squidanalyzer.conf squid-analyzer`;
++`perl -p -i -e 's#/etc/squidanalyzer#$ETCDIR#' etc/squidanalyzer.conf squid-analyzer`;
+ `perl -p -i -e 's#^Output.*#Output $HTMLDIR#' etc/squidanalyzer.conf`;
+ `perl -p -i -e 's#^LogFile.*#LogFile $LOGFILE#' etc/squidanalyzer.conf`;
+ `perl -p -i -e 's#^WebUrl.*#WebUrl $BASEURL#' etc/squidanalyzer.conf`;