diff options
Diffstat (limited to 'www/mod_watch')
-rw-r--r-- | www/mod_watch/Makefile | 62 | ||||
-rw-r--r-- | www/mod_watch/distinfo | 1 | ||||
-rw-r--r-- | www/mod_watch/pkg-comment | 1 | ||||
-rw-r--r-- | www/mod_watch/pkg-descr | 8 | ||||
-rw-r--r-- | www/mod_watch/pkg-install | 14 | ||||
-rw-r--r-- | www/mod_watch/pkg-message | 20 | ||||
-rw-r--r-- | www/mod_watch/pkg-plist | 21 |
7 files changed, 127 insertions, 0 deletions
diff --git a/www/mod_watch/Makefile b/www/mod_watch/Makefile new file mode 100644 index 0000000..5697a9e --- /dev/null +++ b/www/mod_watch/Makefile @@ -0,0 +1,62 @@ +# New ports collection makefile for: mod_watch +# Date created: 18 August 2001 +# Whom: Anders Nordby <anders@fix.no> +# +# $FreeBSD$ +# + +PORTNAME= mod_watch +PORTVERSION= 2.1 +CATEGORIES= www +MASTER_SITES= http://www.snert.com/Software/mod_watch/ \ + ftp://ftp.nuug.no/pub/anders/distfiles/ +DISTNAME= ${PORTNAME}201 +EXTRACT_SUFX= .tgz + +MAINTAINER= anders@fix.no + +BUILD_DEPENDS= ${APXS}:${PORTSDIR}/www/apache13 +RUN_DEPENDS= ${APXS}:${PORTSDIR}/www/apache13 + +USE_PERL5= yes + +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} + +APXS?= ${LOCALBASE}/sbin/apxs + +DOCS= apache2mrtg.html dbm-client.html dbm-server.html index.shtml \ + mod_watch.html style.css + +FIXCONVERT= CHANGES.TXT convert.pl index.shtml + +post-patch: +.for f in ${FIXCONVERT} + @${SED} -e 's:convert.pl:convertdbm.pl:g' < ${WRKSRC}/${f} \ + > ${WRKSRC}/${f}.tmp + @${MV} ${WRKSRC}/${f}.tmp ${WRKSRC}/${f} +.endfor + +do-build: + @cd ${WRKSRC} && ${APXS} -c mod_watch.c + +do-install: + ${APXS} -i -A -n watch ${WRKSRC}/mod_watch.so + ${INSTALL_SCRIPT} ${WRKSRC}/apache2mrtg.pl ${PREFIX}/sbin + ${INSTALL_SCRIPT} ${WRKSRC}/mod_watch.pl ${PREFIX}/sbin + ${INSTALL_SCRIPT} ${WRKSRC}/convert.pl ${PREFIX}/sbin/convertdbm.pl + ${INSTALL_SCRIPT} ${WRKSRC}/dbm-client.pl ${PREFIX}/sbin + ${INSTALL_SCRIPT} ${WRKSRC}/dbm-server.pl ${PREFIX}/sbin +.if !defined(NOPORTDOCS) + @${INSTALL} -d -m 0755 ${PREFIX}/share/doc/mod_watch/html/Img + ${INSTALL_DATA} ${WRKSRC}/CHANGES.TXT ${PREFIX}/share/doc/mod_watch/ + ${INSTALL_DATA} ${WRKSRC}/Img/mrpixel.gif ${PREFIX}/share/doc/mod_watch/html/Img/ + ${INSTALL_DATA} ${WRKSRC}/Img/sun-logo.jpg ${PREFIX}/share/doc/mod_watch/html/Img/ + ${INSTALL_DATA} ${WRKSRC}/Img/wave1.jpg ${PREFIX}/share/doc/mod_watch/html/Img/ +.for f in ${DOCS} + ${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/share/doc/mod_watch/html/ +.endfor +.endif + @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/www/mod_watch/distinfo b/www/mod_watch/distinfo new file mode 100644 index 0000000..c030a24 --- /dev/null +++ b/www/mod_watch/distinfo @@ -0,0 +1 @@ +MD5 (mod_watch201.tgz) = 896177039e142c75cc8af6c1b4fb297e diff --git a/www/mod_watch/pkg-comment b/www/mod_watch/pkg-comment new file mode 100644 index 0000000..ce05d90 --- /dev/null +++ b/www/mod_watch/pkg-comment @@ -0,0 +1 @@ +An Apache module to monitor bandwidth usage, for use with MRTG etc diff --git a/www/mod_watch/pkg-descr b/www/mod_watch/pkg-descr new file mode 100644 index 0000000..81e1f03 --- /dev/null +++ b/www/mod_watch/pkg-descr @@ -0,0 +1,8 @@ +This Apache module will watch and collect the bytes in & out per virtual host, +per file owner, and the web server as a whole. It was designed for use with +MRTG, which will make nice graphical representations of the data, but is +general enough that it can be applied to other purposes. + +WWW: http://www.snert.com/Software/mod_watch/ + +- Anders Nordby <anders@fix.no> diff --git a/www/mod_watch/pkg-install b/www/mod_watch/pkg-install new file mode 100644 index 0000000..0c7f661 --- /dev/null +++ b/www/mod_watch/pkg-install @@ -0,0 +1,14 @@ +#!/bin/sh + +case $2 in + PRE-INSTALL) + ;; + POST-INSTALL) + install -d -o nobody -g nobody -m 0755 /var/spool/mod_watch + ;; + *) + echo "Unexpected Argument $2." + exit 1 + ;; +esac +exit 0 diff --git a/www/mod_watch/pkg-message b/www/mod_watch/pkg-message new file mode 100644 index 0000000..349b0b8 --- /dev/null +++ b/www/mod_watch/pkg-message @@ -0,0 +1,20 @@ +************************************************************ +You've installed mod_watch, a module to monitor bandwidth +usage. + +/var/spool/mod_watch has been created. It's owned by user +nobody and group nobody. For mod_watch to work, the Apache +user/group must be able to create and update files in this +directory. + +Edit your apache.conf or httpd.conf to enable and setup this +module. Have a look at the files in +${PREFIX}/share/doc/mod_watch/html for information on how to +configure it etc. + +Then do this to make it work effective: + +# apachectl configtest (see if there are any config errors) +# apachectl restart + +************************************************************ diff --git a/www/mod_watch/pkg-plist b/www/mod_watch/pkg-plist new file mode 100644 index 0000000..9be3736 --- /dev/null +++ b/www/mod_watch/pkg-plist @@ -0,0 +1,21 @@ +sbin/apache2mrtg.pl +sbin/mod_watch.pl +sbin/convertdbm.pl +sbin/dbm-client.pl +sbin/dbm-server.pl +libexec/apache/mod_watch.so +@exec %D/sbin/apxs -e -A -n watch %D/%F +@unexec %D/sbin/apxs -e -A -n watch %D/%F +%%PORTDOCS%%share/doc/mod_watch/html/Img/mrpixel.gif +%%PORTDOCS%%share/doc/mod_watch/html/Img/sun-logo.jpg +%%PORTDOCS%%share/doc/mod_watch/html/Img/wave1.jpg +%%PORTDOCS%%share/doc/mod_watch/html/apache2mrtg.html +%%PORTDOCS%%share/doc/mod_watch/html/dbm-client.html +%%PORTDOCS%%share/doc/mod_watch/html/dbm-server.html +%%PORTDOCS%%share/doc/mod_watch/html/index.shtml +%%PORTDOCS%%share/doc/mod_watch/html/mod_watch.html +%%PORTDOCS%%share/doc/mod_watch/html/style.css +%%PORTDOCS%%share/doc/mod_watch/CHANGES.TXT +%%PORTDOCS%%@dirrm share/doc/mod_watch/html/Img +%%PORTDOCS%%@dirrm share/doc/mod_watch/html +%%PORTDOCS%%@dirrm share/doc/mod_watch |