diff options
author | garga <garga@FreeBSD.org> | 2005-10-13 12:16:19 +0000 |
---|---|---|
committer | garga <garga@FreeBSD.org> | 2005-10-13 12:16:19 +0000 |
commit | a2b98e60f21ccc163c3bcbb0d1c74a1855e42539 (patch) | |
tree | 2c6ee0187a364ea7da2c5d420209ba318dd2f9ee | |
parent | 5c1ef5c079ab8442d7357dcf88a6f1d3c9910a85 (diff) | |
download | FreeBSD-ports-a2b98e60f21ccc163c3bcbb0d1c74a1855e42539.zip FreeBSD-ports-a2b98e60f21ccc163c3bcbb0d1c74a1855e42539.tar.gz |
- Update to 2.1
Changelog includes:
- completely new analyzers, more fast, powerful and reusable
- capability to monitor DNSBL (rbl)
- way easier extensibility
- vastly improved documentation
PR: ports/87212
Submitted by: maintainer
-rw-r--r-- | mail/qmrtg/Makefile | 94 | ||||
-rw-r--r-- | mail/qmrtg/distinfo | 4 | ||||
-rw-r--r-- | mail/qmrtg/files/patch-qmrtg.sh | 8 | ||||
-rw-r--r-- | mail/qmrtg/files/patch-qmrtgsync.sh | 8 | ||||
-rw-r--r-- | mail/qmrtg/pkg-descr | 9 | ||||
-rw-r--r-- | mail/qmrtg/pkg-message | 35 | ||||
-rw-r--r-- | mail/qmrtg/pkg-plist | 31 |
7 files changed, 108 insertions, 81 deletions
diff --git a/mail/qmrtg/Makefile b/mail/qmrtg/Makefile index a3d6f03..621f3d9 100644 --- a/mail/qmrtg/Makefile +++ b/mail/qmrtg/Makefile @@ -6,48 +6,84 @@ # PORTNAME= qmrtg -PORTVERSION= 0.5.7 -PORTREVISION= 1 +PORTVERSION= 2.1 CATEGORIES= mail net-mgmt MASTER_SITES= http://dev.publicshout.org/qmrtg/download/ MAINTAINER= mij@bitchx.it COMMENT= A simple tool for monitoring and graphing qmail activity through MRTG -RUN_DEPENDS= bash:${PORTSDIR}/shells/bash2 \ - mrtg:${PORTSDIR}/net-mgmt/mrtg +RUN_DEPENDS= bash:${PORTSDIR}/shells/bash2 +.if !defined(WITHOUT_MRTG) +RUN_DEPENDS+= mrtg:${PORTSDIR}/net-mgmt/mrtg +.endif + +USE_BZIP2= yes -MAN1= qmrtg.1 -USE_GMAKE= yes +MAN8= qfilt.8 qmrtg-concurrency.8 qmrtg-dnsbl.8 \ + qmrtg-queue.8 qmrtg-regex.8 qmrtg-throughput.8 \ + qmrtg.8 qtaif.8 +MANCOMPRESSED= no -# this is the local apache documentroot -WWWROOTDIR?= ${PREFIX}/www/data -QMRTG_DBDIR?= /var/db/${PORTNAME} +GNU_CONFIGURE= yes +# where is qmrtg' database directory +QMRTG_DBDIR:= /var/db/${PORTNAME} + +# variables to be "exported" to plist PLIST_SUB= QMRTG_DBDIR=${QMRTG_DBDIR} -post-install: -# in_stall manpages - @${MKDIR} ${PREFIX}/man/man1 -.for foo in ${MAN1} - ${INSTALL_MAN} ${WRKSRC}/man/${foo} ${PREFIX}/man/man1 -.endfor -.if !defined(WITHOUT_EXAMPLES) -# in_stall conig file examples - ${MKDIR} ${EXAMPLESDIR} - ${CP} ${WRKSRC}/examples/* ${EXAMPLESDIR}/ -.endif -.if !defined(WITHOUT_HTMLTEMPLATES) -# in_stall html templates for mrtg graphs - ${MKDIR} ${WWWROOTDIR}/${PORTNAME} - ${CP} ${WRKSRC}/html/* ${WWWROOTDIR}/${PORTNAME}/ -.endif +.if !defined(PACKAGE_BUILDING) && !defined(BATCH) +# interactive --> ask user for options +IS_INTERACTIVE= yes .if !defined(NOPORTDOCS) -# in_stall the few (FAQ, LICENSE etc) files provided by the package +# install extra doc by default +OPTIONS= \ + DOCS "Install LICENSE, FAQs etc (shared doc)" On \ + HTMLTEMPLATES "Install QMRTG HTML templates" On +.else # defined(NOPORTDOCS) +# avoid to offer to install doc +OPTIONS= \ + HTMLTEMPLATES "Install QMRTG HTML templates" On +.endif # !defined(NOPORTDOCS) +.else # defined(PACKAGE_BUILDING) || defined(BATCH) +# building batch +# setting defaults +WITH_HTMLTEMPLATES= yes +.if !defined(NOPORTDOCS) +# also install doc by default +WITH_DOCS= yes +.endif # !defined(NOPORTDOCS) +.endif # !defined(PACKAGE_BUILDING) + +.include <bsd.port.pre.mk> + +pre-extract: + @${ECHO_MSG} " ---> Qmrtg can be installed without MRTG by defining WITHOUT_MRTG" + +post-install: +# possibly installing docs +.if defined(WITH_DOCS) && !defined(NOPORTDOCS) + @${ECHO_MSG} " ---> Installing QMRTG extra docs as requested [ ${DOCSDIR} ]" ${MKDIR} ${DOCSDIR} - ${CP} ${WRKSRC}/doc/* ${DOCSDIR}/ + ${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${DOCSDIR} +.endif +# possibly installing HTML templates +.if defined(WITH_HTMLTEMPLATES) + @${ECHO_MSG} " ---> Installing examples as requested [ ${EXAMPLESDIR} ]" + ${MKDIR} ${DATADIR}/html + ${INSTALL_DATA} ${WRKSRC}/html/* ${DATADIR}/html + ${MKDIR} ${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/examples/mrtg.cfg ${EXAMPLESDIR} .endif +# creating db directory + @${ECHO_MSG} " ---> Creating QMRTG db directory [ ${QMRTG_DBDIR} ]" ${MKDIR} ${QMRTG_DBDIR} - @${CAT} pkg-message +# installing configuration example + @${ECHO_MSG} " ---> Installing configuration example [ ${PREFIX}/etc/qmrtg.conf.dist ]" + ${MKDIR} ${PREFIX}/etc + ${CP} ${WRKSRC}/examples/qmrtg.conf.sample ${PREFIX}/etc/qmrtg.conf.dist +# displaying the port install msg + @${CAT} ${PKGMESSAGE} -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/mail/qmrtg/distinfo b/mail/qmrtg/distinfo index 7283d47..ffc13a2 100644 --- a/mail/qmrtg/distinfo +++ b/mail/qmrtg/distinfo @@ -1,2 +1,2 @@ -MD5 (qmrtg-0.5.7.tar.gz) = 9b200fc036c27eee899a64409a83c538 -SIZE (qmrtg-0.5.7.tar.gz) = 21360 +MD5 (qmrtg-2.1.tar.bz2) = b95176b94e749eb25d00f8ff57c5e22f +SIZE (qmrtg-2.1.tar.bz2) = 68697 diff --git a/mail/qmrtg/files/patch-qmrtg.sh b/mail/qmrtg/files/patch-qmrtg.sh deleted file mode 100644 index 66ab81d..0000000 --- a/mail/qmrtg/files/patch-qmrtg.sh +++ /dev/null @@ -1,8 +0,0 @@ ---- script/qmrtg.sh Sat May 29 20:13:35 2004 -+++ script/qmrtg.sh Sat May 29 20:13:43 2004 -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/usr/local/bin/bash - - CONFFILE=/usr/local/etc/qmrtg.conf - QMRTG_DBPATH=/tmp/qmrtg diff --git a/mail/qmrtg/files/patch-qmrtgsync.sh b/mail/qmrtg/files/patch-qmrtgsync.sh deleted file mode 100644 index f788ce2..0000000 --- a/mail/qmrtg/files/patch-qmrtgsync.sh +++ /dev/null @@ -1,8 +0,0 @@ ---- script/qmrtgsync.sh Sat Jun 12 02:31:41 2004 -+++ script/qmrtgsync.sh Sat Jun 12 02:32:03 2004 -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/usr/local/bin/bash - - CONFFILE=/usr/local/etc/qmrtg.conf - QMRTG_DBPATH=/tmp/qmrtg diff --git a/mail/qmrtg/pkg-descr b/mail/qmrtg/pkg-descr index 1fcca93..1f2e88e 100644 --- a/mail/qmrtg/pkg-descr +++ b/mail/qmrtg/pkg-descr @@ -1,13 +1,14 @@ -Qmrtg is a free tool to help monitoring the activity of a qmail mailserver. +Qmrtg is a free tool to help monitoring the activity of processes. It's intended to be used with MRTG. Qmrtg is modular. Each module carries out a different log analysis. A super-module lets the user easily request any analysis without to know anything about the modules themselves. -Qmrtg has been originally written for qmail, but most of its modules -work with every software logging with multilog (see 'daemontools'). +Qmrtg has been originally written for monitoring qmail servers, but +its modules are general enough to parse any kind of log file passed +through multilog (see daemontools). -Qmrtg is an alternative to qmailmrtg7. +Qmrtg is a modern alternative to qmailmrtg7. WWW: http://dev.publicshout.org/qmrtg/ diff --git a/mail/qmrtg/pkg-message b/mail/qmrtg/pkg-message index 0031de2..0eb1083 100644 --- a/mail/qmrtg/pkg-message +++ b/mail/qmrtg/pkg-message @@ -1,22 +1,19 @@ -================================================================ -QMRTG has been installed. - -1) A "qmrtg/" directory has been added to ${PREFIX}/www/data -If you don't care publishing qmrtg's reports, just run a polite -$ rm -rf ${WWWROOTDIR}/qmrtg -Also remind to remove it if you definitively uninstall qmrtg. +============================================================================== -2) to enable qmrtg monitoring: -a) have a look at the ${PREFIX}/www/data/cfg/mrtg.cfg" file. -you must at least set the 'WorkDir:' variable and qmail log paths -(search for '/var/log/supervise/qmail' and adapt to your system) -b) configure qmrtg.conf. Defaults are fine generally. At least copy -${PREFIX}/etc/qmrtg.conf.sample to "qmrtg.conf". -c) make mrtg run automatically. Using cron, put that in "/etc/crontab": +QMRTG has been installed. +Generation 2 is no longer compatible with older releases (< 2.0) !!! -*/5 * * * * root /usr/local/bin/mrtg \ - /usr/local/www/data/qmrtg/cfg/mrtg.cfg 1>/dev/null 2>&1 +There's still some steps you may need to do manually: +1) QMRTG SETUP. If you're coming from older versions, re-adjust the +configuration file (start from the .dist one) +2) WWW SETUP. HTML templates are now installed as shared data +[ share/qmrtg ]. Copying them in some http-reachable dir is your +job by now. This is cleaner and less intrusive. +3) MRTG SETUP. Possibly adjust the mrtg.cfg example provided in examples. +You may need to set the path of qmail' queue if non-standard. +4) RUN. The file RUNNING.txt in the shared doc dir tells you how -Note: to skip qmrtg reporting your mx' whole history at the first call, -run the following before point "c)" -$ qmrtgsync.sh +You can sign a usersbook at http://dev.publicshout.org/qmrtg/usersbook/ . +You can get support and announcements by subscribing to + qmrtg-subscribe@lists.dev.publicshout.org +============================================================================== diff --git a/mail/qmrtg/pkg-plist b/mail/qmrtg/pkg-plist index 9248693..a99ab9e 100644 --- a/mail/qmrtg/pkg-plist +++ b/mail/qmrtg/pkg-plist @@ -1,18 +1,27 @@ -bin/qmrtg-bytes -bin/qmrtg-concurrency -bin/qmrtg-deliveries -bin/qmrtg-errors -bin/qmrtg-queue -bin/qmrtg-smtpop bin/qmrtg.sh bin/qmrtgsync.sh -etc/qmrtg.conf.sample +bin/qmrtgcheckconf.sh +bin/qmrtg-regex +bin/qmrtg-queue +bin/qmrtg-throughput +bin/qmrtg-dnsbl +bin/qmrtg-concurrency +bin/qfilt +bin/qtaif +etc/qmrtg.conf.dist +%%EXAMPLESDIR%%/mrtg.cfg +@dirrm %%EXAMPLESDIR%% +%%DATADIR%%/html/details.html +%%DATADIR%%/html/help.html +%%DATADIR%%/html/mail.html +%%DATADIR%%/html/style.css +@dirrm %%DATADIR%%/html +@dirrm %%DATADIR%% +%%PORTDOCS%%%%DOCSDIR%%/CONFIGURE.txt %%PORTDOCS%%%%DOCSDIR%%/FAQ.txt %%PORTDOCS%%%%DOCSDIR%%/LICENSE.txt %%PORTDOCS%%%%DOCSDIR%%/README.txt +%%PORTDOCS%%%%DOCSDIR%%/RUNNING.txt %%PORTDOCS%%@dirrm %%DOCSDIR%% -%%PORTDOCS%%%%EXAMPLESDIR%%/mrtg.cfg -%%PORTDOCS%%%%EXAMPLESDIR%%/qmrtg.conf.sample -%%PORTDOCS%%@dirrm %%EXAMPLESDIR%% @exec mkdir -p %%QMRTG_DBDIR%% -@unexec rm -rf %%QMRTG_DBDIR%% 2>&1 >/dev/null || true +@unexec rmdir %%QMRTG_DBDIR%% 2>/dev/null || true |