[csw-devel] SF.net SVN: gar:[14428] csw/mgar/pkg/awstats/trunk

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Thu Apr 28 10:26:26 CEST 2011


Revision: 14428
          http://gar.svn.sourceforge.net/gar/?rev=14428&view=rev
Author:   dmichelsen
Date:     2011-04-28 08:26:25 +0000 (Thu, 28 Apr 2011)

Log Message:
-----------
awstats: Update to 7.0, general rework

Modified Paths:
--------------
    csw/mgar/pkg/awstats/trunk/Makefile
    csw/mgar/pkg/awstats/trunk/checksums

Added Paths:
-----------
    csw/mgar/pkg/awstats/trunk/files/0001-Adjust-pathes-for-OpenCSW.patch
    csw/mgar/pkg/awstats/trunk/files/CSWawstats.postmsg

Removed Paths:
-------------
    csw/mgar/pkg/awstats/trunk/files/CSWawstats.postinstall
    csw/mgar/pkg/awstats/trunk/files/patch-configdir.diff

Modified: csw/mgar/pkg/awstats/trunk/Makefile
===================================================================
--- csw/mgar/pkg/awstats/trunk/Makefile	2011-04-28 07:39:25 UTC (rev 14427)
+++ csw/mgar/pkg/awstats/trunk/Makefile	2011-04-28 08:26:25 UTC (rev 14428)
@@ -1,5 +1,5 @@
 NAME = awstats
-VERSION = 6.9
+VERSION = 7.0
 CATEGORIES = apps
 
 DESCRIPTION = Featureful tool for web, ftp and mail server statistics
@@ -15,22 +15,43 @@
 endef
 
 MASTER_SITES = $(SF_MIRRORS)
-DISTFILES  = $(NAME)-$(VERSION).tar.gz
-DISTFILES += CSWawstats.postinstall
+DISTFILES += $(DISTNAME).tar.gz
+DISTFILES += CSWawstats.postmsg
+PATCHFILES += 0001-Adjust-pathes-for-OpenCSW.patch
 
-PATCHFILES = patch-configdir.diff
+PACKAGES += CSWawstats
+CATALOGNAME_CSWawstats = awstats
+SPKG_DESC_CSWawstats = Featureful tool for web, ftp and mail server statistics
+RUNTIME_DEP_PKGS_CSWawstats += CSWperl
+ARCHALL_CSWawstats = 1
 
-# We define upstream file regex so we can be notifed of new upstream software release
-UFILES_REGEX = $(NAME)-(\d+(?:\.\d+)*).tar.gz
+# These are documentation files, ignore for now
+CHECKPKG_OVERRIDES_CSWawstats += file-with-bad-content|/usr/local|root/opt/csw/share/doc/awstats/awstats_setup.html
+CHECKPKG_OVERRIDES_CSWawstats += file-with-bad-content|/usr/local|root/opt/csw/share/doc/awstats/awstats_faq.html
+CHECKPKG_OVERRIDES_CSWawstats += file-with-bad-content|/usr/local|root/opt/csw/share/doc/awstats/awstats_contrib.html
+CHECKPKG_OVERRIDES_CSWawstats += file-with-bad-content|/usr/local|root/opt/csw/share/doc/awstats/awstats_webmin.html
+CHECKPKG_OVERRIDES_CSWawstats += file-with-bad-content|/usr/local|root/opt/csw/share/doc/awstats/awstats_changelog.txt
 
-# If the url used to check for software update is different of MASTER_SITES, then 
-# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES
-# UPSTREAM_MASTER_SITES = 
+# Only in comments, patches by 0001
+CHECKPKG_OVERRIDES_CSWawstats += file-with-bad-content|/usr/local|root/opt/csw/share/www/awstats/cgi-bin/awstats.pl
 
-SPKG_SOURCEURL = http://awstats.sourceforge.net
+# These are all comments, I patched all important occurrences
+CHECKPKG_OVERRIDES_CSWawstats += file-with-bad-content|/usr/local|root/etc/opt/csw/awstats.conf.CSW
+CHECKPKG_OVERRIDES_CSWawstats += file-with-bad-content|/usr/local|root/opt/csw/share/awstats/awstats_buildstaticpages.pl
+CHECKPKG_OVERRIDES_CSWawstats += file-with-bad-content|/usr/local|root/opt/csw/share/awstats/awstats_configure.pl
+CHECKPKG_OVERRIDES_CSWawstats += file-with-bad-content|/usr/local|root/opt/csw/share/awstats/geoip_generator.pl
+CHECKPKG_OVERRIDES_CSWawstats += file-with-bad-content|/usr/local|root/opt/csw/share/awstats/webmin/awstats-1.9.wbm
+CHECKPKG_OVERRIDES_CSWawstats += file-with-bad-content|/usr/share|root/etc/opt/csw/awstats.conf.CSW
+CHECKPKG_OVERRIDES_CSWawstats += file-with-bad-content|/usr/share|root/opt/csw/share/www/awstats/cgi-bin/awstats.pl
+CHECKPKG_OVERRIDES_CSWawstats += file-with-bad-content|/usr/share|root/opt/csw/share/www/awstats/cgi-bin/plugins/tooltips.pm
+CHECKPKG_OVERRIDES_CSWawstats += file-with-bad-content|/usr/share|root/opt/csw/share/awstats/awstats_exportlib.pl
+CHECKPKG_OVERRIDES_CSWawstats += file-with-bad-content|/usr/share|root/opt/csw/share/doc/awstats/awstats_config.html
 
-RUNTIME_DEP_PKGS = CSWapache2 CSWperl
+# awstats is pretty generic, do not directly depend
+CHECKPKG_OVERRIDES_CSWawstats += missing-dependency|CSWapache2
 
+VENDOR_URL = http://awstats.sourceforge.net
+
 LICENSE = docs/LICENSE.TXT
 
 CONFIGURE_SCRIPTS =
@@ -38,11 +59,9 @@
 TEST_SCRIPTS =
 INSTALL_SCRIPTS = custom
 
-PRESERVECONF  = $(prefix)/apache2/etc/extra/httpd-awstats.conf.CSW
-PRESERVECONF += $(sysconfdir)/awstats.conf.CSW
+PRESERVECONF  = $(prefix)/apache2/etc/extra/httpd-awstats.conf
+PRESERVECONF += $(sysconfdir)/awstats.conf
 
-ARCHALL = 1
-
 include gar/category.mk
 
 install-custom:
@@ -61,20 +80,20 @@
 		$(DESTDIR)$(sharedstatedir)/www/awstats/cgi-bin/
 
 	ginstall -d $(DESTDIR)$(sysconfdir)/awstats/
-	cat $(WORKSRC)/tools/wwwroot/cgi-bin/awstats.model.conf | perl -p -e '\
-		s!/var/log/httpd/mylog.log!/var/opt/csw/awstats!;
-		'> $(DESTDIR)$(sysconfdir)/awstats.conf.CSW
+	cat $(WORKSRC)/wwwroot/cgi-bin/awstats.model.conf | perl -p \
+		-e 's!/var/log/httpd/mylog.log!/var/opt/csw/awstats/awstats.log!;' \
+		> $(DESTDIR)$(sysconfdir)/awstats.conf
 	rm -f $(DESTDIR)$(sharedstatedir)/www/awstats/cgi-bin/awstats.model.conf
 
 	ginstall -d $(DESTDIR)$(prefix)/apache2/etc/extra/
-	cat $(WORKSRC)/tools/httpd_conf | perl -p -e '\
-		s!/usr/local/awstats/wwwroot/cgi-bin/!$(sharedstatedir)/www/awstats/cgi-bin/!; \
-		s!/usr/local/awstats/wwwroot/!$(sharedstatedir)/www/awstats/htdocs/!; \
-		s!/usr/local/awstats/wwwroot!$(sharedstatedir)/www/awstats/htdocs!; \
-		'> $(DESTDIR)$(prefix)/apache2/etc/extra/httpd-awstats.conf.CSW
+	cat $(WORKSRC)/tools/httpd_conf | perl -p \
+		-e 's!/usr/local/awstats/wwwroot/cgi-bin/!$(sharedstatedir)/www/awstats/cgi-bin/!;' \
+		-e 's!/usr/local/awstats/wwwroot/!$(sharedstatedir)/www/awstats/htdocs/!;' \
+		-e 's!/usr/local/awstats/wwwroot!$(sharedstatedir)/www/awstats/htdocs!;' \
+		-e 's!/usr/local/awstats/!$(sharedstatedir)/www/awstats/!;' \
+		> $(DESTDIR)$(prefix)/apache2/etc/extra/httpd-awstats.conf
 	rm -f $(DESTDIR)$(sharedstatedir)/awstats/httpd_conf
-
 	@$(MAKECOOKIE)
 
-# ./awstats_updateall.pl now -awstatsprog=/opt/csw/share/www/awstats/cgi-bin/awstats.pl -configdir=/opt/csw/etc
+# ./awstats_updateall.pl now -awstatsprog=/opt/csw/share/www/awstats/cgi-bin/awstats.pl -configdir=/etc/opt/csw
 

Modified: csw/mgar/pkg/awstats/trunk/checksums
===================================================================
--- csw/mgar/pkg/awstats/trunk/checksums	2011-04-28 07:39:25 UTC (rev 14427)
+++ csw/mgar/pkg/awstats/trunk/checksums	2011-04-28 08:26:25 UTC (rev 14428)
@@ -1,3 +1 @@
-a6ae0f8a42dd10e41957c29ac78bbc18  download/CSWawstats.postinstall
-fc19dbb8449eccf3300efb30ca3376cb  download/awstats-6.9.tar.gz
-068ec2e8ef85b3fe8182b656ca4d8e6c  download/patch-configdir.diff
+3e8e09b9ebe74513bb34290dbcd37b45  awstats-7.0.tar.gz

Added: csw/mgar/pkg/awstats/trunk/files/0001-Adjust-pathes-for-OpenCSW.patch
===================================================================
--- csw/mgar/pkg/awstats/trunk/files/0001-Adjust-pathes-for-OpenCSW.patch	                        (rev 0)
+++ csw/mgar/pkg/awstats/trunk/files/0001-Adjust-pathes-for-OpenCSW.patch	2011-04-28 08:26:25 UTC (rev 14428)
@@ -0,0 +1,176 @@
+From 1f539c2b1c30e35f63bfa05b4962b64536554195 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Thu, 28 Apr 2011 10:16:33 +0200
+Subject: [PATCH] Adjust pathes for OpenCSW
+
+---
+ tools/awstats_buildstaticpages.pl   |   10 +++++-----
+ tools/awstats_exportlib.pl          |    3 ++-
+ tools/awstats_updateall.pl          |    4 ++--
+ tools/geoip_generator.pl            |    2 +-
+ wwwroot/cgi-bin/awstats.pl          |   19 +++++++++----------
+ wwwroot/cgi-bin/plugins/tooltips.pm |    3 ++-
+ 6 files changed, 21 insertions(+), 20 deletions(-)
+
+diff --git a/tools/awstats_buildstaticpages.pl b/tools/awstats_buildstaticpages.pl
+index 2c9d115..e12ca58 100755
+--- a/tools/awstats_buildstaticpages.pl
++++ b/tools/awstats_buildstaticpages.pl
+@@ -138,7 +138,7 @@ sub Read_Config {
+ 	my @PossibleConfigDir=();
+ 
+ 	if ($configdir) { @PossibleConfigDir=("$configdir"); }
+-	else { @PossibleConfigDir=("$AwstatsDir","$DIR","/etc/awstats","/usr/local/etc/awstats","/etc","/etc/opt/awstats"); }
++	else { @PossibleConfigDir=("$AwstatsDir","$DIR","/etc/opt/csw","/opt/csw/etc"); }
+ 
+ 	# Open config file
+ 	$FileConfig=$FileSuffix='';
+@@ -307,8 +307,8 @@ my $retour;
+ # Check if AWSTATS prog is found
+ my $AwstatsFound=0;
+ if (-s "$Awstats") { $AwstatsFound=1; }
+-elsif (-s "/usr/local/awstats/wwwroot/cgi-bin/awstats.pl") {
+-	$Awstats="/usr/local/awstats/wwwroot/cgi-bin/awstats.pl";
++elsif (-s "/opt/csw/share/www/awstats/cgi-bin/awstats.pl") {
++	$Awstats="/opt/csw/share/www/awstats/cgi-bin/awstats.pl";
+ 	$AwstatsFound=1;
+ }
+ if (! $AwstatsFound) {
+@@ -322,8 +322,8 @@ debug("AwstatsDir=$AwstatsDir");
+ if ($BuildPDF) {
+ 	my $HtmlDocFound=0;
+ 	if (-x "$HtmlDoc") { $HtmlDocFound=1; }
+-	elsif (-x "/usr/bin/htmldoc") {
+-		$HtmlDoc='/usr/bin/htmldoc';
++	elsif (-x "/opt/csw/bin/htmldoc") {
++		$HtmlDoc='/opt/csw/bin/htmldoc';
+ 		$HtmlDocFound=1;
+ 	}
+ 	if (! $HtmlDocFound) {
+diff --git a/tools/awstats_exportlib.pl b/tools/awstats_exportlib.pl
+index 426cf55..49183a4 100755
+--- a/tools/awstats_exportlib.pl
++++ b/tools/awstats_exportlib.pl
+@@ -133,12 +133,13 @@ sub Read_Ref_Data {
+ 	# Windows :                           		"${DIR}lib" (lib in same dir than awstats.pl)
+ 	# Debian package :                    		"/usr/share/awstats/lib"
+ 	# Other possible directories :        		"./lib"
++	# OpenCSW package:				"/opt/csw/share/www/awstats/cgi-bin/lib"
+ 	my $lib=shift;
+ 	my $dir=$lib;
+ 	$lib=~ s/^.*[\\\/]//;
+ 	$dir =~ s/[^\\\/]+$//; $dir =~ s/[\\\/]+$//;
+ 	debug("Lib: $lib, Dir: $dir");
+-	my @PossibleLibDir=("$dir","{DIR}lib","/usr/share/awstats/lib","./lib");
++	my @PossibleLibDir=("$dir","/opt/csw/share/www/awstats/cgi-bin/lib");
+ 
+ 	my %FilePath=();
+ 	my @FileListToLoad=();
+diff --git a/tools/awstats_updateall.pl b/tools/awstats_updateall.pl
+index 569b03e..7fdcd81 100755
+--- a/tools/awstats_updateall.pl
++++ b/tools/awstats_updateall.pl
+@@ -130,8 +130,8 @@ if (@files) {
+ 	# Check if AWSTATS prog is found
+ 	my $AwstatsFound=0;
+ 	if (-s "$Awstats") { $AwstatsFound=1; }
+-	elsif (-s "/usr/local/awstats/wwwroot/cgi-bin/awstats.pl") {
+-		$Awstats="/usr/local/awstats/wwwroot/cgi-bin/awstats.pl";
++	elsif (-s "/opt/csw/share/www/awstats/cgi-bin/awstats.pl") {
++		$Awstats="/opt/csw/share/www/awstats/cgi-bin/awstats.pl";
+ 		$AwstatsFound=1;
+ 	}
+ 	if (! $AwstatsFound) {
+diff --git a/tools/geoip_generator.pl b/tools/geoip_generator.pl
+index 4b9c02d..7f7847b 100755
+--- a/tools/geoip_generator.pl
++++ b/tools/geoip_generator.pl
+@@ -136,7 +136,7 @@ sub Read_Config {
+ 	# if an output was specified, then skip this
+ 	if (!($Output eq '')){return;}
+ 	if ($configdir) { @PossibleConfigDir=("$configdir"); }
+-	else { @PossibleConfigDir=("$DIR","/etc/awstats","/usr/local/etc/awstats","/etc","/etc/opt/awstats"); }
++	else { @PossibleConfigDir=("$DIR","/etc/opt/csw","/opt/csw/etc"); }
+ 
+ 	# Open config file
+ 	$FileConfig=$FileSuffix='';
+diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl
+index bae9db6..2d243a2 100755
+--- a/wwwroot/cgi-bin/awstats.pl
++++ b/wwwroot/cgi-bin/awstats.pl
+@@ -1709,12 +1709,11 @@ sub Read_Config {
+ 	# Standard, Mandrake and Debian package :	"/etc/awstats"
+ 	# Other possible directories :				"/usr/local/etc/awstats", "/etc"
+ 	# FHS standard, Suse package : 				"/etc/opt/awstats"
++	# OpenCSW package:					"/etc/opt/csw", "/opt/csw/etc"
+ 	my $configdir         = shift;
+ 	my @PossibleConfigDir = (
+ 			"$DIR",
+-			"/etc/awstats",
+-			"/usr/local/etc/awstats", "/etc",
+-			"/etc/opt/awstats"
++			"/etc/opt/csw", "/opt/csw/etc",
+ 		); 
+ 
+ 	if ($configdir) {
+@@ -2160,7 +2159,8 @@ sub Read_Ref_Data {
+ # Check lib files in common possible directories :
+ # Windows and standard package:        		"$DIR/lib" (lib in same dir than awstats.pl)
+ # Debian package:                    		"/usr/share/awstats/lib"
+-	my @PossibleLibDir = ( "$DIR/lib", "/usr/share/awstats/lib" );
++# OpenCSW package:				"/opt/csw/share/www/awstats/cgi-bin/lib"
++	my @PossibleLibDir = ( "/opt/csw/share/www/awstats/cgi-bin/lib" );
+ 	my %FilePath       = ();
+ 	my %DirAddedInINC  = ();
+ 	my @FileListToLoad = ();
+@@ -2296,8 +2296,9 @@ sub Read_Language_Data {
+ # Check lang files in common possible directories :
+ # Windows and standard package:         	"$DIR/lang" (lang in same dir than awstats.pl)
+ # Debian package :                    		"/usr/share/awstats/lang"
++# OpenCSW package:				"/opt/csw/share/www/awstats/cgi-bin/lang"
+ 	my @PossibleLangDir =
+-	  ( "$DirLang", "$DIR/lang", "/usr/share/awstats/lang" );
++	  ( "$DirLang", "/opt/csw/share/www/awstats/cgi-bin/lang" );
+ 
+ 	my $FileLang = '';
+ 	foreach (@PossibleLangDir) {
+@@ -3047,10 +3048,9 @@ sub Read_Plugins {
+ # Windows and standard package:        		"$DIR/plugins" (plugins in same dir than awstats.pl)
+ # Redhat :                                  "/usr/local/awstats/wwwroot/cgi-bin/plugins"
+ # Debian package :                    		"/usr/share/awstats/plugins"
++# OpenCSW package:				"/opt/csw/share/www/awstats/cgi-bin/plugins"
+ 	my @PossiblePluginsDir = (
+-		"$DIR/plugins",
+-		"/usr/local/awstats/wwwroot/cgi-bin/plugins",
+-		"/usr/share/awstats/plugins"
++		"/opt/csw/share/www/awstats/cgi-bin/plugins",
+ 	);
+ 	my %DirAddedInINC = ();
+ 
+@@ -8476,8 +8476,7 @@ sub PrintCLIHelp{
+ 	print
+ "  Note 1: Config files ($PROG.virtualhostname.conf or $PROG.conf) must be\n";
+ 	print
+-"   in /etc/awstats, /usr/local/etc/awstats, /etc or same directory than\n";
+-	print "   awstats.pl script file.\n";
++"   in /etc/opt/csw or /opt/csw/etc\n";
+ 	print
+ "  Note 2: If AWSTATS_FORCE_CONFIG environment variable is defined, AWStats will\n";
+ 	print
+diff --git a/wwwroot/cgi-bin/plugins/tooltips.pm b/wwwroot/cgi-bin/plugins/tooltips.pm
+index 70215f6..cf6aff6 100755
+--- a/wwwroot/cgi-bin/plugins/tooltips.pm
++++ b/wwwroot/cgi-bin/plugins/tooltips.pm
+@@ -166,7 +166,8 @@ sub _ReadAndOutputTooltipFile {
+ 	# Windows and standard package:         	"$DIR/lang" (lang in same dir than awstats.pl)
+ 	# Debian package :                    		"/usr/share/awstats/lang"
+ 	# Other possible directories :        		"./lang"
+-	my @PossibleLangDir=("$DirLang","${DIR}/lang","/usr/share/awstats/lang","./lang");
++	# OpenCSW package:				"/opt/csw/share/www/awstats/cgi-bin/lang"
++	my @PossibleLangDir=("$DirLang","/opt/csw/share/www/awstats/cgi-bin/lang");
+ 
+ 	my $FileLang='';
+ 	my $logtype=lc($LogType ne 'S'?$LogType:'W');
+-- 
+1.7.3.2
+

Deleted: csw/mgar/pkg/awstats/trunk/files/CSWawstats.postinstall
===================================================================
--- csw/mgar/pkg/awstats/trunk/files/CSWawstats.postinstall	2011-04-28 07:39:25 UTC (rev 14427)
+++ csw/mgar/pkg/awstats/trunk/files/CSWawstats.postinstall	2011-04-28 08:26:25 UTC (rev 14428)
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-cat <<EOF
-___________________________________________________________________________
-The Awstats system has been installed but you must configure
-awstats.<your_virtualhost>.conf in /opt/csw/awstats/etc/.  An example 
-configuration file exists in
-/opt/csw/awstats/wwwroot/cgi-bin/awstats.model.conf.
-
-Additionally if you wamt Awstats accessible from your Apache webserver.  Run
-awstats_configure.pl.  This will create a configuration file for you and added
-the correct lines to your apache conf.  It should be smart enough to pick up
-on the correct version of apache.
-
-cd /opt/csw/awstats
-./awstats_configure.pl
-
-NOTE: If you only plan on running awstats on the command line you do not need
-to run awstats_configure.pl.
-___________________________________________________________________________
-EOF

Copied: csw/mgar/pkg/awstats/trunk/files/CSWawstats.postmsg (from rev 14409, csw/mgar/pkg/awstats/trunk/files/CSWawstats.postinstall)
===================================================================
--- csw/mgar/pkg/awstats/trunk/files/CSWawstats.postmsg	                        (rev 0)
+++ csw/mgar/pkg/awstats/trunk/files/CSWawstats.postmsg	2011-04-28 08:26:25 UTC (rev 14428)
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+cat <<EOF
+___________________________________________________________________________
+The Awstats system has been installed but you must configure
+awstats.<your_virtualhost>.conf in /opt/csw/awstats/etc/.  An example 
+configuration file exists in
+/opt/csw/awstats/wwwroot/cgi-bin/awstats.model.conf.
+
+Additionally if you wamt Awstats accessible from your Apache webserver.  Run
+awstats_configure.pl.  This will create a configuration file for you and added
+the correct lines to your apache conf.  It should be smart enough to pick up
+on the correct version of apache.
+
+cd /opt/csw/awstats
+./awstats_configure.pl
+
+NOTE: If you only plan on running awstats on the command line you do not need
+to run awstats_configure.pl.
+___________________________________________________________________________
+EOF

Deleted: csw/mgar/pkg/awstats/trunk/files/patch-configdir.diff
===================================================================
--- csw/mgar/pkg/awstats/trunk/files/patch-configdir.diff	2011-04-28 07:39:25 UTC (rev 14427)
+++ csw/mgar/pkg/awstats/trunk/files/patch-configdir.diff	2011-04-28 08:26:25 UTC (rev 14428)
@@ -1,15 +0,0 @@
-diff -Naur awstats-6.9.orig/wwwroot/cgi-bin/awstats.pl awstats-6.9.patched/wwwroot/cgi-bin/awstats.pl
---- awstats-6.9.orig/wwwroot/cgi-bin/awstats.pl	2008-11-30 16:42:46.000000000 +0100
-+++ awstats-6.9.patched/wwwroot/cgi-bin/awstats.pl	2009-07-29 19:21:45.456796688 +0200
-@@ -1642,9 +1642,8 @@
- 	}
- 	else {
- 		@PossibleConfigDir = (
--							   "$DIR",                   "/etc/awstats",
--							   "/usr/local/etc/awstats", "/etc",
--							   "/etc/opt/awstats"
-+							   "$DIR",
-+							   "/etc/opt/csw/", "/opt/csw/etc/"
- 		);
- 	}
- 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list