2012-07-10 23:46:42 -04:00
|
|
|
# $OpenBSD: Makefile,v 1.25 2012/07/11 03:46:42 william Exp $
|
2009-11-17 06:11:20 -05:00
|
|
|
|
|
|
|
COMMENT-main = flexible network host monitoring, client
|
|
|
|
COMMENT-server =flexible network host monitoring, server
|
|
|
|
|
2012-03-15 09:55:45 -04:00
|
|
|
V = 1.4.7
|
2010-10-23 11:52:22 -04:00
|
|
|
DISTNAME = munin-$V
|
2010-07-12 18:07:37 -04:00
|
|
|
PKGNAME-main = munin-node-$V
|
2009-11-17 06:11:20 -05:00
|
|
|
PKGNAME-server =munin-server-$V
|
2012-07-10 23:46:42 -04:00
|
|
|
REVISION-main = 0
|
2009-11-17 06:11:20 -05:00
|
|
|
CATEGORIES = net
|
|
|
|
|
2010-10-23 11:52:22 -04:00
|
|
|
HOMEPAGE = http://munin-monitoring.org/
|
2009-11-17 06:11:20 -05:00
|
|
|
MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=munin/}
|
|
|
|
|
|
|
|
# Mostly GPLv2. VeraMono.ttf has a non-restrictive license (copyright notice
|
|
|
|
# embedded in the font or xenocara/font/bitstream-vera-ttf/COPYRIGHT.TXT).
|
|
|
|
PERMIT_PACKAGE_CDROM = Yes
|
|
|
|
PERMIT_PACKAGE_FTP = Yes
|
|
|
|
PERMIT_DISTFILES_CDROM =Yes
|
|
|
|
PERMIT_DISTFILES_FTP = Yes
|
|
|
|
|
2010-02-25 12:07:17 -05:00
|
|
|
MAINTAINER = Stuart Henderson <sthen@openbsd.org>
|
2009-11-17 06:20:47 -05:00
|
|
|
|
2010-02-25 12:07:17 -05:00
|
|
|
MULTI_PACKAGES = -main -server
|
2009-11-17 06:11:20 -05:00
|
|
|
|
2010-10-23 11:52:22 -04: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
|
|
|
|
MODRUBY_BUILDDEP = No # not supported yet, but won't need a bump when it is
|
|
|
|
|
2012-07-10 23:46:42 -04:00
|
|
|
RUN_DEPENDS-main = logtail-*|logsentry-*:sysutils/logtail \
|
|
|
|
devel/p5-Log-Log4perl \
|
2010-12-30 03:19:31 -05:00
|
|
|
devel/p5-Net-Server \
|
2010-11-19 17:31:32 -05:00
|
|
|
net/p5-Net-CIDR
|
|
|
|
RUN_DEPENDS-server += net/rrdtool,-perl \
|
|
|
|
www/p5-HTML-Template \
|
|
|
|
net/munin,-main
|
2009-11-17 06:11:20 -05: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}
|
2010-10-23 11:52:22 -04:00
|
|
|
MAKE_FLAGS += BASH=${LOCALBASE}/bin/bash
|
2009-11-17 06:11:20 -05: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 12:07:17 -05:00
|
|
|
MUNIN_PLUGINS = bgpd if_pps_ intr pf_changes pf_searches pf_states \
|
|
|
|
sensors_ vmstat
|
|
|
|
|
|
|
|
.for i in ${MUNIN_PLUGINS}
|
2010-10-23 11:52:22 -04:00
|
|
|
SUBST_LIST += ${FILESDIR}/$i ${WRKSRC}/plugins/node.d.openbsd/$i.in
|
2010-02-25 12:07:17 -05:00
|
|
|
.endfor
|
2010-10-23 11:52:22 -04:00
|
|
|
|
|
|
|
post-extract:
|
|
|
|
cp -Rp ${WRKSRC}/plugins/node.d.freebsd ${WRKSRC}/plugins/node.d.openbsd
|
|
|
|
${SUBST_CMD} -c ${SUBST_LIST}
|
|
|
|
chmod -R +x ${WRKSRC}/plugins/node.d.openbsd
|
|
|
|
rm ${WRKSRC}/plugins/node.d.openbsd/memory.in # not yet ported
|
2009-11-17 06:11:20 -05:00
|
|
|
|
2012-05-08 05:25:20 -04: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 06:11:20 -05:00
|
|
|
pre-configure:
|
2010-10-23 11:52:22 -04:00
|
|
|
cd ${WRKSRC}/node/sbin; \
|
|
|
|
${SUBST_CMD} munin-node munin-node-configure munin-run; \
|
2011-04-14 11:55:19 -04:00
|
|
|
rm munin-{node,node-configure,run}.{beforesubst,orig}; \
|
2010-02-25 12:07:17 -05: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 11:52:22 -04:00
|
|
|
-e 's,/usr/local/libexec/munin,${TRUEPREFIX}/libexec/munin,g;' \
|
|
|
|
-e 's,/usr/local,${LOCALBASE},g;' \
|
2010-02-25 12:07:17 -05:00
|
|
|
-e 's,/usr/share/munin/node/plugins-auto,${TRUEPREFIX}/libexec/munin/plugins,g;' \
|
2012-03-15 09:55:45 -04:00
|
|
|
${WRKSRC}/plugins/node.d/* ${WRKSRC}/plugins/node.d.openbsd/*
|
2009-11-17 06:11:20 -05:00
|
|
|
|
|
|
|
post-install:
|
2012-03-15 09:55:45 -04:00
|
|
|
${MODRUBY_RUBY_ADJ} ${PREFIX}/libexec/munin/plugins/tomcat_
|
2009-11-17 06:11:20 -05:00
|
|
|
${INSTALL_DATA} ${FILESDIR}/openbsd-packages \
|
|
|
|
${PREFIX}/share/examples/munin/plugin-conf.d
|
2010-10-23 11:52:22 -04:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/munin/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/UPGRADING ${PREFIX}/share/doc/munin/
|
2009-11-17 06:11:20 -05:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|