2019-04-01 13:52:45 +00:00
|
|
|
# $OpenBSD: Makefile,v 1.86 2019/04/01 13:52:45 sthen Exp $
|
import ports/net/librenms, ok benoit@ -- still a bit of a WIP, but usable enough.
LibreNMS is an autodiscovering PHP/MySQL/SNMP based network monitoring
which includes support for a wide range of network hardware and
operating systems including Cisco, Linux, FreeBSD, Juniper, Brocade,
Foundry, HP and many more. LibreNMS is a community-based fork of
Observium.
LibreNMS is not intended to replace a Nagios-type up/down monitoring
system, but rather to complement it with an easy to manage, intuitive
representation of historical and current performance statistics,
configuration visualisation and syslog capture.
2015-04-23 16:44:34 +00:00
|
|
|
|
|
|
|
COMMENT = auto-discovering network management/monitoring system
|
|
|
|
|
2016-12-14 21:37:03 +00:00
|
|
|
GH_ACCOUNT = librenms
|
|
|
|
GH_PROJECT = librenms
|
2019-04-01 13:52:45 +00:00
|
|
|
GH_TAGNAME = 1.50
|
2018-02-27 15:17:39 +00:00
|
|
|
DISTFILES = librenms-${GH_TAGNAME}.tar.gz librenms-vendor-${GH_TAGNAME}.tar.xz:0
|
2016-12-14 21:37:03 +00:00
|
|
|
EPOCH = 0
|
import ports/net/librenms, ok benoit@ -- still a bit of a WIP, but usable enough.
LibreNMS is an autodiscovering PHP/MySQL/SNMP based network monitoring
which includes support for a wide range of network hardware and
operating systems including Cisco, Linux, FreeBSD, Juniper, Brocade,
Foundry, HP and many more. LibreNMS is a community-based fork of
Observium.
LibreNMS is not intended to replace a Nagios-type up/down monitoring
system, but rather to complement it with an easy to manage, intuitive
representation of historical and current performance statistics,
configuration visualisation and syslog capture.
2015-04-23 16:44:34 +00:00
|
|
|
|
|
|
|
CATEGORIES = net www
|
|
|
|
|
2017-07-30 17:05:54 +00:00
|
|
|
HOMEPAGE = https://www.librenms.org/
|
import ports/net/librenms, ok benoit@ -- still a bit of a WIP, but usable enough.
LibreNMS is an autodiscovering PHP/MySQL/SNMP based network monitoring
which includes support for a wide range of network hardware and
operating systems including Cisco, Linux, FreeBSD, Juniper, Brocade,
Foundry, HP and many more. LibreNMS is a community-based fork of
Observium.
LibreNMS is not intended to replace a Nagios-type up/down monitoring
system, but rather to complement it with an easy to manage, intuitive
representation of historical and current performance statistics,
configuration visualisation and syslog capture.
2015-04-23 16:44:34 +00:00
|
|
|
|
|
|
|
MAINTAINER = Stuart Henderson <sthen@openbsd.org>
|
|
|
|
|
|
|
|
# GPLv3+
|
|
|
|
PERMIT_PACKAGE_CDROM = Yes
|
|
|
|
|
2018-02-27 15:17:39 +00:00
|
|
|
MASTER_SITES0 = https://spacehopper.org/mirrors/
|
|
|
|
|
import ports/net/librenms, ok benoit@ -- still a bit of a WIP, but usable enough.
LibreNMS is an autodiscovering PHP/MySQL/SNMP based network monitoring
which includes support for a wide range of network hardware and
operating systems including Cisco, Linux, FreeBSD, Juniper, Brocade,
Foundry, HP and many more. LibreNMS is a community-based fork of
Observium.
LibreNMS is not intended to replace a Nagios-type up/down monitoring
system, but rather to complement it with an easy to manage, intuitive
representation of historical and current performance statistics,
configuration visualisation and syslog capture.
2015-04-23 16:44:34 +00:00
|
|
|
MODULES = lang/php \
|
|
|
|
lang/python
|
|
|
|
MODPY_BUILDDEP = No
|
|
|
|
|
2018-10-17 13:40:04 +00:00
|
|
|
# librenms-service.py (currently in beta) will want py3 and the following:
|
|
|
|
# databases/py-redis${MODPY_FLAVOR} # optional
|
|
|
|
# sysutils/py-dotenv${MODPY_FLAVOR} # not ported yet
|
|
|
|
# but (at least as of 1.43), the *-wrapper.py scripts don't support py3 yet
|
|
|
|
|
|
|
|
RUN_DEPENDS = databases/py-mysql${MODPY_FLAVOR} \
|
import ports/net/librenms, ok benoit@ -- still a bit of a WIP, but usable enough.
LibreNMS is an autodiscovering PHP/MySQL/SNMP based network monitoring
which includes support for a wide range of network hardware and
operating systems including Cisco, Linux, FreeBSD, Juniper, Brocade,
Foundry, HP and many more. LibreNMS is a community-based fork of
Observium.
LibreNMS is not intended to replace a Nagios-type up/down monitoring
system, but rather to complement it with an easy to manage, intuitive
representation of historical and current performance statistics,
configuration visualisation and syslog capture.
2015-04-23 16:44:34 +00:00
|
|
|
lang/php/${MODPHP_VERSION},-curl \
|
|
|
|
lang/php/${MODPHP_VERSION},-gd \
|
|
|
|
lang/php/${MODPHP_VERSION},-mysqli \
|
2018-06-12 19:08:40 +00:00
|
|
|
lang/php/${MODPHP_VERSION},-pdo_mysql \
|
import ports/net/librenms, ok benoit@ -- still a bit of a WIP, but usable enough.
LibreNMS is an autodiscovering PHP/MySQL/SNMP based network monitoring
which includes support for a wide range of network hardware and
operating systems including Cisco, Linux, FreeBSD, Juniper, Brocade,
Foundry, HP and many more. LibreNMS is a community-based fork of
Observium.
LibreNMS is not intended to replace a Nagios-type up/down monitoring
system, but rather to complement it with an easy to manage, intuitive
representation of historical and current performance statistics,
configuration visualisation and syslog capture.
2015-04-23 16:44:34 +00:00
|
|
|
lang/php/${MODPHP_VERSION},-snmp \
|
|
|
|
net/fping \
|
|
|
|
net/mtr \
|
|
|
|
net/net-snmp \
|
|
|
|
net/nmap \
|
|
|
|
net/rrdtool \
|
2017-01-31 22:43:29 +00:00
|
|
|
shells/bash \
|
import ports/net/librenms, ok benoit@ -- still a bit of a WIP, but usable enough.
LibreNMS is an autodiscovering PHP/MySQL/SNMP based network monitoring
which includes support for a wide range of network hardware and
operating systems including Cisco, Linux, FreeBSD, Juniper, Brocade,
Foundry, HP and many more. LibreNMS is a community-based fork of
Observium.
LibreNMS is not intended to replace a Nagios-type up/down monitoring
system, but rather to complement it with an easy to manage, intuitive
representation of historical and current performance statistics,
configuration visualisation and syslog capture.
2015-04-23 16:44:34 +00:00
|
|
|
sysutils/ipmitool
|
|
|
|
|
|
|
|
NO_BUILD = Yes
|
|
|
|
NO_TEST = Yes
|
|
|
|
|
|
|
|
PKG_ARCH = *
|
|
|
|
|
|
|
|
PREFIX = /var/www
|
|
|
|
INSTDIR = ${PREFIX}/librenms
|
2016-04-24 23:36:07 +00:00
|
|
|
SUBST_VARS = INSTDIR MODPHP_BIN
|
2019-02-08 10:18:49 +00:00
|
|
|
UPDATE_PLIST_ARGS += -i MODPHP_VERSION
|
import ports/net/librenms, ok benoit@ -- still a bit of a WIP, but usable enough.
LibreNMS is an autodiscovering PHP/MySQL/SNMP based network monitoring
which includes support for a wide range of network hardware and
operating systems including Cisco, Linux, FreeBSD, Juniper, Brocade,
Foundry, HP and many more. LibreNMS is a community-based fork of
Observium.
LibreNMS is not intended to replace a Nagios-type up/down monitoring
system, but rather to complement it with an easy to manage, intuitive
representation of historical and current performance statistics,
configuration visualisation and syslog capture.
2015-04-23 16:44:34 +00:00
|
|
|
|
2017-01-31 22:43:29 +00:00
|
|
|
R = s,^\#!( )?(/usr/bin/env |/bin/)bash,\#!${LOCALBASE}/bin/bash,;
|
2016-05-06 19:31:08 +00:00
|
|
|
R += s,^\#!( )?/usr/bin/(env )?python.*,\#!${MODPY_BIN},;
|
2017-12-13 15:30:43 +00:00
|
|
|
R += s,/usr/bin/(env )?php,${MODPHP_BIN},g;
|
import ports/net/librenms, ok benoit@ -- still a bit of a WIP, but usable enough.
LibreNMS is an autodiscovering PHP/MySQL/SNMP based network monitoring
which includes support for a wide range of network hardware and
operating systems including Cisco, Linux, FreeBSD, Juniper, Brocade,
Foundry, HP and many more. LibreNMS is a community-based fork of
Observium.
LibreNMS is not intended to replace a Nagios-type up/down monitoring
system, but rather to complement it with an easy to manage, intuitive
representation of historical and current performance statistics,
configuration visualisation and syslog capture.
2015-04-23 16:44:34 +00:00
|
|
|
R += s,/opt/librenms,/var/www/librenms,g;
|
|
|
|
R += s,/var/www/librenms,${TRUEPREFIX}/librenms,g;
|
|
|
|
R += s,/usr/local,${LOCALBASE},g
|
|
|
|
|
|
|
|
post-extract:
|
2018-02-27 15:17:39 +00:00
|
|
|
mv ${WRKDIR}/vendor ${WRKSRC}/
|
2018-02-12 23:27:18 +00:00
|
|
|
perl -pi \
|
|
|
|
-e "s,'/usr/bin/snmp,'/usr/local/bin/snmp,;" \
|
|
|
|
-e "s,'/bin/ping,'/sbin/ping,;" \
|
|
|
|
-e "s,'/usr/bin/(mtr|nmap|ipmitool|virsh|dot|sfdp)','/usr/local/bin/\1',;" \
|
|
|
|
-e "s,'/usr/lib/nagios/plugins,'/usr/local/libexec/nagios/plugins,;" \
|
|
|
|
${WRKSRC}/includes/defaults.inc.php
|
import ports/net/librenms, ok benoit@ -- still a bit of a WIP, but usable enough.
LibreNMS is an autodiscovering PHP/MySQL/SNMP based network monitoring
which includes support for a wide range of network hardware and
operating systems including Cisco, Linux, FreeBSD, Juniper, Brocade,
Foundry, HP and many more. LibreNMS is a community-based fork of
Observium.
LibreNMS is not intended to replace a Nagios-type up/down monitoring
system, but rather to complement it with an easy to manage, intuitive
representation of historical and current performance statistics,
configuration visualisation and syslog capture.
2015-04-23 16:44:34 +00:00
|
|
|
find ${WRKSRC} -type f -print0 | xargs -r0 perl -pi -e '$R'
|
2018-06-28 18:42:56 +00:00
|
|
|
sed -i \
|
2018-07-01 21:49:17 +00:00
|
|
|
-e 's, librenms *, _librenms ,' \
|
|
|
|
-e 's,/var/www/librenms/cronic,-n,' \
|
2018-06-28 18:42:56 +00:00
|
|
|
${WRKSRC}/librenms.nonroot.cron
|
import ports/net/librenms, ok benoit@ -- still a bit of a WIP, but usable enough.
LibreNMS is an autodiscovering PHP/MySQL/SNMP based network monitoring
which includes support for a wide range of network hardware and
operating systems including Cisco, Linux, FreeBSD, Juniper, Brocade,
Foundry, HP and many more. LibreNMS is a community-based fork of
Observium.
LibreNMS is not intended to replace a Nagios-type up/down monitoring
system, but rather to complement it with an easy to manage, intuitive
representation of historical and current performance statistics,
configuration visualisation and syslog capture.
2015-04-23 16:44:34 +00:00
|
|
|
|
2018-05-31 20:40:41 +00:00
|
|
|
do-configure:
|
2018-09-26 22:51:28 +00:00
|
|
|
${SUBST_CMD} ${WRKSRC}/.env.example ${WRKSRC}/poller-service.py
|
2018-05-31 20:40:41 +00:00
|
|
|
|
import ports/net/librenms, ok benoit@ -- still a bit of a WIP, but usable enough.
LibreNMS is an autodiscovering PHP/MySQL/SNMP based network monitoring
which includes support for a wide range of network hardware and
operating systems including Cisco, Linux, FreeBSD, Juniper, Brocade,
Foundry, HP and many more. LibreNMS is a community-based fork of
Observium.
LibreNMS is not intended to replace a Nagios-type up/down monitoring
system, but rather to complement it with an easy to manage, intuitive
representation of historical and current performance statistics,
configuration visualisation and syslog capture.
2015-04-23 16:44:34 +00:00
|
|
|
do-install:
|
|
|
|
${INSTALL_DATA_DIR} ${INSTDIR}
|
|
|
|
cd ${WRKSRC}; pax -rw . ${INSTDIR}
|
2018-05-31 20:40:41 +00:00
|
|
|
find ${INSTDIR} -name '*.orig' -delete
|
import ports/net/librenms, ok benoit@ -- still a bit of a WIP, but usable enough.
LibreNMS is an autodiscovering PHP/MySQL/SNMP based network monitoring
which includes support for a wide range of network hardware and
operating systems including Cisco, Linux, FreeBSD, Juniper, Brocade,
Foundry, HP and many more. LibreNMS is a community-based fork of
Observium.
LibreNMS is not intended to replace a Nagios-type up/down monitoring
system, but rather to complement it with an easy to manage, intuitive
representation of historical and current performance statistics,
configuration visualisation and syslog capture.
2015-04-23 16:44:34 +00:00
|
|
|
mkdir -p ${INSTDIR}/{rrd,logs}
|
2017-11-27 17:41:36 +00:00
|
|
|
cd ${INSTDIR}; \
|
2018-02-14 14:04:34 +00:00
|
|
|
sed -i 's,%PHP%,${MODPHP_BIN},' daily.sh *-wrapper.py *-service.py validate.php LibreNMS/Validations/Php.php html/includes/output/capture.inc.php scripts/composer_wrapper.php; \
|
2017-11-27 17:41:36 +00:00
|
|
|
sed -i 's,%LNMS_VERSION%,${DISTNAME:S/librenms-//},' includes/common.php
|
2015-10-12 15:39:06 +00:00
|
|
|
cp /usr/share/snmp/mibs/OPENBSD-* ${INSTDIR}/mibs/
|
2018-10-17 20:24:38 +00:00
|
|
|
rm -rf ${INSTDIR}/tests ${INSTDIR}/vendor/*/*/.git
|
|
|
|
# XXX workaround pkg_add limitation ("exotest" in regress/usr.sbin/pkg_add)
|
|
|
|
${INSTALL_DATA_DIR} ${INSTDIR}/lib/jQuery-Mapael/js/
|
|
|
|
mv ${INSTDIR}/html/js/mapael-maps ${INSTDIR}/lib/
|
|
|
|
mv ${INSTDIR}/html/js/maps ${INSTDIR}/lib/jQuery-Mapael/js/
|
|
|
|
ln -s ../../lib/mapael-maps/ ${INSTDIR}/html/js/mapael-maps
|
|
|
|
ln -s ../../lib/jQuery-Mapael/js/maps/ ${INSTDIR}/html/js/maps
|
2018-02-27 15:17:39 +00:00
|
|
|
|
|
|
|
# maintainer convenience target
|
|
|
|
dist: /usr/ports/distfiles/librenms-${GH_TAGNAME}.tar.gz
|
|
|
|
t=`mktemp -d /tmp/librenms.XXXXXXXXXX`; \
|
|
|
|
f=$$t/librenms-vendor-${GH_TAGNAME}.tar.xz; \
|
|
|
|
cd $$t; \
|
|
|
|
tar xzf ${FULLDISTDIR}/${DISTNAME}.tar.gz; \
|
|
|
|
cd librenms-${GH_TAGNAME}; \
|
2018-08-21 15:36:35 +00:00
|
|
|
sed -i 's,whereis -b ,whereis ,' LibreNMS/Config.php; \
|
2018-10-17 20:24:38 +00:00
|
|
|
sed -i 's,php artisan ,${MODPHP_BIN} artisan ,' composer.json; \
|
2018-05-31 20:40:41 +00:00
|
|
|
[ -r .env ] || cp .env.example .env; \
|
2018-02-27 15:17:39 +00:00
|
|
|
composer install --no-dev; \
|
|
|
|
tar cf - vendor | xz -T 0 > $$f; \
|
|
|
|
scp $$f naiad:mirrors/; \
|
|
|
|
cd -; rm -rf $$t
|
import ports/net/librenms, ok benoit@ -- still a bit of a WIP, but usable enough.
LibreNMS is an autodiscovering PHP/MySQL/SNMP based network monitoring
which includes support for a wide range of network hardware and
operating systems including Cisco, Linux, FreeBSD, Juniper, Brocade,
Foundry, HP and many more. LibreNMS is a community-based fork of
Observium.
LibreNMS is not intended to replace a Nagios-type up/down monitoring
system, but rather to complement it with an easy to manage, intuitive
representation of historical and current performance statistics,
configuration visualisation and syslog capture.
2015-04-23 16:44:34 +00:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|