summaryrefslogtreecommitdiff
path: root/www/awstats/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'www/awstats/Makefile')
-rw-r--r--www/awstats/Makefile27
1 files changed, 25 insertions, 2 deletions
diff --git a/www/awstats/Makefile b/www/awstats/Makefile
index 3b71f2431d1..ed386957cee 100644
--- a/www/awstats/Makefile
+++ b/www/awstats/Makefile
@@ -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