summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-www')
-rw-r--r--net-www/squidalyser/ChangeLog11
-rw-r--r--net-www/squidalyser/files/digest-squidalyser-0.2.551
-rw-r--r--net-www/squidalyser/squidalyser-0.2.55.ebuild97
3 files changed, 109 insertions, 0 deletions
diff --git a/net-www/squidalyser/ChangeLog b/net-www/squidalyser/ChangeLog
new file mode 100644
index 000000000000..bf63228e2105
--- /dev/null
+++ b/net-www/squidalyser/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for net-www/squidalyser
+# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-www/squidalyser/ChangeLog,v 1.1 2002/12/22 16:47:32 mcummings Exp $
+
+*squidalyser-0.2.55 (22 Dec 2002)
+
+ 22 Dec 2002; Michael Cummings <mcummings@gentoo.org>
+ squidalyser-0.2.55.ebuild:
+
+ Initial import. Ebuild submitted by bnelson@itministry.org (Brian
+ Nelson) in bug 10111.
diff --git a/net-www/squidalyser/files/digest-squidalyser-0.2.55 b/net-www/squidalyser/files/digest-squidalyser-0.2.55
new file mode 100644
index 000000000000..cf5472ae8824
--- /dev/null
+++ b/net-www/squidalyser/files/digest-squidalyser-0.2.55
@@ -0,0 +1 @@
+MD5 3326f6ebd4454d885ab9d19eb03fec19 squidalyser-0.2.55.tar.gz 32519
diff --git a/net-www/squidalyser/squidalyser-0.2.55.ebuild b/net-www/squidalyser/squidalyser-0.2.55.ebuild
new file mode 100644
index 000000000000..425f0ed8d7cc
--- /dev/null
+++ b/net-www/squidalyser/squidalyser-0.2.55.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-www/squidalyser/squidalyser-0.2.55.ebuild,v 1.1 2002/12/22 16:47:32 mcummings Exp $
+
+DESCRIPTION="Interactive log analyser for the Squid proxy."
+HOMEPAGE="http://ababa.org"
+SRC_URI="http://ababa.org/dist/squidalyser-${PV}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~sparc ~alpha ~ppc"
+IUSE=""
+
+RDEPEND="net-www/squid
+ sys-devel/perl
+ dev-perl/CGI
+ dev-perl/DBI
+ dev-perl/DBD-mysql
+ dev-perl/Time-modules
+ dev-perl/Time-HiRes
+ dev-perl/GD
+ dev-perl/GDGraph
+ dev-perl/GDTextUtil
+ dev-perl/URI
+ dev-db/mysql
+ net-www/apache
+ net-www/squid"
+
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/squidalyser-${PV}"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ patch -p1 < ${FILESDIR}/${P}-gentoo.diff || die
+}
+
+src_install() {
+
+ # Create a user directory for squidalyser. Put the squidparse and sql scripts into it
+ dodir /usr/share/squidalyser/squidparse
+ cp ${S}/squidparse/squidparse.pl ${D}/usr/share/squidalyser/squidparse/squidparse.pl
+ dodir /etc/squidalyser
+ cp ${S}/squidparse/squidalyser.conf ${D}/etc/squidalyser/squidalyser.conf
+
+ dodir /usr/share/squidalyser/sql
+ cp ${S}/sql/* ${D}/usr/share/squidalyser/sql
+ dodir /usr/share/squidalyser/docs
+ cp ${S}/docs/* ${D}/usr/share/squidalyser/docs
+
+ # Put the apache scripts under the apache directory
+ chown apache ${S}/cgi-bin/*
+ chmod 755 ${S}/cgi-bin/*
+
+ dodir /home/httpd/cgi-bin
+ cp ${S}/cgi-bin/* ${D}/home/httpd/cgi-bin
+ dodir /home/httpd/icons
+ cp ${S}/icons/* ${D}/home/httpd/icons
+}
+
+pkg_preinst() {
+ ewarn "pkg_preinst()"
+}
+
+pkg_postinst() {
+ ewarn "pkg_postinst"
+ # start up mysql if it isn't already running
+ mysqlstat=`/etc/init.d/mysql status | grep -c started`
+ if [ ${mysqlstat} -lt 1 ]
+ then
+ /etc/init.d/mysql start
+ sleep 3
+ fi
+ # create the basic database
+ ewarn "configure mysql"
+ mysql --execute="drop database squid"
+ mysql --execute="create database squid"
+ mysql --execute="grant all privileges on squid.* to squidalyser@localhost identified by 'tr!red$';"
+ mysql squid < /usr/share/squidalyser/sql/squidalyser.sql
+ mysql squid --execute="delete from logfile"
+
+ ewarn "update crontab"
+ # Update the crontab for the squidparse routine
+ spcount=`grep -c squidparse.pl /etc/crontab`
+ if [ ${spcount} -gt 1 ]
+ then
+ ewarn "More than one entry in /etc/crontab. Please check."
+ elif [ ${spcount} -eq 1 ]
+ then
+ ewarn "squidparse.pl entry already in /etc/crontab, leaving alone"
+ else
+ echo "0 3 * * * root /usr/share/squidalyser/squidparse/squidparse.pl" >> /etc/crontab
+ fi
+
+ ewarn "Running squidparse for first time, this may take several minutes"
+ /usr/share/squidalyser/squidparse/squidparse.pl
+}