2019-07-12 20:48:23 +00:00
|
|
|
# $OpenBSD: Makefile,v 1.84 2019/07/12 20:48:32 sthen Exp $
|
2014-10-22 08:01:52 +00:00
|
|
|
|
|
|
|
PORTROACH = limitw:1,even
|
2009-11-17 11:11:20 +00:00
|
|
|
|
|
|
|
COMMENT-main = flexible network host monitoring, client
|
|
|
|
COMMENT-server =flexible network host monitoring, server
|
|
|
|
|
2019-05-10 12:45:30 +00:00
|
|
|
V = 2.0.49
|
2010-10-23 15:52:22 +00:00
|
|
|
DISTNAME = munin-$V
|
2010-07-12 22:07:37 +00:00
|
|
|
PKGNAME-main = munin-node-$V
|
2009-11-17 11:11:20 +00:00
|
|
|
PKGNAME-server =munin-server-$V
|
|
|
|
CATEGORIES = net
|
|
|
|
|
2010-10-23 15:52:22 +00:00
|
|
|
HOMEPAGE = http://munin-monitoring.org/
|
2016-11-03 07:45:29 +00:00
|
|
|
MASTER_SITES = http://downloads.munin-monitoring.org/munin/stable/$V/
|
2009-11-17 11:11:20 +00:00
|
|
|
|
2013-01-08 11:14:02 +00:00
|
|
|
# Mostly GPLv2.
|
|
|
|
# DejaVuSans.ttf and DejaVuSansMono.ttf has a non-restrictive license.
|
2019-07-12 20:48:23 +00:00
|
|
|
PERMIT_PACKAGE = Yes
|
2009-11-17 11:11:20 +00:00
|
|
|
|
2013-01-08 11:14:02 +00:00
|
|
|
MAINTAINER = Kirill Bychkov <kirby@openbsd.org>
|
2009-11-17 11:20:47 +00:00
|
|
|
|
2010-02-25 17:07:17 +00:00
|
|
|
MULTI_PACKAGES = -main -server
|
2009-11-17 11:11:20 +00:00
|
|
|
|
2010-10-23 15:52:22 +00:00
|
|
|
# Used for file locations and MODPY_BIN, RUBY, MODRUBY_ADJ_FILES.
|
|
|
|
# Only very minor optional munin plugins use these languages so they
|
|
|
|
# aren't forced as dependencies (same for bash).
|
|
|
|
MODULES = lang/python lang/ruby
|
|
|
|
# No need for MODx_RUNDEP as we already override RUN_DEPENDS-{main,server}
|
|
|
|
MODPY_BUILDDEP = No
|
2012-09-03 18:00:32 +00:00
|
|
|
MODRUBY_BUILDDEP = No
|
2010-10-23 15:52:22 +00:00
|
|
|
|
2016-03-12 12:13:35 +00:00
|
|
|
# called from the build script; doesn't use standard CONFIGURE_STYLE=modbuild
|
|
|
|
BUILD_DEPENDS += devel/p5-Module-Build
|
|
|
|
|
2012-07-11 03:46:42 +00:00
|
|
|
RUN_DEPENDS-main = logtail-*|logsentry-*:sysutils/logtail \
|
2018-06-14 14:17:30 +00:00
|
|
|
devel/p5-List-MoreUtils \
|
2012-07-11 03:46:42 +00:00
|
|
|
devel/p5-Log-Log4perl \
|
2010-12-30 08:19:31 +00:00
|
|
|
devel/p5-Net-Server \
|
2018-11-10 03:28:46 +00:00
|
|
|
net/p5-IO-Socket-INET6 \
|
2010-11-19 22:31:32 +00:00
|
|
|
net/p5-Net-CIDR
|
2012-10-12 09:46:46 +00:00
|
|
|
RUN_DEPENDS-server += converters/p5-DateManip \
|
|
|
|
devel/p5-File-Copy-Recursive \
|
|
|
|
net/p5-IO-Socket-INET6 \
|
2013-11-05 17:49:33 +00:00
|
|
|
net/rrdtool \
|
2012-10-12 09:46:46 +00:00
|
|
|
www/fcgi \
|
2010-11-19 22:31:32 +00:00
|
|
|
www/p5-HTML-Template \
|
2012-10-12 09:46:46 +00:00
|
|
|
www/p5-URI \
|
2010-11-19 22:31:32 +00:00
|
|
|
net/munin,-main
|
2009-11-17 11:11:20 +00:00
|
|
|
|
|
|
|
USE_GMAKE = Yes
|
|
|
|
ALL_TARGET = default build-doc build-man
|
|
|
|
WRKDIST = ${WRKDIR}/${DISTNAME:S/_/-/}
|
|
|
|
PKG_ARCH = *
|
|
|
|
|
|
|
|
CONFIGURE_STYLE = none # hack, otherwise python.port.mk overrides target
|
|
|
|
|
|
|
|
MAKE_ENV += CONFDIR=${SYSCONFDIR}/munin \
|
|
|
|
OSTYPE=openbsd \
|
|
|
|
PREFIX=${PREFIX} \
|
|
|
|
PYTHON=${MODPY_BIN}
|
2014-03-25 08:42:25 +00:00
|
|
|
MAKE_FLAGS += BASH=${LOCALBASE}/bin/bash \
|
|
|
|
PLUGINUSER=_munin-plugin
|
2009-11-17 11:11:20 +00:00
|
|
|
|
|
|
|
FAKE_FLAGS += HTMLDIR=${WRKINST}/${PREFIX}/share/examples/munin/www \
|
|
|
|
CGIDIR=${WRKINST}/${PREFIX}/share/examples/munin/www \
|
|
|
|
DOCDIR=${WRKINST}/${PREFIX}/share/doc/munin \
|
|
|
|
CONFDIR=${WRKINST}/${PREFIX}/share/examples/munin
|
|
|
|
|
2010-02-25 17:07:17 +00:00
|
|
|
MUNIN_PLUGINS = bgpd if_pps_ intr pf_changes pf_searches pf_states \
|
|
|
|
sensors_ vmstat
|
|
|
|
|
|
|
|
.for i in ${MUNIN_PLUGINS}
|
2010-10-23 15:52:22 +00:00
|
|
|
SUBST_LIST += ${FILESDIR}/$i ${WRKSRC}/plugins/node.d.openbsd/$i.in
|
2010-02-25 17:07:17 +00:00
|
|
|
.endfor
|
2010-10-23 15:52:22 +00:00
|
|
|
|
|
|
|
post-extract:
|
|
|
|
cp -Rp ${WRKSRC}/plugins/node.d.freebsd ${WRKSRC}/plugins/node.d.openbsd
|
2013-01-08 11:14:02 +00:00
|
|
|
cp -p ${WRKSRC}/plugins/node.d.netbsd/uptime.in ${WRKSRC}/plugins/node.d.openbsd
|
2013-03-22 15:00:29 +00:00
|
|
|
cp -p ${WRKSRC}/plugins/node.d.netbsd/memory.in ${WRKSRC}/plugins/node.d.openbsd
|
2015-11-02 11:56:54 +00:00
|
|
|
${SUBST_CMD} -m 444 -c ${SUBST_LIST}
|
2010-10-23 15:52:22 +00:00
|
|
|
chmod -R +x ${WRKSRC}/plugins/node.d.openbsd
|
2013-03-22 15:00:29 +00:00
|
|
|
rm ${WRKSRC}/plugins/node.d.openbsd/iostat.in # not yet ported
|
2013-06-03 19:45:31 +00:00
|
|
|
rm ${WRKSRC}/plugins/node.d.openbsd/swap.in # we have no in/out fields
|
2009-11-17 11:11:20 +00:00
|
|
|
|
2012-05-08 09:25:20 +00:00
|
|
|
# Fixup hardcoded paths in plugins to use TRUEPREFIX/LOCALBASE as appropriate,
|
|
|
|
# there are far too many to handle this via patches/SUBST_CMD, and this method
|
|
|
|
# plays nicer with update-patches.
|
2009-11-17 11:11:20 +00:00
|
|
|
pre-configure:
|
2010-10-23 15:52:22 +00:00
|
|
|
cd ${WRKSRC}/node/sbin; \
|
|
|
|
${SUBST_CMD} munin-node munin-node-configure munin-run; \
|
2011-04-14 15:55:19 +00:00
|
|
|
rm munin-{node,node-configure,run}.{beforesubst,orig}; \
|
2010-02-25 17:07:17 +00:00
|
|
|
perl -pi -e 's,/etc/munin/plugins,${SYSCONFDIR}/munin/plugins,g;' \
|
|
|
|
-e 's,/etc/munin/node.d,${SYSCONFDIR}/munin/plugins,g;' \
|
2010-10-23 15:52:22 +00:00
|
|
|
-e 's,/usr/local/libexec/munin,${TRUEPREFIX}/libexec/munin,g;' \
|
|
|
|
-e 's,/usr/local,${LOCALBASE},g;' \
|
2010-02-25 17:07:17 +00:00
|
|
|
-e 's,/usr/share/munin/node/plugins-auto,${TRUEPREFIX}/libexec/munin/plugins,g;' \
|
2012-03-15 13:55:45 +00:00
|
|
|
${WRKSRC}/plugins/node.d/* ${WRKSRC}/plugins/node.d.openbsd/*
|
2009-11-17 11:11:20 +00:00
|
|
|
|
|
|
|
post-install:
|
2012-03-15 13:55:45 +00:00
|
|
|
${MODRUBY_RUBY_ADJ} ${PREFIX}/libexec/munin/plugins/tomcat_
|
2009-11-17 11:11:20 +00:00
|
|
|
${INSTALL_DATA} ${FILESDIR}/openbsd-packages \
|
|
|
|
${PREFIX}/share/examples/munin/plugin-conf.d
|
2010-10-23 15:52:22 +00:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/munin/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/UPGRADING ${PREFIX}/share/doc/munin/
|
2012-10-12 09:46:46 +00:00
|
|
|
@touch ${PREFIX}/share/examples/munin/munin-cgi-graph.log
|
|
|
|
@touch ${PREFIX}/share/examples/munin/munin-cgi-html.log
|
|
|
|
@rm ${PREFIX}/man/man8/munin-graph.8 # no data in it
|
2009-11-17 11:11:20 +00:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|