2013-01-23 10:46:39 +01:00
|
|
|
# Created by: rflynn@acsalaska.net
|
2012-02-28 21:05:01 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= observium
|
2016-02-03 17:26:35 +01:00
|
|
|
PORTVERSION= 0.16.1.7533
|
2016-02-09 23:27:53 +01:00
|
|
|
PORTREVISION= 1
|
2012-02-28 21:05:01 +01:00
|
|
|
CATEGORIES= net-mgmt
|
2014-07-28 18:20:05 +02:00
|
|
|
MASTER_SITES= http://www.observium.org/
|
|
|
|
DISTNAME= ${PORTNAME}-community-latest
|
|
|
|
DIST_SUBDIR= ${PORTNAME}-${PORTVERSION}
|
2012-02-28 21:05:01 +01:00
|
|
|
|
2016-02-03 17:26:35 +01:00
|
|
|
MAINTAINER= dirkx@webweaving.org
|
2014-07-10 14:13:11 +02:00
|
|
|
COMMENT= Autodiscovering PHP/MySQL/SNMP based network monitoring
|
2012-02-28 21:05:01 +01:00
|
|
|
|
|
|
|
LICENSE= GPLv3
|
|
|
|
|
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}
|
|
|
|
|
2015-05-27 16:31:01 +02:00
|
|
|
USES= python shebangfix
|
2016-02-03 17:26:35 +01:00
|
|
|
SHEBANG_FILES= mibs/process.pl \
|
2015-06-16 20:04:29 +02:00
|
|
|
scripts/agent-local/areca-hw \
|
|
|
|
scripts/agent-local/asterisk \
|
|
|
|
scripts/agent-local/bind \
|
|
|
|
scripts/agent-local/crashplan \
|
|
|
|
scripts/agent-local/edac \
|
|
|
|
scripts/agent-local/exim-mailqueue.sh \
|
|
|
|
scripts/agent-local/hdarray \
|
|
|
|
scripts/agent-local/ipmitool-sensor \
|
2016-02-03 17:26:35 +01:00
|
|
|
scripts/agent-local/kamailio \
|
2015-06-16 20:04:29 +02:00
|
|
|
scripts/agent-local/ksm \
|
2016-02-03 17:26:35 +01:00
|
|
|
scripts/agent-local/lighttpd \
|
2015-06-16 20:04:29 +02:00
|
|
|
scripts/agent-local/lmsensors \
|
|
|
|
scripts/agent-local/postfix_mailgraph \
|
|
|
|
scripts/agent-local/postfix_qshape \
|
|
|
|
scripts/agent-local/postgresql.pl \
|
2016-02-03 17:26:35 +01:00
|
|
|
scripts/agent-local/proxmox-qemu \
|
2015-06-16 20:04:29 +02:00
|
|
|
scripts/agent-local/sabnzbd-qstatus \
|
|
|
|
scripts/agent-local/temperature \
|
2016-02-03 17:26:35 +01:00
|
|
|
scripts/agent-local/virt-what \
|
2015-06-16 20:04:29 +02:00
|
|
|
scripts/agent-local/vmwaretools \
|
|
|
|
scripts/agent-local/zimbra \
|
2016-02-03 17:26:35 +01:00
|
|
|
scripts/add_ds.pl \
|
2015-06-16 20:04:29 +02:00
|
|
|
scripts/get-geshi.sh \
|
|
|
|
scripts/get-jpgraph.sh \
|
2016-02-03 17:26:35 +01:00
|
|
|
scripts/ifAlias \
|
|
|
|
scripts/ifAlias_persist \
|
2015-06-16 20:04:29 +02:00
|
|
|
scripts/makecss.sh \
|
|
|
|
scripts/observium_agent \
|
2016-02-03 17:26:35 +01:00
|
|
|
scripts/removespikes.php \
|
|
|
|
scripts/removespikes.pl \
|
|
|
|
scripts/rename-mibs.pl \
|
|
|
|
scripts/rrdtoolx.py \
|
2015-06-16 20:04:29 +02:00
|
|
|
scripts/watchmaillog/watchmaillog.pl
|
|
|
|
|
2016-02-03 17:26:35 +01:00
|
|
|
USE_PHP= ctype filter gd iconv json mcrypt mysql mysqli posix session snmp tokenizer xml zlib
|
2012-02-28 21:05:01 +01:00
|
|
|
WANT_PHP_CLI= yes
|
2016-03-13 17:56:42 +01:00
|
|
|
IGNORE_WITH_PHP= 70
|
2012-02-28 21:05:01 +01:00
|
|
|
|
2014-07-28 18:20:05 +02:00
|
|
|
NO_BUILD= yes
|
|
|
|
|
2012-02-28 21:05:01 +01:00
|
|
|
RUN_DEPENDS+= rrdtool:${PORTSDIR}/databases/rrdtool \
|
|
|
|
dot:${PORTSDIR}/graphics/graphviz \
|
|
|
|
Magick-config:${PORTSDIR}/graphics/ImageMagick \
|
|
|
|
mtr:${PORTSDIR}/net/mtr-nox11 \
|
|
|
|
${LOCALBASE}/share/pear/Net/IPv4.php:${PORTSDIR}/net/pear-Net_IPv4 \
|
|
|
|
${LOCALBASE}/share/pear/Net/IPv6.php:${PORTSDIR}/net/pear-Net_IPv6 \
|
2016-02-09 23:27:53 +01:00
|
|
|
snmpget:${PORTSDIR}/net-mgmt/net-snmp \
|
|
|
|
sudo:${PORTSDIR}/security/sudo
|
|
|
|
LIB_DEPENDS+= libpng.so:${PORTSDIR}/graphics/png
|
2012-02-28 21:05:01 +01:00
|
|
|
|
2015-05-27 16:31:01 +02:00
|
|
|
OPTIONS_DEFINE= APACHEMOD FPING IPMITOOL LIBVIRT MYSQLD NAGPLUGINS NMAP PYPOLLER SVN WMIC
|
|
|
|
OPTIONS_DEFAULT= APACHEMOD FPING IPMITOOL LIBVIRT NAGPLUGINS NMAP PYPOLLER SVN WMIC
|
2013-01-28 09:59:36 +01:00
|
|
|
APACHEMOD_DESC= Use PHP with Apache 2.2+ module
|
2015-03-24 03:05:47 +01:00
|
|
|
FPING_DESC= Enable fping support ping monitoring
|
|
|
|
IPMITOOL_DESC= Enable support for monitoring hardware IPMI
|
2013-01-28 09:59:36 +01:00
|
|
|
MYSQLD_DESC= Use local MySQL server
|
2015-03-24 03:05:47 +01:00
|
|
|
WMIC_DESC= Enable support for WMI polling
|
2015-05-27 16:31:01 +02:00
|
|
|
PYPOLLER_DESC= Enable Python Poller Wrapper
|
2015-03-24 03:05:47 +01:00
|
|
|
|
|
|
|
FPING_RUN_DEPENDS= fping:${PORTSDIR}/net/fping
|
|
|
|
IPMITOOL_RUN_DEPENDS= ipmitool:${PORTSDIR}/sysutils/ipmitool
|
|
|
|
LIBVIRT_RUN_DEPENDS= virsh:${PORTSDIR}/devel/libvirt
|
|
|
|
NAGPLUGINS_RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagios-plugins
|
|
|
|
NMAP_RUN_DEPENDS= nmap:${PORTSDIR}/security/nmap
|
2015-05-27 16:31:01 +02:00
|
|
|
PYPOLLER_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}MySQLdb>0:${PORTSDIR}/databases/py-MySQLdb
|
2015-03-24 03:05:47 +01:00
|
|
|
SVN_RUN_DEPENDS= svn:${PORTSDIR}/devel/subversion
|
|
|
|
WMIC_RUN_DEPENDS= wmic:${PORTSDIR}/net-mgmt/wmi-client
|
2013-01-28 09:59:36 +01:00
|
|
|
|
|
|
|
.include <bsd.port.options.mk>
|
2012-02-28 21:05:01 +01:00
|
|
|
|
|
|
|
SUB_FILES+= pkg-message
|
2016-02-03 17:26:35 +01:00
|
|
|
SUB_LIST+= PHP="${PHPBASE}/bin/php" PYTHON=${PHPBASE}/bin/python
|
2012-02-28 21:05:01 +01:00
|
|
|
|
2016-02-03 17:26:35 +01:00
|
|
|
ROOT_FILES= rename_device.php snmptrap.php add_device.php \
|
2014-07-28 18:20:05 +02:00
|
|
|
snmpd.conf.example check-errors.php config_to_json.php delete_device.php \
|
|
|
|
syslog.php irc.php snmp.conf.example adduser.php discovery.php \
|
|
|
|
check-services.php poller.php config.php.default poller-wrapper.py
|
2016-02-03 17:26:35 +01:00
|
|
|
ROOT_DIRS= html scripts includes update mibs libs
|
2014-07-28 18:20:05 +02:00
|
|
|
|
|
|
|
PORTDOCS= INSTALL README
|
2012-02-28 21:05:01 +01:00
|
|
|
PORTEXAMPLES= snmp.conf.example snmpd.conf.example
|
|
|
|
|
2013-01-28 09:59:36 +01:00
|
|
|
.if ${PORT_OPTIONS:MAPACHEMOD} && !defined(PACKAGE_BUILDING)
|
2012-02-28 21:05:01 +01:00
|
|
|
WANT_PHP_MOD= yes
|
2014-07-28 18:20:05 +02:00
|
|
|
USE_APACHE_RUN= 22+
|
2012-02-28 21:05:01 +01:00
|
|
|
.else
|
2013-01-28 09:59:36 +01:00
|
|
|
# Package builder doesn't create php5 with module
|
2012-02-28 21:05:01 +01:00
|
|
|
WANT_PHP_WEB= yes
|
|
|
|
.endif
|
|
|
|
|
2013-01-28 09:59:36 +01:00
|
|
|
.if ${PORT_OPTIONS:MMYSQLD}
|
2012-02-28 21:05:01 +01:00
|
|
|
USE_MYSQL= server
|
|
|
|
.else
|
|
|
|
USE_MYSQL= client
|
|
|
|
.endif
|
|
|
|
|
2015-05-27 17:54:36 +02:00
|
|
|
post-patch:
|
|
|
|
${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/poller-wrapper.py ${WRKSRC}/poller.php
|
|
|
|
|
2012-02-28 21:05:01 +01:00
|
|
|
do-install:
|
2015-06-16 20:04:29 +02:00
|
|
|
${MKDIR} ${STAGEDIR}/${WWWDIR}
|
2012-02-28 21:05:01 +01:00
|
|
|
.for dir in ${ROOT_DIRS}
|
2015-06-16 20:04:29 +02:00
|
|
|
${MKDIR} ${STAGEDIR}/${WWWDIR}/${dir}
|
|
|
|
cd ${WRKSRC}/${dir} && ${COPYTREE_SHARE} . ${STAGEDIR}/${WWWDIR}/${dir}
|
2012-02-28 21:05:01 +01:00
|
|
|
.endfor
|
2013-01-28 09:59:36 +01:00
|
|
|
.for f in ${ROOT_FILES}
|
2015-06-16 20:04:29 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}/${WWWDIR}
|
2012-02-28 21:05:01 +01:00
|
|
|
.endfor
|
2016-02-03 17:26:35 +01:00
|
|
|
# Create empty rrd dir and logs writable by www (the apache user)
|
|
|
|
${MKDIR} ${STAGEDIR}/${WWWDIR}/rrd ${STAGEDIR}/${WWWDIR}/logs
|
2014-07-29 15:39:34 +02:00
|
|
|
# Files in scripts dir should be executable
|
2015-06-16 20:04:29 +02:00
|
|
|
${FIND} ${STAGEDIR}/${WWWDIR}/scripts -type f -exec ${CHMOD} +x {} \;
|
2015-03-24 03:05:47 +01:00
|
|
|
# Ensure PHP and Python scripts are executable
|
2015-06-16 20:04:29 +02:00
|
|
|
${FIND} ${STAGEDIR}/${WWWDIR} -type f -name '*.py' -or -type f -name '*.php' -exec ${CHMOD} +x {} \;
|
2015-03-24 03:05:47 +01:00
|
|
|
# Rename for @sample
|
2015-06-16 20:04:29 +02:00
|
|
|
${MV} ${STAGEDIR}/${WWWDIR}/config.php.default ${STAGEDIR}/${WWWDIR}/config.php.default.sample
|
2014-07-28 18:20:05 +02:00
|
|
|
|
2013-01-28 09:59:36 +01:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2015-06-16 20:04:29 +02:00
|
|
|
${MKDIR} ${STAGEDIR}/${DOCSDIR}
|
2013-01-28 09:59:36 +01:00
|
|
|
.for f in ${PORTDOCS}
|
2015-06-16 20:04:29 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}/${DOCSDIR}
|
2012-02-28 21:05:01 +01:00
|
|
|
.endfor
|
|
|
|
.endif
|
2013-01-28 09:59:36 +01:00
|
|
|
.if ${PORT_OPTIONS:MEXAMPLES}
|
2015-06-16 20:04:29 +02:00
|
|
|
${MKDIR} ${STAGEDIR}/${EXAMPLESDIR}
|
2013-01-28 09:59:36 +01:00
|
|
|
.for f in ${PORTEXAMPLES}
|
2015-06-16 20:04:29 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}/${EXAMPLESDIR}
|
2012-02-28 21:05:01 +01:00
|
|
|
.endfor
|
|
|
|
.endif
|
|
|
|
|
2013-01-28 09:59:36 +01:00
|
|
|
.include <bsd.port.mk>
|