View | Details | Raw Unified | Return to bug 87212
Collapse All | Expand All

(-)qmrtg/Makefile (-29 / +65 lines)
Lines 2-53 Link Here
2
# Date created:        12 Jun 2004
2
# Date created:        12 Jun 2004
3
# Whom:                Mij
3
# Whom:                Mij
4
#
4
#
5
# $FreeBSD: ports/mail/qmrtg/Makefile,v 1.4 2004/12/04 19:13:05 jeh Exp $
5
# $FreeBSD$
6
#
6
#
7
7
8
PORTNAME=	qmrtg
8
PORTNAME=	qmrtg
9
PORTVERSION=	0.5.7
9
PORTVERSION=	2.1
10
PORTREVISION=	1
11
CATEGORIES=	mail net-mgmt
10
CATEGORIES=	mail net-mgmt
12
MASTER_SITES=	http://dev.publicshout.org/qmrtg/download/
11
MASTER_SITES=	http://dev.publicshout.org/qmrtg/download/
13
12
14
MAINTAINER=	mij@bitchx.it
13
MAINTAINER=	mij@bitchx.it
15
COMMENT=	A simple tool for monitoring and graphing qmail activity through MRTG
14
COMMENT=	A simple tool for monitoring and graphing qmail activity through MRTG
16
15
17
RUN_DEPENDS=	bash:${PORTSDIR}/shells/bash2     \
16
RUN_DEPENDS=	bash:${PORTSDIR}/shells/bash2
18
		mrtg:${PORTSDIR}/net-mgmt/mrtg
17
.if !defined(WITHOUT_MRTG)
18
RUN_DEPENDS+=	mrtg:${PORTSDIR}/net-mgmt/mrtg
19
.endif
20
21
USE_BZIP2=	yes
19
22
20
MAN1=		qmrtg.1
23
MAN8=		qfilt.8 qmrtg-concurrency.8 qmrtg-dnsbl.8 \
21
USE_GMAKE=	yes
24
		qmrtg-queue.8 qmrtg-regex.8 qmrtg-throughput.8 \
25
		qmrtg.8 qtaif.8
26
MANCOMPRESSED=	no
22
27
23
# this is the local apache documentroot
28
GNU_CONFIGURE=	yes
24
WWWROOTDIR?=	${PREFIX}/www/data
25
QMRTG_DBDIR?=	/var/db/${PORTNAME}
26
29
30
# where is qmrtg' database directory
31
QMRTG_DBDIR:=	/var/db/${PORTNAME}
32
33
# variables to be "exported" to plist
27
PLIST_SUB=	QMRTG_DBDIR=${QMRTG_DBDIR}
34
PLIST_SUB=	QMRTG_DBDIR=${QMRTG_DBDIR}
28
35
29
post-install:
36
.if !defined(PACKAGE_BUILDING) && !defined(BATCH)
30
# in_stall manpages
37
# interactive --> ask user for options
31
	@${MKDIR} ${PREFIX}/man/man1
38
IS_INTERACTIVE=		yes
32
.for foo in ${MAN1}
33
	${INSTALL_MAN} ${WRKSRC}/man/${foo} ${PREFIX}/man/man1
34
.endfor
35
.if !defined(WITHOUT_EXAMPLES)
36
# in_stall conig file examples
37
	${MKDIR} ${EXAMPLESDIR}
38
	${CP} ${WRKSRC}/examples/* ${EXAMPLESDIR}/
39
.endif
40
.if !defined(WITHOUT_HTMLTEMPLATES)
41
# in_stall html templates for mrtg graphs
42
	${MKDIR} ${WWWROOTDIR}/${PORTNAME}
43
	${CP} ${WRKSRC}/html/* ${WWWROOTDIR}/${PORTNAME}/
44
.endif
45
.if !defined(NOPORTDOCS)
39
.if !defined(NOPORTDOCS)
46
# in_stall the few (FAQ, LICENSE etc) files provided by the package
40
# install extra doc by default
41
OPTIONS=	\
42
	DOCS		"Install LICENSE, FAQs etc (shared doc)"	On \
43
	HTMLTEMPLATES	"Install QMRTG HTML templates"			On
44
.else		# defined(NOPORTDOCS)
45
# avoid to offer to install doc
46
OPTIONS=	\
47
	HTMLTEMPLATES	"Install QMRTG HTML templates"			On
48
.endif		# !defined(NOPORTDOCS)
49
.else		# defined(PACKAGE_BUILDING) || defined(BATCH)
50
# building batch
51
# setting defaults
52
WITH_HTMLTEMPLATES=	yes
53
.if !defined(NOPORTDOCS)
54
# also install doc by default
55
WITH_DOCS=	yes
56
.endif		# !defined(NOPORTDOCS)
57
.endif		# !defined(PACKAGE_BUILDING)
58
59
.include <bsd.port.pre.mk>
60
61
pre-extract:
62
	@${ECHO_MSG} "   --->   Qmrtg can be installed without MRTG by defining WITHOUT_MRTG"
63
64
post-install:
65
# possibly installing docs
66
.if defined(WITH_DOCS) && !defined(NOPORTDOCS)
67
	@${ECHO_MSG} "   --->   Installing QMRTG extra docs as requested [ ${DOCSDIR} ]"
47
	${MKDIR} ${DOCSDIR}
68
	${MKDIR} ${DOCSDIR}
48
	${CP} ${WRKSRC}/doc/* ${DOCSDIR}/
69
	${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${DOCSDIR}
70
.endif
71
# possibly installing HTML templates
72
.if defined(WITH_HTMLTEMPLATES)
73
	@${ECHO_MSG} "   --->   Installing examples as requested [ ${EXAMPLESDIR} ]"
74
	${MKDIR} ${DATADIR}/html
75
	${INSTALL_DATA} ${WRKSRC}/html/* ${DATADIR}/html
76
	${MKDIR} ${EXAMPLESDIR}
77
	${INSTALL_DATA} ${WRKSRC}/examples/mrtg.cfg ${EXAMPLESDIR}
49
.endif
78
.endif
79
# creating db directory
80
	@${ECHO_MSG} "   --->   Creating QMRTG db directory [ ${QMRTG_DBDIR} ]"
50
	${MKDIR} ${QMRTG_DBDIR}
81
	${MKDIR} ${QMRTG_DBDIR}
82
# installing configuration example
83
	@${ECHO_MSG} "   --->   Installing configuration example [ ${PREFIX}/etc/qmrtg.conf.dist ]"
84
	${MKDIR} ${PREFIX}/etc
85
	${CP} ${WRKSRC}/examples/qmrtg.conf.sample ${PREFIX}/etc/qmrtg.conf.dist
86
# displaying the port install msg
51
	@${CAT} pkg-message
87
	@${CAT} pkg-message
52
88
53
.include <bsd.port.mk>
89
.include <bsd.port.post.mk>
(-)qmrtg/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
MD5 (qmrtg-0.5.7.tar.gz) = 9b200fc036c27eee899a64409a83c538
1
MD5 (qmrtg-2.1.tar.bz2) = bb6d979688e334ef76a014e384ef407e
2
SIZE (qmrtg-0.5.7.tar.gz) = 21360
2
SIZE (qmrtg-2.1.tar.bz2) = 68738
(-)qmrtg/files/patch-qmrtg.sh (-8 lines)
Lines 1-8 Link Here
1
--- script/qmrtg.sh	Sat May 29 20:13:35 2004
2
+++ script/qmrtg.sh	Sat May 29 20:13:43 2004
3
@@ -1,4 +1,4 @@
4
-#!/bin/bash
5
+#!/usr/local/bin/bash
6
 
7
 CONFFILE=/usr/local/etc/qmrtg.conf
8
 QMRTG_DBPATH=/tmp/qmrtg
(-)qmrtg/files/patch-qmrtgsync.sh (-8 lines)
Lines 1-8 Link Here
1
--- script/qmrtgsync.sh	Sat Jun 12 02:31:41 2004
2
+++ script/qmrtgsync.sh	Sat Jun 12 02:32:03 2004
3
@@ -1,4 +1,4 @@
4
-#!/bin/bash
5
+#!/usr/local/bin/bash
6
 
7
 CONFFILE=/usr/local/etc/qmrtg.conf
8
 QMRTG_DBPATH=/tmp/qmrtg
(-)qmrtg/pkg-descr (-4 / +5 lines)
Lines 1-13 Link Here
1
Qmrtg is a free tool to help monitoring the activity of a qmail mailserver.
1
Qmrtg is a free tool to help monitoring the activity of processes.
2
It's intended to be used with MRTG.
2
It's intended to be used with MRTG.
3
3
4
Qmrtg is modular. Each module carries out a different log analysis. 
4
Qmrtg is modular. Each module carries out a different log analysis. 
5
A super-module lets the user easily request any analysis without to
5
A super-module lets the user easily request any analysis without to
6
know anything about the modules themselves.
6
know anything about the modules themselves.
7
Qmrtg has been originally written for qmail, but most of its modules
7
Qmrtg has been originally written for monitoring qmail servers, but
8
work with every software logging with multilog (see 'daemontools').
8
its modules are general enough to parse any kind of log file passed
9
through multilog (see daemontools).
9
10
10
Qmrtg is an alternative to qmailmrtg7.
11
Qmrtg is a modern alternative to qmailmrtg7.
11
12
12
13
13
WWW: http://dev.publicshout.org/qmrtg/
14
WWW: http://dev.publicshout.org/qmrtg/
(-)qmrtg/pkg-message (-19 / +16 lines)
Lines 1-22 Link Here
1
================================================================
1
==============================================================================
2
QMRTG has been installed.
3
4
1) A "qmrtg/" directory has been added to ${PREFIX}/www/data
5
If you don't care publishing qmrtg's reports, just run a polite
6
$ rm -rf ${WWWROOTDIR}/qmrtg
7
Also remind to remove it if you definitively uninstall qmrtg.
8
2
9
2) to enable qmrtg monitoring:
3
QMRTG has been installed.
10
a) have a look at the ${PREFIX}/www/data/cfg/mrtg.cfg" file.
4
Generation 2 is no longer compatible with older releases (< 2.0) !!!
11
you must at least set the 'WorkDir:' variable and qmail log paths
12
(search for '/var/log/supervise/qmail' and adapt to your system)
13
b) configure qmrtg.conf. Defaults are fine generally. At least copy
14
${PREFIX}/etc/qmrtg.conf.sample to "qmrtg.conf".
15
c) make mrtg run automatically. Using cron, put that in "/etc/crontab": 
16
5
17
*/5 * * * *   root /usr/local/bin/mrtg \
6
There's still some steps you may need to do manually:
18
         /usr/local/www/data/qmrtg/cfg/mrtg.cfg 1>/dev/null 2>&1
7
1) QMRTG SETUP. If you're coming from older versions, re-adjust the
8
configuration file (start from the .dist one)
9
2) WWW SETUP. HTML templates are now installed as shared data
10
[ share/qmrtg ]. Copying them in some http-reachable dir is your
11
job by now. This is cleaner and less intrusive.
12
3) MRTG SETUP. Possibly adjust the mrtg.cfg example provided in examples.
13
You may need to set the path of qmail' queue if non-standard.
14
4) RUN. The file RUNNING.txt in the shared doc dir tells you how
19
15
20
Note: to skip qmrtg reporting your mx' whole history at the first call,
16
You can sign a usersbook at http://dev.publicshout.org/qmrtg/usersbook/ .
21
run the following before point "c)"
17
You can get support and announcements by subscribing to
22
$ qmrtgsync.sh
18
	qmrtg-subscribe@lists.dev.publicshout.org
19
==============================================================================
(-)qmrtg/pkg-plist (-11 / +20 lines)
Lines 1-18 Link Here
1
bin/qmrtg-bytes
2
bin/qmrtg-concurrency
3
bin/qmrtg-deliveries
4
bin/qmrtg-errors
5
bin/qmrtg-queue
6
bin/qmrtg-smtpop
7
bin/qmrtg.sh
1
bin/qmrtg.sh
8
bin/qmrtgsync.sh
2
bin/qmrtgsync.sh
9
etc/qmrtg.conf.sample
3
bin/qmrtgcheckconf.sh
4
bin/qmrtg-regex
5
bin/qmrtg-queue
6
bin/qmrtg-throughput
7
bin/qmrtg-dnsbl
8
bin/qmrtg-concurrency
9
bin/qfilt
10
bin/qtaif
11
etc/qmrtg.conf.dist
12
%%EXAMPLESDIR%%/mrtg.cfg
13
@dirrm %%EXAMPLESDIR%%
14
%%DATADIR%%/html/details.html
15
%%DATADIR%%/html/help.html
16
%%DATADIR%%/html/mail.html
17
%%DATADIR%%/html/style.css
18
@dirrm %%DATADIR%%/html
19
@dirrm %%DATADIR%%
20
%%PORTDOCS%%%%DOCSDIR%%/CONFIGURE.txt
10
%%PORTDOCS%%%%DOCSDIR%%/FAQ.txt
21
%%PORTDOCS%%%%DOCSDIR%%/FAQ.txt
11
%%PORTDOCS%%%%DOCSDIR%%/LICENSE.txt
22
%%PORTDOCS%%%%DOCSDIR%%/LICENSE.txt
12
%%PORTDOCS%%%%DOCSDIR%%/README.txt
23
%%PORTDOCS%%%%DOCSDIR%%/README.txt
24
%%PORTDOCS%%%%DOCSDIR%%/RUNNING.txt
13
%%PORTDOCS%%@dirrm %%DOCSDIR%%
25
%%PORTDOCS%%@dirrm %%DOCSDIR%%
14
%%PORTDOCS%%%%EXAMPLESDIR%%/mrtg.cfg
15
%%PORTDOCS%%%%EXAMPLESDIR%%/qmrtg.conf.sample
16
%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
17
@exec mkdir -p %%QMRTG_DBDIR%%
26
@exec mkdir -p %%QMRTG_DBDIR%%
18
@unexec rm -rf %%QMRTG_DBDIR%% 2>&1 >/dev/null || true
27
@unexec rm -rf %%QMRTG_DBDIR%%

Return to bug 87212