From db443b2e67c7a5600ecf9588c0e1edf1858a3285 Mon Sep 17 00:00:00 2001 From: "Sergey A. Osokin" Date: Tue, 29 Jun 2004 10:30:46 +0000 Subject: [PATCH] Add Squid Report Generator. Main features are: * PHP Output with built in authentication hooks * Fast Processing * Reporting right down the the location vistied Submitted by: Dmitry Semkin --- www/Makefile | 1 + www/srg/Makefile | 40 +++++++++++++++++++++++++++ www/srg/distinfo | 2 ++ www/srg/files/patch-resolver-test-cpp | 22 +++++++++++++++ www/srg/pkg-descr | 14 ++++++++++ 5 files changed, 79 insertions(+) create mode 100644 www/srg/Makefile create mode 100644 www/srg/distinfo create mode 100644 www/srg/files/patch-resolver-test-cpp create mode 100644 www/srg/pkg-descr diff --git a/www/Makefile b/www/Makefile index 8d32902cac04..cbb9aa174701 100644 --- a/www/Makefile +++ b/www/Makefile @@ -590,6 +590,7 @@ SUBDIR += squidtimes SUBDIR += squirm SUBDIR += squishdot + SUBDIR += srg SUBDIR += ssserver SUBDIR += suphp SUBDIR += surfraw diff --git a/www/srg/Makefile b/www/srg/Makefile new file mode 100644 index 000000000000..a6647ace872b --- /dev/null +++ b/www/srg/Makefile @@ -0,0 +1,40 @@ +# New ports collection makefile for: srg +# Date created: 28 June 2004 +# Whom: Dmitry Semkin +# +# $FreeBSD$ +# + +PORTNAME= srg +PORTVERSION= 1.0 +CATEGORIES= www +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \ + http://mirror.crc.net.nz/pub/srg/ +MASTER_SITE_SUBDIR= ${PORTNAME} + +MAINTAINER= lslarry@gmail.ru +COMMENT= A Squid Report Generator + +USE_GMAKE= yes +USE_BISON= yes +USE_BZIP2= yes +USE_REINPLACE= yes +NO_INSTALL_MANPAGES= yes +MAKE_ENV= CC="${CC}" CXX="${CXX}" + +PLIST_FILES= bin/srg +.for i in footer.php header.php ip2user.txt srg.conf +PLIST_FILES+= share/examples/srg/${i} +.endfor +PLIST_DIRS= share/examples/srg + +post-patch: + ${REINPLACE_CMD} -e 's|-g |${CFLAGS} |' ${WRKSRC}/Makefile \ + ${WRKSRC}/lib/Makefile + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/srg ${PREFIX}/bin + ${MKDIR} ${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/examples/* ${EXAMPLESDIR} + +.include diff --git a/www/srg/distinfo b/www/srg/distinfo new file mode 100644 index 000000000000..392d8ea62890 --- /dev/null +++ b/www/srg/distinfo @@ -0,0 +1,2 @@ +MD5 (srg-1.0.tar.bz2) = ff9b5d19397500445b1f3ef82d43fbb8 +SIZE (srg-1.0.tar.bz2) = 62434 diff --git a/www/srg/files/patch-resolver-test-cpp b/www/srg/files/patch-resolver-test-cpp new file mode 100644 index 000000000000..13adeeb83f24 --- /dev/null +++ b/www/srg/files/patch-resolver-test-cpp @@ -0,0 +1,22 @@ +--- resolver-test.cpp.orig Mon Jun 28 21:06:59 2004 ++++ resolver-test.cpp Mon Jun 28 21:08:30 2004 +@@ -32,16 +32,16 @@ + } + + /* Use Root Servers because they are unlikey to change IP */ +- i.s_addr = dottedquad(128,9,0,107); ++ i.s_addr = dottedquad(192,228,79,201); + t = r.get_name(i); + if (t) { + if (strcasecmp(t, "b.root-servers.net")!=0) { +- fprintf(stderr, "FAILED: 128.9.0.107 resolves to %s" ++ fprintf(stderr, "FAILED: 192.228.79.201 resolves to %s" + " expected b.root-servers.net please check " + "your resolver!\n", t); + } + } else { +- fprintf(stderr, "FAILED: Unable to resolve 128.9.0.107\n"); ++ fprintf(stderr, "FAILED: Unable to resolve 192.228.79.201\n"); + } + + i.s_addr = dottedquad(192,203,230,10); diff --git a/www/srg/pkg-descr b/www/srg/pkg-descr new file mode 100644 index 000000000000..13ac80c93c3e --- /dev/null +++ b/www/srg/pkg-descr @@ -0,0 +1,14 @@ +SRG is a Squid Report Generator designed for the needs of CRCnet. +None of the existing report generators could provide the exact solution +that we required and we decided to start from scratch rather than trying +to modify an existing progamme. SRG is designed to be fast and easy +to integrate in to other authentication systems +(such as those that are driving Squid itself). + +Features + + * PHP Output with built in authentication hooks + * Fast Processing + * Reporting right down the the location vistied + +WWW: http://www.crc.net.nz/software/srg.php