ports/86481: [PATCH] www/awstats: Respect user's PREFIX setting

Naram Qashat cyberbotx at cyberbotx.com
Fri Sep 23 02:00:29 UTC 2005


>Number:         86481
>Category:       ports
>Synopsis:       [PATCH] www/awstats: Respect user's PREFIX setting
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 23 02:00:27 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Naram Qashat
>Release:        FreeBSD 5.4-RELEASE-p6 i386
>Organization:
>Environment:
System: FreeBSD kirby.cyberbotx.com 5.4-RELEASE-p6 FreeBSD 5.4-RELEASE-p6 #0: Sun Aug 21 22:23:40 EDT 2005
>Description:
This is to make the awstats port actually respect a user's PREFIX setting, as
I've found it annoying to have to correct this myself or use a longer path to
invoke awstats, and it should be respecting PREFIX anyways.

Added file(s):
- awstats-6.4_1.tbz
- files/patch-tools-awstats_buildstaticpages.pl
- files/patch-tools-awstats_configure.pl
- files/patch-tools-awstats_updateall.pl
- files/patch-wwwroot-cgi-bin-awstats.pl
- files/pkg-message.in

Removed file(s):
- pkg-message

Port maintainer (webmaster at lightningfire.net) is cc'd.

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- awstats-6.4_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/www/awstats/Makefile /kirby/shared/awstats/Makefile
--- /usr/ports/www/awstats/Makefile	Wed Aug 24 04:00:42 2005
+++ /kirby/shared/awstats/Makefile	Thu Sep 22 21:44:55 2005
@@ -20,6 +20,15 @@
 
 NO_BUILD=	yes
 USE_PERL5_RUN=	yes
+USE_REINPLACE=	yes
+
+SUB_FILES=	pkg-message
+
+post-patch:
+	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/tools/awstats_buildstaticpages.pl
+	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/tools/awstats_configure.pl
+	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/tools/awstats_updateall.pl
+	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/wwwroot/cgi-bin/awstats.pl
 
 do-install:
 	@${MKDIR} ${PREFIX}/www/awstats
Binary files /usr/ports/www/awstats/awstats-6.4_1.tbz and /kirby/shared/awstats/awstats-6.4_1.tbz differ
diff -ruN --exclude=CVS /usr/ports/www/awstats/files/patch-tools-awstats_buildstaticpages.pl /kirby/shared/awstats/files/patch-tools-awstats_buildstaticpages.pl
--- /usr/ports/www/awstats/files/patch-tools-awstats_buildstaticpages.pl	Wed Dec 31 19:00:00 1969
+++ /kirby/shared/awstats/files/patch-tools-awstats_buildstaticpages.pl	Thu Sep 22 21:39:41 2005
@@ -0,0 +1,13 @@
+--- tools/awstats_buildstaticpages.pl.orig	Sun Feb 20 11:11:06 2005
++++ tools/awstats_buildstaticpages.pl	Thu Sep 22 20:33:32 2005
+@@ -293,8 +293,8 @@
+ # 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 "%%PREFIX%%/www/awstats/cgi-bin/awstats.pl") {
++	$Awstats="%%PREFIX%%/www/awstats/cgi-bin/awstats.pl";
+ 	$AwstatsFound=1;
+ }
+ if (! $AwstatsFound) {
diff -ruN --exclude=CVS /usr/ports/www/awstats/files/patch-tools-awstats_configure.pl /kirby/shared/awstats/files/patch-tools-awstats_configure.pl
--- /usr/ports/www/awstats/files/patch-tools-awstats_configure.pl	Wed Dec 31 19:00:00 1969
+++ /kirby/shared/awstats/files/patch-tools-awstats_configure.pl	Thu Sep 22 21:39:41 2005
@@ -0,0 +1,17 @@
+--- tools/awstats_configure.pl.orig	Sat Jan 15 17:42:58 2005
++++ tools/awstats_configure.pl	Thu Sep 22 20:34:07 2005
+@@ -29,10 +29,10 @@
+ $AWSTATS_DIRDATA_PATH
+ /;
+ $AWSTATS_PATH='';
+-$AWSTATS_ICON_PATH='/usr/local/awstats/wwwroot/icon';
+-$AWSTATS_CSS_PATH='/usr/local/awstats/wwwroot/css';
+-$AWSTATS_CLASSES_PATH='/usr/local/awstats/wwwroot/classes';
+-$AWSTATS_CGI_PATH='/usr/local/awstats/wwwroot/cgi-bin';
++$AWSTATS_ICON_PATH='%%PREFIX%%/www/awstats/icon';
++$AWSTATS_CSS_PATH='%%PREFIX%%/www/awstats/css';
++$AWSTATS_CLASSES_PATH='%%PREFIX%%/www/awstats/classes';
++$AWSTATS_CGI_PATH='%%PREFIX%%/www/awstats/cgi-bin';
+ $AWSTATS_MODEL_CONFIG='/etc/awstats/awstats.model.conf';		# Used only when configure ran on linux
+ $AWSTATS_DIRDATA_PATH='/var/lib/awstats';						# Used only when configure ran on linux
+
diff -ruN --exclude=CVS /usr/ports/www/awstats/files/patch-tools-awstats_updateall.pl /kirby/shared/awstats/files/patch-tools-awstats_updateall.pl
--- /usr/ports/www/awstats/files/patch-tools-awstats_updateall.pl	Wed Dec 31 19:00:00 1969
+++ /kirby/shared/awstats/files/patch-tools-awstats_updateall.pl	Thu Sep 22 21:38:13 2005
@@ -0,0 +1,13 @@
+--- tools/awstats_updateall.pl.orig	Mon Jun  7 08:27:26 2004
++++ tools/awstats_updateall.pl	Thu Sep 22 01:30:15 2005
+@@ -121,8 +121,8 @@
+ 	# 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 "%%PREFIX%%/www/awstats/cgi-bin/awstats.pl") {
++		$Awstats="%%PREFIX%%/www/awstats/cgi-bin/awstats.pl";
+ 		$AwstatsFound=1;
+ 	}
+ 	if (! $AwstatsFound) {
diff -ruN --exclude=CVS /usr/ports/www/awstats/files/patch-wwwroot-cgi-bin-awstats.pl /kirby/shared/awstats/files/patch-wwwroot-cgi-bin-awstats.pl
--- /usr/ports/www/awstats/files/patch-wwwroot-cgi-bin-awstats.pl	Wed Dec 31 19:00:00 1969
+++ /kirby/shared/awstats/files/patch-wwwroot-cgi-bin-awstats.pl	Thu Sep 22 21:46:09 2005
@@ -0,0 +1,11 @@
+--- wwwroot/cgi-bin/awstats.pl.orig	Thu Feb 24 16:02:23 2005
++++ wwwroot/cgi-bin/awstats.pl	Thu Sep 22 20:33:18 2005
+@@ -1835,7 +1835,7 @@
+ 	# 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"
+-	my @PossiblePluginsDir=("$DIR/plugins","/usr/local/awstats/wwwroot/cgi-bin/plugins","/usr/share/awstats/plugins");
++	my @PossiblePluginsDir=("$DIR/plugins","%%PREFIX%%/www/awstats/cgi-bin/plugins","/usr/share/awstats/plugins");
+  	my %DirAddedInINC=();
+
+ 	#Removed for security reason
diff -ruN --exclude=CVS /usr/ports/www/awstats/files/pkg-message.in /kirby/shared/awstats/files/pkg-message.in
--- /usr/ports/www/awstats/files/pkg-message.in	Wed Dec 31 19:00:00 1969
+++ /kirby/shared/awstats/files/pkg-message.in	Thu Sep 22 21:51:38 2005
@@ -0,0 +1,22 @@
+*****************************************************************
+Please add the following to your apache config, and restart.
+
+#
+# Directives to allow use of AWStats as a CGI
+#
+Alias /awstatsclasses "%%PREFIX%%/www/awstats/classes/"
+Alias /awstatscss "%%PREFIX%%/www/awstats/css/"
+Alias /awstatsicons "%%PREFIX%%/www/awstats/icons/"
+ScriptAlias /awstats/ "%%PREFIX%%/www/awstats/cgi-bin/"
+
+#
+# This is to permit URL access to scripts/files in AWStats directory.
+#
+<Directory "%%PREFIX%%/www/awstats/">
+    Options None
+    AllowOverride None
+    Order allow,deny
+    Allow from all
+</Directory>
+
+*****************************************************************
diff -ruN --exclude=CVS /usr/ports/www/awstats/pkg-message /kirby/shared/awstats/pkg-message
--- /usr/ports/www/awstats/pkg-message	Fri Dec 31 06:35:09 2004
+++ /kirby/shared/awstats/pkg-message	Wed Dec 31 19:00:00 1969
@@ -1,22 +0,0 @@
-*****************************************************************
-Please add the following to your apache config, and restart.
-
-#
-# Directives to allow use of AWStats as a CGI
-#
-Alias /awstatsclasses "/usr/local/www/awstats/classes/"
-Alias /awstatscss "/usr/local/www/awstats/css/"
-Alias /awstatsicons "/usr/local/www/awstats/icons/"
-ScriptAlias /awstats/ "/usr/local/www/awstats/cgi-bin/"
-
-#
-# This is to permit URL access to scripts/files in AWStats directory.
-#
-<Directory "/usr/local/www/awstats/">
-    Options None
-    AllowOverride None
-    Order allow,deny
-    Allow from all
-</Directory>
-
-*****************************************************************
--- awstats-6.4_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list