Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > d48bb5afd1ade9abfa95f35ce491537b > files > 2

squidanalyzer-5.0-2.mga3.src.rpm

%define contentdir /var/www

Summary:	Squid proxy log analyzer and report generator
Name:		squidanalyzer
Version:	5.0
Release:	%mkrel 2
License:	GPLv3
Group:		Monitoring
URL:		http://%{name}.darold.net/
Source:		http://prdownloads.sourceforge.net/squid-report/%{name}-%{version}.tar.gz
Requires:	squid
BuildRequires:	perl
BuildArch:	noarch

%description
Squid proxy native log analyzer 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 uses flat files to store data and doesn'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 with heavy proxy usage.

%prep

%setup -q

%build
perl Makefile.PL DESTDIR=%{buildroot} LOGFILE=%{_logdir}/squid/access.log BINDIR=%{_sbindir} HTMLDIR=%{contentdir}/html/%{name} BASEURL=/%{name} MANDIR=%{_mandir}/man3 QUIET=yes

%make

%install
rm -rf %{buildroot}

%makeinstall_std
install etc/* %{buildroot}%{_sysconfdir}/%{name}/
install -d %{buildroot}%{_sysconfdir}/cron.daily
echo -e "#!/bin/sh\n%{_sbindir}/squid-analyzer" > %{buildroot}%{_sysconfdir}/cron.daily/0%{name}


%files
%defattr(-,root,squid)
%doc README ChangeLog
%{_mandir}/man3/*
%{perl_vendorlib}/SquidAnalyzer.pm
%attr(0755,root,squid) %{_sbindir}/squid-analyzer
%attr(0755,root,squid) %dir %{_sysconfdir}/%{name}
%attr(0664,root,squid) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%config(noreplace) %attr(0644,root,squid) %{_sysconfdir}/%{name}/excluded
%config(noreplace) %attr(0644,root,squid) %{_sysconfdir}/%{name}/network-aliases
%config(noreplace) %attr(0644,root,squid) %{_sysconfdir}/%{name}/user-aliases
%config(noreplace) %attr(0754,root,squid) %{_sysconfdir}/cron.daily/0%{name}
%attr(0755,root,squid) %dir %{_sysconfdir}/%{name}/lang
%{_sysconfdir}/%{name}/lang/*
%attr(0755,root,squid) %dir %{contentdir}/html/%{name}
%{contentdir}/html/%{name}/flotr2.js
%{contentdir}/html/%{name}/sorttable.js
%{contentdir}/html/%{name}/%{name}.css
%attr(0755,root,squid) %dir %{contentdir}/html/%{name}/images
%{contentdir}/html/%{name}/images/*.png

%clean
rm -rf %{buildroot}


%changelog

* Mon Jan 14 2013 umeabot <umeabot> 5.0-2.mga3
+ Revision: 382594
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Thu Dec 13 2012 luigiwalser <luigiwalser> 5.0-1.mga3
+ Revision: 330164
- 5.0

* Fri Aug 31 2012 luigiwalser <luigiwalser> 4.4-1.mga3
+ Revision: 286728
- 4.4

* Tue May 01 2012 luigiwalser <luigiwalser> 4.3-1.mga2
+ Revision: 234415
- 4.3

* Sun Mar 04 2012 luigiwalser <luigiwalser> 4.2-1.mga2
+ Revision: 218188
- imported package squidanalyzer