summaryrefslogtreecommitdiff
path: root/net/mrtg/Makefile
blob: 7fe4f38d196b1ec1eb6ac04e7f5700230e2ba4c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# $NetBSD: Makefile,v 1.22 2001/02/17 18:19:09 wiz Exp $
# FreeBSD Id: Makefile,v 1.7 1997/12/16 19:42:17 vanilla Exp
#

DISTNAME=	mrtg-2.9.2
CATEGORIES=	net
MASTER_SITES=	http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/pub/ \
		http://gd.tuwien.ac.at/infosys/network/tools/mrtg/pub/ \
		ftp://mrtg.hdl.com/ \
		ftp://ftp.sunet.se/pub/network/monitoring/mrtg/ \
		ftp://ftp.ou.edu/mirrors/mrtg/ \
		ftp://eesa.webstar.co.uk/pub/mrtg/ \
		ftp://ftp.chg.ru/pub/networking/management/mrtg/ \
		ftp://ftp.onet.pl/pub/unix/network/mrtg/pub/

MAINTAINER=	bouyer@netbsd.org
HOMEPAGE=	http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html
COMMENT=	The Multi-Router Traffic Grapher

DEPENDS=	gd>=1.8.1:../../graphics/gd

USE_PERL5=	# defined
USE_X11=	# defined
GNU_CONFIGURE=	# defined
CONFIGURE_ARGS= --with-gd-inc=${LOCALBASE}/include \
		--with-gd-lib=${LOCALBASE}/lib

.include "../../mk/bsd.prefs.mk"

.if ${OPSYS} == "SunOS"
CONFIGURE_ARGS+=	--with-z-lib=${LOCALBASE}/lib
CONFIGURE_ARGS+=	--with-z-inc=${LOCALBASE}/include
CONFIGURE_ARGS+=	--with-png-lib=${LOCALBASE}/lib
CONFIGURE_ARGS+=	--with-png-inc=${LOCALBASE}/include
.endif

post-build:
	${SED} s#@PREFIX@#${PREFIX}#g <${FILESDIR}/mrtg.conf.example \
	    >${WRKDIR}/mrtg.conf.example
	${SED} s#@PREFIX@#${PREFIX}#g <${FILESDIR}/netstat2mrtg \
	    >${WRKDIR}/netstat2mrtg
	${SED} s#@PREFIX@#${PREFIX}#g <${FILESDIR}/sys2mrtg \
	    >${WRKDIR}/sys2mrtg

do-install:
	${INSTALL_DATA_DIR} ${PREFIX}/etc/mrtg
	${INSTALL_DATA_DIR} ${PREFIX}/share/mrtg
	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mrtg
	for file in ${WRKSRC}/doc/*; do \
		${INSTALL_DATA} $$file ${PREFIX}/share/doc/mrtg/; \
	done
	for file in ANNOUNCE CHANGES COPYING COPYRIGHT README; do \
		${INSTALL_DATA} ${WRKSRC}/$$file ${PREFIX}/share/doc/mrtg/; \
	done
	for file in ${WRKSRC}/images/*.png; do \
		${INSTALL_DATA} $$file ${PREFIX}/share/mrtg/; \
	done
	${INSTALL_DATA} ${WRKDIR}/mrtg.conf.example ${PREFIX}/etc/mrtg
	for file in netstat2mrtg sys2mrtg; do \
		${INSTALL_SCRIPT} ${WRKDIR}/$$file ${PREFIX}/libexec/; \
	done
	${INSTALL_DATA_DIR} ${PERL5_SITELIB}
	${INSTALL_SCRIPT} ${WRKSRC}/lib/mrtg2/BER.pm \
	    ${WRKSRC}/lib/mrtg2/SNMP_Session.pm \
	    ${WRKSRC}/lib/mrtg2/SNMP_util.pm \
	    ${WRKSRC}/lib/mrtg2/MRTG_lib.pm \
	    ${WRKSRC}/lib/mrtg2/locales_mrtg.pm \
		${PERL5_SITELIB}
	${INSTALL_PROGRAM} ${WRKSRC}/bin/rateup ${PREFIX}/libexec/
	${INSTALL_SCRIPT} ${WRKSRC}/bin/mrtg ${PREFIX}/bin/
	for file in cfgmaker indexmaker; do \
		${INSTALL_SCRIPT} ${WRKSRC}/bin/$$file \
			${PREFIX}/bin/mrtg$$file; \
	done

.include "../../mk/bsd.pkg.mk"