1997-04-18 14:08:17 +02:00
|
|
|
# New ports collection makefile for: MRTG
|
|
|
|
# Date created: April 18th 1997
|
|
|
|
# Whom: James FitzGibbon <jfitz@FreeBSD.org>
|
|
|
|
#
|
1999-08-30 16:24:37 +02:00
|
|
|
# $FreeBSD$
|
1997-04-18 14:08:17 +02:00
|
|
|
#
|
|
|
|
|
2000-04-09 20:14:07 +02:00
|
|
|
PORTNAME= mrtg
|
2007-05-30 11:26:18 +02:00
|
|
|
PORTVERSION= 2.15.2
|
2002-11-21 08:33:08 +01:00
|
|
|
PORTEPOCH= 1
|
2004-02-23 05:42:13 +01:00
|
|
|
CATEGORIES= net-mgmt ipv6
|
2006-10-31 18:56:04 +01:00
|
|
|
MASTER_SITES= http://oss.oetiker.ch/mrtg/pub/ \
|
2006-12-31 09:31:28 +01:00
|
|
|
ftp://ftp.idilis.ro/mirrors/mrtg/ \
|
2003-10-13 07:23:01 +02:00
|
|
|
ftp://ftp.nstu.ru/pub/sources/nettools/monitoring/ \
|
2006-12-31 09:31:28 +01:00
|
|
|
ftp://ftp.chg.ru/pub/networking/monitoring/mrtg/
|
1997-04-18 14:08:17 +02:00
|
|
|
|
2000-11-13 13:45:40 +01:00
|
|
|
MAINTAINER= demon@FreeBSD.org
|
2003-02-22 10:13:13 +01:00
|
|
|
COMMENT= The multi-router traffic grapher
|
1997-04-18 14:08:17 +02:00
|
|
|
|
2005-09-05 13:11:48 +02:00
|
|
|
LIB_DEPENDS= gd.4:${PORTSDIR}/graphics/gd
|
2004-02-23 05:42:13 +01:00
|
|
|
RUN_DEPENDS= ${SITE_PERL}/SNMP_Session.pm:${PORTSDIR}/net-mgmt/p5-SNMP_Session \
|
2005-09-05 13:11:48 +02:00
|
|
|
${SITE_PERL}/Pod/Usage.pm:${PORTSDIR}/textproc/p5-Pod-Parser
|
2003-06-07 21:02:05 +02:00
|
|
|
|
2002-08-15 08:34:22 +02:00
|
|
|
CONFIGURE_ARGS= --with-gd-lib=${LOCALBASE}/lib \
|
2003-08-18 18:15:10 +02:00
|
|
|
--with-gd-inc=${LOCALBASE}/include
|
1997-04-18 14:08:17 +02:00
|
|
|
|
1997-07-05 05:19:18 +02:00
|
|
|
USE_PERL5= YES
|
1998-10-10 04:09:30 +02:00
|
|
|
MAKE_ENV+= PERL=${PERL}
|
1997-07-05 05:19:18 +02:00
|
|
|
|
2006-02-06 13:24:19 +01:00
|
|
|
USE_RC_SUBR= mrtg_daemon.sh
|
|
|
|
SUB_LIST+= PERL=${PERL}
|
|
|
|
|
1999-03-10 16:02:23 +01:00
|
|
|
GNU_CONFIGURE= YES
|
|
|
|
|
|
|
|
CONFIGURE_ENV= PERL=${PERL}
|
1997-04-18 14:08:17 +02:00
|
|
|
|
2004-01-19 09:57:31 +01:00
|
|
|
MAN1= cfgmaker.1 indexmaker.1 mrtg-contrib.1 mrtg-faq.1 mrtg-forum.1 \
|
|
|
|
mrtg-ipv6.1 mrtg-logfile.1 mrtg-mibhelp.1 mrtg-nt-guide.1 \
|
2005-05-16 16:49:32 +02:00
|
|
|
mrtg-nw-guide.1 mrtg-reference.1 mrtg-rrd.1 mrtg-squid.1 \
|
|
|
|
mrtg-unix-guide.1 mrtg-webserver.1 mrtg.1 mrtglib.1
|
2000-10-13 04:03:33 +02:00
|
|
|
|
2005-09-06 14:31:17 +02:00
|
|
|
OPTIONS= IPV6 "Enable IPv6 support" OFF
|
|
|
|
|
2005-09-05 13:11:48 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2005-09-06 14:31:17 +02:00
|
|
|
.if defined(WITH_IPV6)
|
2005-09-05 13:11:48 +02:00
|
|
|
RUN_DEPENDS+= ${SITE_PERL}/IO/Socket/INET6.pm:${PORTSDIR}/net/p5-IO-INET6
|
|
|
|
.endif
|
|
|
|
|
2003-06-07 21:02:05 +02:00
|
|
|
post-patch:
|
|
|
|
${RM} ${WRKSRC}/lib/mrtg2/BER.pm ${WRKSRC}/lib/mrtg2/SNMP_*.pm
|
|
|
|
|
2006-02-06 13:24:19 +01:00
|
|
|
pre-install:
|
|
|
|
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
|
|
|
|
1997-04-18 14:08:17 +02:00
|
|
|
do-install:
|
2007-05-30 11:26:18 +02:00
|
|
|
${MKDIR} -m 755 ${ETCDIR}
|
2001-07-15 10:21:18 +02:00
|
|
|
${MKDIR} -m 755 ${DATADIR}
|
1999-03-29 19:09:04 +02:00
|
|
|
.if !defined(NOPORTDOCS)
|
2001-07-15 10:21:18 +02:00
|
|
|
${MKDIR} -m 755 ${DOCSDIR}
|
2006-08-18 11:10:33 +02:00
|
|
|
for file in CHANGES COPYRIGHT MANIFEST README \
|
|
|
|
doc/*.pod doc/*.txt doc/*.png ; do \
|
2001-07-15 10:21:18 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/$$file ${DOCSDIR}; \
|
1997-04-18 14:08:17 +02:00
|
|
|
done
|
1999-03-29 19:09:04 +02:00
|
|
|
.endif
|
2007-05-30 11:26:18 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/contrib/mrtgmk/cfg/mrtg.cfg ${ETCDIR}/mrtg.cfg.sample
|
2001-07-15 10:21:18 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/images/* ${DATADIR}
|
2000-10-13 04:03:33 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/*.1 ${PREFIX}/man/man1
|
2004-01-19 09:57:31 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/lib/mrtg2/*.pm ${SITE_PERL}
|
2000-10-13 04:03:33 +02:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/bin/rateup ${PREFIX}/bin/
|
|
|
|
for file in mrtg cfgmaker indexmaker; do \
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/bin/$$file ${PREFIX}/bin/; \
|
1997-04-18 14:08:17 +02:00
|
|
|
done
|
1998-09-28 19:11:24 +02:00
|
|
|
|
|
|
|
post-install:
|
2006-02-06 13:24:19 +01:00
|
|
|
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
1998-09-28 19:11:24 +02:00
|
|
|
.if !defined(BATCH)
|
|
|
|
@${ECHO} ""
|
|
|
|
@${ECHO} "############################################################################"
|
2007-05-30 11:26:18 +02:00
|
|
|
@${ECHO} "# Please create a MRTG config file in ${ETCDIR} #"
|
1998-09-28 19:11:24 +02:00
|
|
|
@${ECHO} "# A configuration file can be automatically generated with cfgmaker #"
|
2000-10-13 04:03:33 +02:00
|
|
|
@${ECHO} "# A sample configuration file is installed as mrtg.cfg.sample #"
|
2006-02-06 13:24:19 +01:00
|
|
|
@${ECHO} "# #"
|
|
|
|
@${ECHO} "# To enable MRTG in daemon mode, put the following to your /etc/rc.conf or #"
|
|
|
|
@${ECHO} "# /etc/rc.conf.local file: #"
|
|
|
|
@${ECHO} "# mrtg_daemon_enable=\"YES\" #"
|
1998-09-28 19:11:24 +02:00
|
|
|
@${ECHO} "############################################################################"
|
|
|
|
.endif
|
1997-04-18 14:08:17 +02:00
|
|
|
|
2005-09-05 13:11:48 +02:00
|
|
|
.include <bsd.port.post.mk>
|