mirror of
https://github.com/darold/squidanalyzer.git
synced 2025-07-31 01:44:29 +02:00
You can install SquidAnalyzer.pm into custom LIB directory, so you can keep all files together (e.g. /opt/squidanalyzer)
This commit is contained in:
parent
235df62c42
commit
8d847eff19
@ -1,5 +1,9 @@
|
||||
Revision history for SquidAnalyzer
|
||||
|
||||
szaszg
|
||||
* SquidAnalyzer.pm can read compressed 'stat_code.dat', so you can compress previous years .dat files (e.g.: find 2023 -iname '*.dat' | xargs xz -9).
|
||||
* You can install SquidAnalyzer.pm into custom LIB directory, so you can keep all files together (e.g. /opt/squidanalyzer)
|
||||
|
||||
6.6 - Sun May 7 16:38:14 CEST 2017
|
||||
|
||||
This is a maintenance release that fix one year of issues reported by users.
|
||||
|
@ -4,7 +4,7 @@ use ExtUtils::MakeMaker;
|
||||
|
||||
use strict;
|
||||
|
||||
my @ALLOWED_ARGS = ('LOGFILE','BINDIR','ETCDIR', 'CONFDIR','HTMLDIR','BASEURL','DOCDIR','MANDIR','QUIET','INSTALLDIRS','DESTDIR');
|
||||
my @ALLOWED_ARGS = ('LOGFILE','BINDIR','ETCDIR', 'CONFDIR','HTMLDIR','BASEURL','DOCDIR','MANDIR','QUIET','INSTALLDIRS','DESTDIR', 'LIB');
|
||||
|
||||
# Parse command line arguments and store them as environment variables
|
||||
while ($_ = shift) {
|
||||
@ -32,6 +32,7 @@ my $DOCDIR = $ENV{DOCDIR} || '';
|
||||
my $MANDIR = $ENV{MANDIR} || '/usr/local/man/man3';
|
||||
my $DESTDIR = $ENV{DESTDIR} || '';
|
||||
my $INSTALLDIRS = $ENV{INSTALLDIRS} ||= 'site';
|
||||
my $LIB = $ENV{LIB} || '';
|
||||
|
||||
unless(open(INST, ">install_all.sh")) {
|
||||
print "\nError: can't write post install file install_all.sh, $!\n";
|
||||
@ -130,6 +131,8 @@ close(INST);
|
||||
`perl -p -i -e 's#^Exclude.*#Exclude $ETCDIR/excluded#' etc/squidanalyzer.conf`;
|
||||
`perl -p -i -e 's#^Include.*#Include $ETCDIR/included#' etc/squidanalyzer.conf`;
|
||||
`perl -p -i -e 's#Lang.*\.txt#Lang $ETCDIR/lang/en_US.txt#' etc/squidanalyzer.conf`;
|
||||
`perl -p -i -e 's|^use lib .*|#use lib "PERL5LIB"|' squid-analyzer`;
|
||||
`perl -p -i -e 's|^\#use lib .*|use lib "$LIB"|' squid-analyzer` if $LIB ne '';
|
||||
|
||||
my $zcat = `which zcat`;
|
||||
chomp($zcat);
|
||||
@ -158,6 +161,7 @@ WriteMakefile(
|
||||
'MAN3PODS' => { 'doc/SquidAnalyzer.pod' => 'blib/man3/SquidAnalyzer.3pm' },
|
||||
'DESTDIR' => $DESTDIR,
|
||||
'INSTALLDIRS' => $INSTALLDIRS,
|
||||
'LIB' => $LIB,
|
||||
'clean' => { FILES => "install_all.sh lib/blib/ squid-analyzer.3" },
|
||||
'META_MERGE' => {
|
||||
resources => {
|
||||
|
18
README
18
README
@ -20,6 +20,10 @@ REQUIREMENT
|
||||
are based on the Flotr2 Javascript library so they are drawn at your
|
||||
browser side without extra installation required.
|
||||
|
||||
CHANGES from https://github.com/darold/squidanalyzer
|
||||
SquidAnalyzer.pm can read compressed 'stat_code.dat', so you can compress previous years .dat files (e.g.: find 2023 -iname '*.dat' | xargs xz -9).
|
||||
You can install SquidAnalyzer.pm into custom LIB directory, so you can keep all files together (e.g. /opt/squidanalyzer)
|
||||
|
||||
INSTALLATION
|
||||
Generic install
|
||||
If you want the package to be installed into the Perl distribution just
|
||||
@ -70,13 +74,25 @@ INSTALLATION
|
||||
MANDIR=/usr/share/man/man3 \
|
||||
DOCDIR=/usr/share/doc/squidanalyzer
|
||||
|
||||
Or you can install everything into one directory (e.g.: /opt/squidanalyzer)
|
||||
|
||||
perl Makefile.PL \
|
||||
LOGFILE=/var/log/squid/access.log \
|
||||
BINDIR=/opt/squidanalyzer/bin \
|
||||
CONFDIR=/opt/squidanalyzer/etc \
|
||||
HTMLDIR=/var/www/squidreport \
|
||||
BASEURL=/squidreport \
|
||||
MANDIR=/opt/squidanalyzer/share/man/man3 \
|
||||
DOCDIR=/opt/squidanalyzer/share/doc/squidanalyzer
|
||||
LIB=/opt/squidanalyzer/lib
|
||||
|
||||
If you want to build a distro package, there are two other options that
|
||||
you may use. The QUIET option is to tell to Makefile.PL to not show the
|
||||
default post install README. The DESTDIR is to create and install all
|
||||
files in a package build base directory. For example for Fedora RPM,
|
||||
thing may look like that:
|
||||
|
||||
# Make Perl and SendmailAnalyzer distrib files
|
||||
# Make Perl and SquidAnalyzer distrib files
|
||||
%{__perl} Makefile.PL \
|
||||
INSTALLDIRS=vendor \
|
||||
QUIET=1 \
|
||||
|
@ -76,6 +76,18 @@ Makefile.PL Perl script. Here is a sample:
|
||||
MANDIR=/usr/share/man/man3 \
|
||||
DOCDIR=/usr/share/doc/squidanalyzer
|
||||
|
||||
Or you can install everything into one directory (e.g.: /opt/squidanalyzer)
|
||||
|
||||
perl Makefile.PL \
|
||||
LOGFILE=/var/log/squid/access.log \
|
||||
BINDIR=/opt/squidanalyzer/bin \
|
||||
CONFDIR=/opt/squidanalyzer/etc \
|
||||
HTMLDIR=/var/www/squidreport \
|
||||
BASEURL=/squidreport \
|
||||
MANDIR=/opt/squidanalyzer/share/man/man3 \
|
||||
DOCDIR=/opt/squidanalyzer/share/doc/squidanalyzer
|
||||
LIB=/opt/squidanalyzer/lib
|
||||
|
||||
If you want to build a distro package, there are two other options that you may use. The QUIET option is to tell to Makefile.PL to not show the default post install README. The DESTDIR is to create and install all files in a package build base directory. For example for Fedora RPM, thing may look like that:
|
||||
|
||||
# Make Perl and SendmailAnalyzer distrib files
|
||||
|
@ -2,6 +2,7 @@
|
||||
#
|
||||
# Perl frontend to SquidAnalyzer.pm.
|
||||
#
|
||||
#use lib "PERL5LIB"
|
||||
use strict;
|
||||
use SquidAnalyzer;
|
||||
use Getopt::Long qw(:config no_ignore_case bundling);
|
||||
|
Loading…
x
Reference in New Issue
Block a user