1 # Created by: Lupe Christoph <lupe@lupe-christoph.de>
5 PORTVERSION= ${MUNIN_VERSION}
6 CATEGORIES= sysutils perl5
7 MASTER_SITES= ${MUNIN_SITES}
10 MAINTAINER= mat@FreeBSD.org
11 COMMENT= Node-specific part of Munin
13 BUILD_DEPENDS= p5-Module-Build>=0:devel/p5-Module-Build \
14 p5-DateTime-HiRes>=0:devel/p5-DateTime-HiRes \
15 munin-common>=0:sysutils/munin-common \
16 p5-Net-Server>=0:net/p5-Net-Server \
18 RUN_DEPENDS= p5-Cache-Cache>=0:devel/p5-Cache-Cache \
19 p5-DateTime-HiRes>=0:devel/p5-DateTime-HiRes \
20 munin-common>=0:sysutils/munin-common \
21 p5-Net-Server>=0:net/p5-Net-Server \
22 p5-Net-CIDR>=0:net-mgmt/p5-Net-CIDR \
23 p5-libwww>=0:www/p5-libwww \
26 USES= gmake perl5 shebangfix cpe
27 PKGMESSAGE= ${WRKDIR}/pkg-message
29 SHEBANG_FILES= node/sbin/munin-node node/sbin/munin-sched \
30 node/sbin/munin-run node/sbin/munin-node-configure
32 .include "${.CURDIR}/../munin-common/munin.mk"
34 ALL_TARGET= build-node build-plugins build/node/_bin/munin-async build/node/_bin/munin-asyncd
35 INSTALL_TARGET= install-node-prime install-async-prime install-plugins-prime
38 OPTIONS_DEFINE= SNMP PERL JAVA
39 OPTIONS_DEFAULT= SNMP PERL
41 SNMP_DESC= Include SNMP plugins
42 PERL_DESC= Include all Perl modules (adds dependencies)
43 JAVA_DESC= Include JAVA plugins
45 SNMP_BUILD_DEPENDS= p5-Net-SNMP>=0:net-mgmt/p5-Net-SNMP
46 SNMP_RUN_DEPENDS= p5-Net-SNMP>=0:net-mgmt/p5-Net-SNMP
47 PERL_RUN_DEPENDS= p5-DBD-Pg>=0:databases/p5-DBD-Pg \
48 p5-Net-DNS>=0:dns/p5-Net-DNS \
49 p5-XML-Parser>=0:textproc/p5-XML-Parser \
50 p5-XML-LibXML>=0:textproc/p5-XML-LibXML
52 JAVA_INSTALL_TARGET= install-plugins-java
56 SUB_FILES= pkg-message plugins.conf
57 USE_RC_SUBR= munin-asyncd munin-node munin-sched
60 @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
61 ${WRKSRC}/node/sbin/munin-node \
62 ${WRKSRC}/node/sbin/munin-node-configure \
63 ${WRKSRC}/node/sbin/munin-run
65 -e 's|^\(BASH[[:space:]]*:=\).*|\1 ${bash_CMD}|' \
66 -e 's|^\(JAVARUN[[:space:]]*:=\).*|\1 ${java_CMD}|' \
67 -e 's|^\(PERL[[:space:]]*:=\).*|\1 ${perl_CMD}|' \
68 -e 's|^\(PYTHON[[:space:]]*:=\).*|\1 ${python_CMD}|' \
69 -e 's|^\(RUBY[[:space:]]*:=\).*|\1 ${ruby_CMD}|' \
70 ${WRKSRC}/Makefile.config
71 @${FIND} ${WRKSRC}/node/sbin -type f -name "*.orig" -delete
74 ${MKDIR} ${STAGEDIR}${DBDIR}/plugin-state ${STAGEDIR}${SPOOLDIR}/async
75 ${INSTALL_SCRIPT} ${.CURDIR}/plugins/* ${STAGEDIR}${DATADIR}/plugins/
76 ${INSTALL_DATA} ${WRKSRC}/build/node/munin-node.conf \
77 ${STAGEDIR}${ETCDIR}/munin-node.conf.sample
78 ${INSTALL_DATA} ${WRKDIR}/plugins.conf \
79 ${STAGEDIR}${ETCDIR}/plugin-conf.d/plugins.conf.sample
80 (cd ${WRKSRC}/node/blib/bindoc; \
81 ${INSTALL_MAN} munin-node-configure.1 munin-node.1 munin-run.1 munin-sched.1 munindoc.1 ${STAGEDIR}${MAN1PREFIX}/man/man1; \
83 (cd ${WRKSRC}/build/doc; \
84 ${INSTALL_MAN} munin-node.conf.5 ${STAGEDIR}${MAN5PREFIX}/man/man5; \
85 ${INSTALL_MAN} munin.8 ${STAGEDIR}${MAN8PREFIX}/man/man8; \
88 .include <bsd.port.mk>