1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00

Respect PREFIX

PR:		86481
Submitted by:	Naram Qashat <cyberbotx@cyberbotx.com>
Approved by:	webmaster@lightningfire.net (maintainer timeout, 32 days)
This commit is contained in:
Marcus Alves Grando 2005-10-26 00:30:46 +00:00
parent 55a470bcb1
commit 0c26165008
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=146358
12 changed files with 148 additions and 24 deletions

View File

@ -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>

View File

@ -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) {

View File

@ -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

View File

@ -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) {

View File

@ -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

View File

@ -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

View File

@ -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>

View File

@ -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) {

View File

@ -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

View File

@ -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) {

View File

@ -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

View File

@ -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