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> |