- awstats_configure.pl now works
- awstats.pl will now look in @PKG_SYSCONFDIR@/awstats for config files - create datadir with correct permissions under @VARBASE@/awstats - update MESSAGE telling user than can now use @PKG_SYSCONFDIR@ awstats - fix location of apache log dirs so they match the pkgsrc default - fix location of apache conf dirs so they match the pkgsrc default - bump PKGREVISION
This commit is contained in:
parent
4568c8982e
commit
e649d47090
4 changed files with 173 additions and 8 deletions
|
@ -1,9 +1,12 @@
|
|||
===========================================================================
|
||||
$NetBSD: MESSAGE,v 1.3 2005/02/15 21:13:34 snj Exp $
|
||||
$NetBSD: MESSAGE,v 1.4 2005/08/26 20:22:56 adrianp Exp $
|
||||
|
||||
An example file has been installed as
|
||||
${PREFIX}/share/examples/awstats/awstats.conf. After adjusting it to
|
||||
your needs, copy it to ${PREFIX}/awstats/cgi-bin/awstats.conf.
|
||||
your needs, copy it to ${PREFIX}/awstats/cgi-bin/awstats.conf.
|
||||
|
||||
Alternatively, you can also now use ${PKG_SYSCONFDIR} to store your awstats
|
||||
configuration files.
|
||||
|
||||
You may need to adjust the cgi-bin path of your webserver -- for details,
|
||||
refer to the documentation in
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# $NetBSD: Makefile,v 1.19 2005/08/20 14:28:03 adrianp Exp $
|
||||
# $NetBSD: Makefile,v 1.20 2005/08/26 20:22:56 adrianp Exp $
|
||||
#
|
||||
|
||||
DISTNAME= awstats-6.4
|
||||
PKGREVISION= 1
|
||||
PKGREVISION= 2
|
||||
CATEGORIES= www
|
||||
MASTER_SITES= http://awstats.sourceforge.net/files/
|
||||
EXTRACT_SUFX= .tgz
|
||||
|
@ -18,6 +18,29 @@ USE_TOOLS+= perl:run
|
|||
REPLACE_PERL= tools/*.pl \
|
||||
wwwroot/cgi-bin/*.pl
|
||||
|
||||
APACHE_USER?= www
|
||||
APACHE_GROUP?= www
|
||||
|
||||
USE_PKGINSTALL= YES
|
||||
# OWN_DIRS= ${VARBASE}/awstats
|
||||
OWN_DIRS_PERMS+= ${VARBASE}/awstats ${APACHE_USER} ${APACHE_GROUP} 0700
|
||||
PKG_SYSCONFSUBDIR= awstats
|
||||
|
||||
SUBST_CLASSES= conf
|
||||
SUBST_STAGE.conf= post-patch
|
||||
SUBST_FILES.conf= tools/awstats_configure.pl \
|
||||
wwwroot/cgi-bin/awstats.model.conf \
|
||||
wwwroot/cgi-bin/awstats.pl
|
||||
SUBST_SED.conf= -e "s|@PREFIX@|${PREFIX}|g" \
|
||||
-e "s|@VARBASE@|${VARBASE}|g" \
|
||||
-e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g" \
|
||||
-e "s|/var/log/httpd/mylog.log|${VARBASE}/log/httpd/access_log|g" \
|
||||
-e "s|\"/etc/opt/awstats\"|\"/etc/opt/awstats\",\"${PKG_SYSCONFDIR}\"|g"
|
||||
SUBST_MESSAGE.conf= "Fixing configuration files and scripts."
|
||||
|
||||
CONF_FILES+= ${PREFIX}/share/examples/awstats/awstats.conf \
|
||||
${PKG_SYSCONFDIR}/awstats.model.conf
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/awstats
|
||||
${INSTALL_SCRIPT_DIR} ${PREFIX}/awstats/bin
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
$NetBSD: distinfo,v 1.12 2005/08/20 14:28:03 adrianp Exp $
|
||||
$NetBSD: distinfo,v 1.13 2005/08/26 20:22:56 adrianp Exp $
|
||||
|
||||
SHA1 (awstats-6.4nb1/awstats-6.4.tgz) = e58671499006881516406e9fa704b0ef34b94971
|
||||
RMD160 (awstats-6.4nb1/awstats-6.4.tgz) = 318b34afcb7f7e8a4d26d46344e37bcbe3a8460a
|
||||
Size (awstats-6.4nb1/awstats-6.4.tgz) = 918435 bytes
|
||||
SHA1 (awstats-6.4nb2/awstats-6.4.tgz) = e58671499006881516406e9fa704b0ef34b94971
|
||||
RMD160 (awstats-6.4nb2/awstats-6.4.tgz) = 318b34afcb7f7e8a4d26d46344e37bcbe3a8460a
|
||||
Size (awstats-6.4nb2/awstats-6.4.tgz) = 918435 bytes
|
||||
SHA1 (patch-aa) = a28254829dc3a025648ead708c932d432a69ed59
|
||||
SHA1 (patch-ab) = e39f2eae584597879428b02315e08067432f7d88
|
||||
|
|
138
www/awstats/patches/patch-ab
Normal file
138
www/awstats/patches/patch-ab
Normal file
|
@ -0,0 +1,138 @@
|
|||
$NetBSD: patch-ab,v 1.3 2005/08/26 20:22:56 adrianp Exp $
|
||||
|
||||
--- tools/awstats_configure.pl.orig 2005-01-15 22:42:58.000000000 +0000
|
||||
+++ tools/awstats_configure.pl
|
||||
@@ -29,12 +29,12 @@ $AWSTATS_MODEL_CONFIG
|
||||
$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_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
|
||||
+$AWSTATS_ICON_PATH='@PREFIX@/awstats/icon';
|
||||
+$AWSTATS_CSS_PATH='@PREFIX@/awstats/css';
|
||||
+$AWSTATS_CLASSES_PATH='@PREFIX@/awstats/classes';
|
||||
+$AWSTATS_CGI_PATH='@PREFIX@/awstats/cgi-bin';
|
||||
+$AWSTATS_MODEL_CONFIG='@PKG_SYSCONFDIR@/awstats.model.conf'; # Used only when configure ran on linux
|
||||
+$AWSTATS_DIRDATA_PATH='@VARBASE@/awstats'; # Used only when configure ran on linux
|
||||
|
||||
|
||||
|
||||
@@ -62,7 +62,8 @@ use vars qw/
|
||||
'C:/Program Files/Apache Group/Apache/conf/httpd.conf',
|
||||
'/etc/httpd/httpd.conf',
|
||||
'/usr/local/apache/conf/httpd.conf',
|
||||
-'/usr/local/apache2/conf/httpd.conf'
|
||||
+'/usr/local/apache2/conf/httpd.conf',
|
||||
+'@PREFIX@/etc/httpd/httpd.conf',
|
||||
);
|
||||
|
||||
use vars qw/
|
||||
@@ -308,13 +309,13 @@ if ($OS eq 'linux') {
|
||||
$AWSTATS_PATH=`pwd`; $AWSTATS_PATH =~ s/[\r\n]//;
|
||||
$AWSTATS_PATH=~s/tools[\\\/]?$//;
|
||||
$AWSTATS_PATH=~s/[\\\/]$//;
|
||||
- if ($AWSTATS_PATH ne '/usr/local/awstats') {
|
||||
- print "Warning: AWStats standard directory on Linux OS is '/usr/local/awstats'.\n";
|
||||
+ if ($AWSTATS_PATH ne '@PREFIX@/awstats') {
|
||||
+ print "Warning: AWStats standard directory on Linux OS is '@PREFIX@/awstats'.\n";
|
||||
print "If you want to use standard directory, you should first move all content\n";
|
||||
print "of AWStats distribution from current directory:\n";
|
||||
print "$AWSTATS_PATH\n";
|
||||
print "to standard directory:\n";
|
||||
- print "/usr/local/awstats\n";
|
||||
+ print "@PREFIX@/awstats\n";
|
||||
print "And then, run configure.pl from this location.\n";
|
||||
print "Do you want to continue setup from this NON standard directory [yN] ? ";
|
||||
my $bidon='';
|
||||
@@ -323,23 +324,23 @@ if ($OS eq 'linux') {
|
||||
print "configure.pl aborted.\n";
|
||||
exit 1;
|
||||
}
|
||||
- $AWSTATS_ICON_PATH="$AWSTATS_PATH/wwwroot/icon";
|
||||
- $AWSTATS_CSS_PATH="$AWSTATS_PATH/wwwroot/css";
|
||||
- $AWSTATS_CLASSES_PATH="$AWSTATS_PATH/wwwroot/classes";
|
||||
- $AWSTATS_CGI_PATH="$AWSTATS_PATH/wwwroot/cgi-bin";
|
||||
+ $AWSTATS_ICON_PATH="$AWSTATS_PATH/icon";
|
||||
+ $AWSTATS_CSS_PATH="$AWSTATS_PATH/css";
|
||||
+ $AWSTATS_CLASSES_PATH="$AWSTATS_PATH/classes";
|
||||
+ $AWSTATS_CGI_PATH="$AWSTATS_PATH/cgi-bin";
|
||||
}
|
||||
}
|
||||
elsif ($OS eq 'macosx') {
|
||||
$AWSTATS_PATH=`pwd`; $AWSTATS_PATH =~ s/[\r\n]//;
|
||||
$AWSTATS_PATH=~s/tools[\\\/]?$//;
|
||||
$AWSTATS_PATH=~s/[\\\/]$//;
|
||||
- if ($AWSTATS_PATH ne '/Library/WebServer/awstats') {
|
||||
- print "Warning: AWStats standard directory on Mac OS X is '/Library/WebServer/awstats'.\n";
|
||||
+ if ($AWSTATS_PATH ne '@PREFIX@/awstats') {
|
||||
+ print "Warning: AWStats standard directory on Mac OS X is '@PREFIX@/awstats'.\n";
|
||||
print "If you want to use standard directory, you should first move all content\n";
|
||||
print "of AWStats distribution from current directory:\n";
|
||||
print "$AWSTATS_PATH\n";
|
||||
print "to standard directory:\n";
|
||||
- print "/Library/WebServer/awstats\n";
|
||||
+ print "@PREFIX@/awstats\n";
|
||||
print "And then, run configure.pl from this location.\n";
|
||||
print "Do you want to continue setup from this NON standard directory [yN] ? ";
|
||||
my $bidon='';
|
||||
@@ -348,10 +349,10 @@ elsif ($OS eq 'macosx') {
|
||||
print "configure.pl aborted.\n";
|
||||
exit 1;
|
||||
}
|
||||
- $AWSTATS_ICON_PATH="$AWSTATS_PATH/wwwroot/icon";
|
||||
- $AWSTATS_CSS_PATH="$AWSTATS_PATH/wwwroot/css";
|
||||
- $AWSTATS_CLASSES_PATH="$AWSTATS_PATH/wwwroot/classes";
|
||||
- $AWSTATS_CGI_PATH="$AWSTATS_PATH/wwwroot/cgi-bin";
|
||||
+ $AWSTATS_ICON_PATH="$AWSTATS_PATH/icon";
|
||||
+ $AWSTATS_CSS_PATH="$AWSTATS_PATH/css";
|
||||
+ $AWSTATS_CLASSES_PATH="$AWSTATS_PATH/classes";
|
||||
+ $AWSTATS_CGI_PATH="$AWSTATS_PATH/cgi-bin";
|
||||
}
|
||||
}
|
||||
elsif ($OS eq 'windows') {
|
||||
@@ -420,6 +421,7 @@ if (! scalar keys %ApacheConfPath) {
|
||||
print "\n".($bidon?"Now, enter":"Enter")." full config file path of your Web server.\n";
|
||||
print "Example: /etc/httpd/httpd.conf\n";
|
||||
print "Example: /usr/local/apache2/conf/httpd.conf\n";
|
||||
+ print "Example: @PREFIX@/etc/httpd/httpd.conf\n";
|
||||
print "Example: c:\\Program files\\apache group\\apache\\conf\\httpd.conf\n";
|
||||
$bidon='';
|
||||
while ($bidon ne 'none' && ! -f "$bidon") {
|
||||
@@ -542,8 +544,8 @@ EOF
|
||||
# -----------------------------
|
||||
my $modelfile='';
|
||||
if ($OS eq 'linux') {
|
||||
- if (-f "$AWSTATS_PATH/wwwroot/cgi-bin/awstats.model.conf") {
|
||||
- $modelfile="$AWSTATS_PATH/wwwroot/cgi-bin/awstats.model.conf";
|
||||
+ if (-f "@PKG_SYSCONFDIR@/awstats.model.conf") {
|
||||
+ $modelfile="@PKG_SYSCONFDIR@/awstats.model.conf";
|
||||
}
|
||||
else {
|
||||
$modelfile="$AWSTATS_MODEL_CONFIG";
|
||||
@@ -551,7 +553,7 @@ if ($OS eq 'linux') {
|
||||
}
|
||||
}
|
||||
elsif ($OS eq "macosx") {
|
||||
- $modelfile="$AWSTATS_PATH/wwwroot/cgi-bin/awstats.model.conf";
|
||||
+ $modelfile="@PKG_SYSCONFDIR@/awstats.model.conf";
|
||||
}
|
||||
elsif ($OS eq 'windows') { $modelfile="$AWSTATS_PATH\\wwwroot\\cgi-bin\\awstats.model.conf"; }
|
||||
else { $modelfile="$AWSTATS_PATH\\wwwroot\\cgi-bin\\awstats.model.conf"; }
|
||||
@@ -604,11 +606,11 @@ if ($bidon =~ /^y/i) {
|
||||
if ($OS eq 'linux') {
|
||||
print "\n-----> Define config file path\n";
|
||||
print "In which directory do you plan to store your config file(s) ?\n";
|
||||
- print "Default: /etc/awstats\n";
|
||||
+ print "Default: @PKG_SYSCONFDIR@\n";
|
||||
my $bidon='';
|
||||
print "Directory path to store config file(s) (Enter for default):\n> ";
|
||||
$bidon=<STDIN>; chomp $bidon;
|
||||
- if (! $bidon) { $bidon = "/etc/awstats"; }
|
||||
+ if (! $bidon) { $bidon = "@PKG_SYSCONFDIR@"; }
|
||||
my $configdir=$bidon;
|
||||
if (! -d $configdir) {
|
||||
# Create the directory for config files
|
Loading…
Reference in a new issue