summaryrefslogtreecommitdiffstats
path: root/www/awstats
diff options
context:
space:
mode:
authormnag <mnag@FreeBSD.org>2005-10-26 00:30:46 +0000
committermnag <mnag@FreeBSD.org>2005-10-26 00:30:46 +0000
commite9543082dafb6f572436e0232dc39c943b51201b (patch)
tree0afc017189f98159bcb8b57efa914e802e120c5a /www/awstats
parent2d484e56bc6c84cec97698c9d15b332f675c9abd (diff)
downloadFreeBSD-ports-e9543082dafb6f572436e0232dc39c943b51201b.zip
FreeBSD-ports-e9543082dafb6f572436e0232dc39c943b51201b.tar.gz
Respect PREFIX
PR: 86481 Submitted by: Naram Qashat <cyberbotx@cyberbotx.com> Approved by: webmaster@lightningfire.net (maintainer timeout, 32 days)
Diffstat (limited to 'www/awstats')
-rw-r--r--www/awstats/Makefile22
-rw-r--r--www/awstats/files/patch-tools-awstats_buildstaticpages.pl13
-rw-r--r--www/awstats/files/patch-tools-awstats_configure.pl17
-rw-r--r--www/awstats/files/patch-tools-awstats_updateall.pl13
-rw-r--r--www/awstats/files/patch-wwwroot-cgi-bin-awstats.pl11
-rw-r--r--www/awstats/files/pkg-message.in (renamed from www/awstats/pkg-message)10
6 files changed, 74 insertions, 12 deletions
diff --git a/www/awstats/Makefile b/www/awstats/Makefile
index 39b7dbe..99a5cda 100644
--- a/www/awstats/Makefile
+++ b/www/awstats/Makefile
@@ -20,6 +20,21 @@ RUN_DEPENDS= ${SITE_PERL}/Net/XWhois.pm:${PORTSDIR}/net/p5-Net-XWhois
NO_BUILD= yes
USE_PERL5_RUN= yes
+USE_REINPLACE= yes
+
+SUB_FILES= pkg-message
+
+.include <bsd.port.pre.mk>
+
+.if ${PERL_LEVEL} < 500800
+RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Storable.pm:${PORTSDIR}/devel/p5-Storable
+.endif
+
+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
@@ -86,7 +101,6 @@ do-install:
@${ECHO_CMD} "* Rename ${PREFIX}/www/awstats/cgi-bin/awstats.model.conf to awstats.site.conf to setup awstats"
@${ECHO_CMD} "* Documentation has been installed in ${PREFIX}/share/doc/awstats"
@${ECHO_CMD} ""
-
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}/images
${INSTALL_DATA} ${WRKSRC}/docs/images/* ${DOCSDIR}/images
@@ -98,10 +112,4 @@ post-install:
@${CAT} ${PKGMESSAGE}
.endif
-.include <bsd.port.pre.mk>
-
-.if ${PERL_LEVEL} < 500800
-RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Storable.pm:${PORTSDIR}/devel/p5-Storable
-.endif
-
.include <bsd.port.post.mk>
diff --git a/www/awstats/files/patch-tools-awstats_buildstaticpages.pl b/www/awstats/files/patch-tools-awstats_buildstaticpages.pl
new file mode 100644
index 0000000..4345207
--- /dev/null
+++ b/www/awstats/files/patch-tools-awstats_buildstaticpages.pl
@@ -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 --git a/www/awstats/files/patch-tools-awstats_configure.pl b/www/awstats/files/patch-tools-awstats_configure.pl
new file mode 100644
index 0000000..e9240f4
--- /dev/null
+++ b/www/awstats/files/patch-tools-awstats_configure.pl
@@ -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 --git a/www/awstats/files/patch-tools-awstats_updateall.pl b/www/awstats/files/patch-tools-awstats_updateall.pl
new file mode 100644
index 0000000..21d9d6d
--- /dev/null
+++ b/www/awstats/files/patch-tools-awstats_updateall.pl
@@ -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 --git a/www/awstats/files/patch-wwwroot-cgi-bin-awstats.pl b/www/awstats/files/patch-wwwroot-cgi-bin-awstats.pl
new file mode 100644
index 0000000..8e1c95a
--- /dev/null
+++ b/www/awstats/files/patch-wwwroot-cgi-bin-awstats.pl
@@ -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 --git a/www/awstats/pkg-message b/www/awstats/files/pkg-message.in
index 0729d1a..5997bb4 100644
--- a/www/awstats/pkg-message
+++ b/www/awstats/files/pkg-message.in
@@ -4,15 +4,15 @@ 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/"
+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 "/usr/local/www/awstats/">
+<Directory "%%PREFIX%%/www/awstats/">
Options None
AllowOverride None
Order allow,deny
OpenPOWER on IntegriCloud