Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 230c46071ce3fef6ef1bdad832af165e > files > 1

w3perl-3.01-1mdv2008.1.src.rpm

%define name		w3perl
%define version		3.01
%define release		%mkrel 1
%define basedir		/var/www/w3perl
%define docs		%{basedir}/docs
%define cfg1		%{basedir}/config
%define cfg2		%{basedir}/resources/admin
%define cgi		/var/www/cgi-bin/w3perl
%define perl_path	%(which perl)

Name:		%{name}
Version:	%{version}
Release:	%{release}
Summary: 	Web/ftp/mail server logfile analyser
License:	GPL+
Group:		Networking/WWW
URL:		http://www.w3perl.com/softs/
Source0:	http://www.w3perl.com/download/%{name}.tar.gz
Requires:	fly
Requires:	webserver
BuildArch:	noarch
BuildRoot:	%{_tmppath}/%{name}-%{version}

%description
W3Perl is a free web logfile analyzer which is also able to parse FTP
and Mail logfiles.

It is one of the most powerful package as it includes advanced stats
like real-time, sessions, URL mapping, virus, along with classical
stats like hosts, pages, traffic, countries, agents, referers, errors,
filetypes, robots, search engines and much more.

It supports most logfile formats, including Apache (CLF, ECLF, NECLF)
or IIS (W3C, Microsoft or any variation). Logs can be daily or monthly
split and/or compressed.

A web administration tool allows you to manage your configuration
files to customize your stats output. A demo is available at
http://www.w3perl.com/demo/ 

%prep
%setup -q -n %{name}

%install
rm -rf %{buildroot}
perl install.pl -r %{buildroot} -i %{buildroot}%{basedir} -d %{buildroot}%{cgi} -p %{perl_path}

install -d -m 755 %{buildroot}%{_webappconfdir}
cat > %{buildroot}%{_webappconfdir}/%{name}.conf <<EOF
# w3perl Apache configuration
Alias /%{name} %{_var}/www/%{name}

<Directory %{_var}/www/%{name}>
    Allow from all
</Directory>
EOF

cat > README.urpmi <<EOF
W3Perl has been successfully installed.

The resource files are located in %{basedir}
The cgi scripts are located in %{cgi}

If you want to run your stats :
   1 - First, password protect the %{basedir}/admin directory
   2 - Open a browser to http://127.0.0.1/w3perl/admin
   3 - Select "immediate launch" using the mandriva configuration file
   4 - Click on the "Init all stats" icon to compute all stats
   5 - When completed, go back to admin and view the output
EOF

# don't install documentation files under webroot
rm -f %{buildroot}%{basedir}/{LICENCE,README,INSTALL,VERSION}

%post
%_post_webapp

%postun
%_postun_webapp

%clean
rm -rf %{buildroot}

%files
%doc README.urpmi 
%doc LICENCE README INSTALL VERSION
%doc %{docs}
#%attr(0755, root, root) %config %{cfg1}
#%{basedir}/admin
#%{basedir}/*.pl
#%{basedir}/index.html
#%{basedir}/tools
#%{basedir}/cgi-bin
#%{basedir}/upgrade.txt
#%{basedir}/resources/os
#%{basedir}/resources/admin
#%attr(755, root, root) %{basedir}/resources/lang/*.pl
#%attr(755, root, root) %{basedir}/resources/admin/*.pl
%{basedir}/upgrade.txt
%{basedir}/index.html
%{basedir}/admin
%{basedir}/resources/*.jpg
%{basedir}/resources/*.gif
%{basedir}/resources/*.png
%{basedir}/resources/*.ico
%{basedir}/resources/fileext
%{basedir}/resources/pays-conv
%{basedir}/resources/pays-coord
%{basedir}/resources/upgrade
%{basedir}/resources/virus
%{basedir}/resources/robot.txt
%{basedir}/resources/gpl.txt
%{basedir}/resources/referrer-standard.txt
%{basedir}/resources/spip
%{basedir}/resources/css
%{basedir}/resources/js
%{basedir}/resources/flags
%{basedir}/resources/help
%{basedir}/resources/os
%{basedir}/resources/homepage
%{basedir}/tools/Readme
%{basedir}/resources/lang/Readme
%{basedir}/resources/rpmfile
%{basedir}/resources/new_package
%{cfg1}/Readme
%{cfg2}/locconf
%{cfg2}/var-forms
%{cfg2}/config*
%{basedir}/tools/Transfert_log_NT2Unix/readme.txt
%{basedir}/tools/Transfert_log_NT2Unix/ftp_cmd.txt
%{basedir}/tools/Transfert_log_NT2Unix/ftp_crontab.bat
%{cfg2}/global.pl
%config(noreplace) %{_webappconfdir}/%{name}.conf

#%{cgi}
%defattr(0755,root,root,-) 
%{cfg1}/*.pl
%{cfg1}/restore.sh
%{cfg2}/restore.sh
%{cgi}
%{basedir}/*pl
%{basedir}/cgi-bin/w3perl/*pl
%{basedir}/resources/lang/*/*pl
%{basedir}/resources/lang/*pl
%{basedir}/tools/*.pl
%{basedir}/tools/*.sh
%{basedir}/tools/windows
%{basedir}/tools/Transfert_log_NT2Unix/cron-stats.sh
%{basedir}/tools/Transfert_log_Unix2Unix/cron-stats.sh


%changelog
* Mon Nov 26 2007 Guillaume Rousse <guillomovitch@mandriva.org> 3.01-1mdv2008.1
+ Revision: 113270
- don't install documentation files under webroot
- standard webapp macros
- spec cleanup
- new version

* Thu Sep 06 2007 Adam Williamson <awilliamson@mandriva.com> 3.00-1mdv2008.0
+ Revision: 80660
- use Fedora license policy
- new release 3.00
- spec clean

* Sat Jun 02 2007 Adam Williamson <awilliamson@mandriva.com> 2.99-1mdv2008.0
+ Revision: 34488
- new release 2.99 based on spec from Laurent Domisse, various cleanups
- Import w3perl



* Thu Jan 05 2006 Lenny Cartier <lenny@mandriva.com> 2.94-2mdk
- rebuild

* Wed Feb 11 2004 Lenny Cartier <lenny@mandrakesoft.com> 2.94-1mdk
- 2.94

* Mon Sep 22 2003 Lenny Cartier <lenny@mandrakesoft.com> 2.92-2mdk
- remove some implicit requires

* Thu Jun 05 2003 Lenny Cartier <lenny@mandrakesoft.com> 2.92-1mdk
- 2.92

* Mon May 12 2003 Lenny Cartier <lenny@mandrakesoft.com> 2.91-1mdk
- 2.91

* Tue Feb 18 2003 Lenny Cartier <lenny@mandrakesoft.com> 2.90-1mdk
- 2.90

* Sat Feb 01 2003 Lenny Cartier <lenny@mandrakesoft.com> 2.89-2mdk
- rebuild

* Mon Aug 26 2002 Lenny Cartier <lenny@mandrakesoft.com> 2.89-1mdk
- from Laurent Domisse <domisse@w3perl.com> :
	- Fix overwriting configuration file

* Tue Mar 05 2002 Laurent Domisse <domisse@w3perl.com>
- First RPM release

doc %%{htdocs}/docs
config %%{htdocs}/config