2007-07-04 22:54:31 +02:00
|
|
|
# $NetBSD: Makefile,v 1.33 2007/07/04 20:55:04 jlam Exp $
|
2003-07-31 05:18:20 +02:00
|
|
|
#
|
|
|
|
|
2006-05-16 20:13:55 +02:00
|
|
|
DISTNAME= awstats-6.6
|
2007-02-20 19:29:49 +01:00
|
|
|
PKGREVISION= 4
|
2003-07-31 05:18:20 +02:00
|
|
|
CATEGORIES= www
|
2005-01-18 14:37:26 +01:00
|
|
|
MASTER_SITES= http://awstats.sourceforge.net/files/
|
2007-02-15 16:00:21 +01:00
|
|
|
# awstats are in the habit of updating the tarball but not incrementing
|
|
|
|
# the version or name of the tarball. DIST_SUBDIR must be set like this
|
|
|
|
# to avoid checksum errors.
|
|
|
|
#
|
2007-02-20 17:44:50 +01:00
|
|
|
DIST_SUBDIR= ${PKGNAME}
|
2003-07-31 05:18:20 +02:00
|
|
|
|
2004-12-29 11:22:27 +01:00
|
|
|
MAINTAINER= minskim@NetBSD.org
|
2003-07-31 05:18:20 +02:00
|
|
|
HOMEPAGE= http://awstats.sourceforge.net/
|
|
|
|
COMMENT= Free real-time logfile analyzer to get advanced web statistics
|
|
|
|
|
|
|
|
NO_BUILD= YES
|
|
|
|
|
2005-07-16 03:19:06 +02:00
|
|
|
USE_TOOLS+= perl:run
|
2006-05-16 20:13:55 +02:00
|
|
|
REPLACE_PERL+= tools/*.pl \
|
2004-01-13 00:58:43 +01:00
|
|
|
wwwroot/cgi-bin/*.pl
|
2003-07-31 05:18:20 +02:00
|
|
|
|
2007-02-15 16:00:21 +01:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
2005-08-26 22:22:56 +02:00
|
|
|
APACHE_USER?= www
|
|
|
|
APACHE_GROUP?= www
|
2007-07-04 22:54:31 +02:00
|
|
|
|
|
|
|
PKG_GROUPS_VARS+= APACHE_GROUP
|
|
|
|
PKG_USERS_VARS+= APACHE_USER
|
|
|
|
BUILD_DEFS+= VARBASE
|
2005-08-26 22:22:56 +02:00
|
|
|
|
|
|
|
# OWN_DIRS= ${VARBASE}/awstats
|
2007-02-15 16:00:21 +01:00
|
|
|
OWN_DIRS_PERMS+= ${VARBASE}/awstats ${APACHE_USER} ${APACHE_GROUP} 0700
|
2005-08-26 22:22:56 +02:00
|
|
|
PKG_SYSCONFSUBDIR= awstats
|
|
|
|
|
2005-12-05 21:49:47 +01:00
|
|
|
SUBST_CLASSES+= conf
|
2006-06-13 19:02:04 +02:00
|
|
|
SUBST_STAGE.conf= pre-configure
|
2005-08-26 22:22:56 +02:00
|
|
|
SUBST_FILES.conf= tools/awstats_configure.pl \
|
2006-06-13 19:02:04 +02:00
|
|
|
tools/awstats_buildstaticpages.pl \
|
|
|
|
tools/awstats_updateall.pl \
|
2005-08-26 22:22:56 +02:00
|
|
|
wwwroot/cgi-bin/awstats.model.conf \
|
|
|
|
wwwroot/cgi-bin/awstats.pl
|
2006-05-16 20:13:55 +02:00
|
|
|
SUBST_SED.conf= -e "s|@PREFIX@|${PREFIX}|g"
|
|
|
|
SUBST_SED.conf+= -e "s|@VARBASE@|${VARBASE}|g"
|
|
|
|
SUBST_SED.conf+= -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
|
2006-06-13 19:02:04 +02:00
|
|
|
SUBST_SED.conf+= -e "s|\"/etc/awstats|\"${PKG_SYSCONFDIR}|g"
|
|
|
|
SUBST_SED.conf+= -e "s|\"/usr/local/awstats/wwwroot|\"${PREFIX}/awstats|g"
|
2006-05-16 20:13:55 +02:00
|
|
|
SUBST_SED.conf+= -e "s|/var/log/httpd/mylog.log|${VARBASE}/log/httpd/access_log|g"
|
2006-04-22 11:22:05 +02:00
|
|
|
SUBST_MESSAGE.conf= Fixing configuration files and scripts.
|
2005-08-26 22:22:56 +02:00
|
|
|
|
|
|
|
CONF_FILES+= ${PREFIX}/share/examples/awstats/awstats.conf \
|
|
|
|
${PKG_SYSCONFDIR}/awstats.model.conf
|
|
|
|
|
2003-07-31 05:18:20 +02:00
|
|
|
do-install:
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/awstats
|
2005-01-18 14:37:26 +01:00
|
|
|
${INSTALL_SCRIPT_DIR} ${PREFIX}/awstats/bin
|
2005-01-19 13:49:33 +01:00
|
|
|
${INSTALL_SCRIPT_DIR} ${PREFIX}/awstats/cgi-bin
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/awstats/cgi-bin/plugins
|
2006-05-16 20:13:55 +02:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/awstats
|
2003-07-31 05:18:20 +02:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/awstats
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/tools/*.pl ${PREFIX}/awstats/bin
|
2005-01-19 13:49:33 +01:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/wwwroot/cgi-bin/*.pl \
|
|
|
|
${PREFIX}/awstats/cgi-bin
|
2003-07-31 05:18:20 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/wwwroot/cgi-bin/awstats.model.conf \
|
|
|
|
${PREFIX}/share/examples/awstats/awstats.conf
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/wwwroot/cgi-bin/plugins/example/example.pm \
|
|
|
|
${PREFIX}/share/examples/awstats/example.pm
|
2005-01-19 13:49:33 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/wwwroot/cgi-bin/plugins/*.pm \
|
|
|
|
${PREFIX}/awstats/cgi-bin/plugins
|
|
|
|
.for d in lang lib
|
|
|
|
cd ${WRKSRC}/wwwroot/cgi-bin \
|
2007-02-15 16:00:21 +01:00
|
|
|
&& pax -rwpppm ${d} ${PREFIX}/awstats/cgi-bin/
|
|
|
|
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/awstats/cgi-bin/${d}
|
|
|
|
find ${PREFIX}/awstats/cgi-bin/${d} -type d -print \
|
|
|
|
| xargs chmod ${PKGDIRMODE}
|
|
|
|
find ${PREFIX}/awstats/cgi-bin/${d} -type f -print \
|
|
|
|
| xargs chmod ${SHAREMODE}
|
2005-01-19 13:49:33 +01:00
|
|
|
.endfor
|
|
|
|
.for d in classes css icon js
|
2007-02-15 16:00:21 +01:00
|
|
|
cd ${WRKSRC}/wwwroot && pax -rwpppm ${d} ${PREFIX}/awstats/
|
|
|
|
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/awstats/${d}
|
|
|
|
find ${PREFIX}/awstats/${d} -type d -print \
|
|
|
|
| xargs chmod ${PKGDIRMODE}
|
|
|
|
find ${PREFIX}/awstats/${d} -type f -print \
|
|
|
|
| xargs chmod ${SHAREMODE}
|
2005-01-19 13:49:33 +01:00
|
|
|
.endfor
|
2007-02-15 16:00:21 +01:00
|
|
|
cd ${WRKSRC}/docs && pax -rwpppm . ${PREFIX}/share/doc/awstats/
|
|
|
|
chown -R ${DOCOWN}:${DOCGRP} ${PREFIX}/share/doc/awstats/
|
|
|
|
find ${PREFIX}/share/doc/awstats/ -type d -print \
|
|
|
|
| xargs chmod ${PKGDIRMODE}
|
|
|
|
find ${PREFIX}/share/doc/awstats/ -type f -print \
|
|
|
|
| xargs chmod ${DOCMODE}
|
2003-07-31 05:18:20 +02:00
|
|
|
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|