2013-01-23 10:46:39 +01:00
|
|
|
# Created by: rflynn@acsalaska.net
|
2017-12-17 16:13:36 +01:00
|
|
|
# Observium version can be found by looking at ${WRKSRC}/includes/definitions/version.inc.php
|
2012-02-28 21:05:01 +01:00
|
|
|
|
|
|
|
PORTNAME= observium
|
2020-01-11 06:04:15 +01:00
|
|
|
PORTVERSION= 0.19.8
|
Mk/bsd.options.desc.mk: Add shared version control OPTIONS & descriptions
- Add CVS description
- Add DARCS description
- Add GIT description
- Add MERCURIAL description
- Add PERFORCE description
- Rename SVN to SUBVERSION
devel/anjuta:
- Rename OPTION SVN to SUBVERSION
- Sort OPTIONS_DEFINE and OPTIONS_DEFAULT
- Change SUBVERSION_DESC to use the default description
devel/git:
- Rename OPTION P4 to PERFORCE
- Rename OPTION SVN to SUBVERSION
- Change PERFORCE_DESC to use the default description
devel/ocaml-opam:
- Rename OPTION HG to MERCURIAL
- Sort OPTIONS_DEFINE and OPTIONS_DEFAULT
- Change {DARCS,GIT,MERCURIAL}_DESC to use the default description
devel/thunar-vcs-plugin:
- Rename OPTION SVN to SUBVERSION
- Sort OPTIONS_DEFINE
- Change GIT_DESC to use the default description
devel/viewvc-devel:
- Rename OPTION SVN to SUBVERSION
- Sort OPTIONS_DEFINE, OPTIONS_DEFAULT and OPTIONS_SINGLE
net-mgmt/observium:
- Rename OPTION SVN to SUBVERSION
net-mgmt/rancid3:
- Rename OPTION SVN to SUBVERSION
- Sort OPTIONS_SINGLE_SCM
- Change {CVS,GIT,SUBVERSION}_DESC to use the default description
ports-mgmt/portshaker:
- Rename OPTION SVN to SUBVERSION
- Rename HG to MERCURIAL
- Sort OPTIONS_DEFINE
- Change {GIT,MERCURIAL}_DESC to use the default description
security/hydra:
- Rename OPTION SVN to SUBVERSION
security/medusa:
- Rename OPTION SVN to SUBVERSION
- Sort OPTIONS_DEFINE
shells/scponly:
- Rename OPTION SVN to SUBVERSION
- Sort OPTIONS_DEFINE
- Typo fix in SVNSERVE_DESC
www/trac-devel:
- Rename OPTION SVN to SUBVERSION
- Sort OPTIONS_DEFINE, OPTIONS_DEFAULT and OPTIONS_MULTI_DATABASE
- Change {GIT,SUBVERSION}_DESC to use the default description
Reviewed by: koobs, adamw, dvl, garga, hannes_mehnert.org, rm, dbaio, romain
Approved by: koobs (ports, mentor)
Differential Revision: https://reviews.freebsd.org/D17459
MFH: No (OPTION description updates)
2021-06-30 04:45:57 +02:00
|
|
|
PORTREVISION= 2
|
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}
|
2020-04-27 13:19:47 +02:00
|
|
|
PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX}
|
2012-02-28 21:05:01 +01:00
|
|
|
|
2018-02-13 16:01:42 +01:00
|
|
|
MAINTAINER= feld@FreeBSD.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
|
|
|
|
2017-11-01 14:10:35 +01:00
|
|
|
LICENSE= EULA
|
2017-08-22 18:26:13 +02:00
|
|
|
LICENSE_NAME= "Observium License Version 1.0"
|
|
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE.COMMUNITY
|
2017-11-01 14:10:35 +01:00
|
|
|
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
|
2012-02-28 21:05:01 +01:00
|
|
|
|
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}
|
|
|
|
|
2021-08-31 13:28:13 +02:00
|
|
|
USES= cpe php:cli,flavors python:3.5+ shebangfix
|
2017-08-22 18:26:13 +02:00
|
|
|
SHEBANG_FILES= \
|
|
|
|
poller-wrapper.py \
|
2017-12-17 16:13:36 +01:00
|
|
|
poller.php \
|
|
|
|
scripts/
|
2015-06-16 20:04:29 +02:00
|
|
|
|
2017-03-13 01:25:55 +01:00
|
|
|
USE_PHP= ctype filter gd iconv json mcrypt mysqli openssl posix session snmp tokenizer xml zlib
|
2012-02-28 21:05:01 +01:00
|
|
|
|
2017-12-17 16:13:36 +01:00
|
|
|
NO_ARCH= yes
|
2014-07-28 18:20:05 +02:00
|
|
|
NO_BUILD= yes
|
|
|
|
|
2016-04-01 16:16:16 +02:00
|
|
|
RUN_DEPENDS+= rrdtool:databases/rrdtool \
|
|
|
|
dot:graphics/graphviz \
|
|
|
|
mtr:net/mtr-nox11 \
|
2018-03-08 20:48:41 +01:00
|
|
|
${LOCALBASE}/share/pear/Net/IPv4.php:net/pear-Net_IPv4@${PHP_FLAVOR} \
|
|
|
|
${LOCALBASE}/share/pear/Net/IPv6.php:net/pear-Net_IPv6@${PHP_FLAVOR} \
|
2016-04-01 16:16:16 +02:00
|
|
|
snmpget:net-mgmt/net-snmp \
|
|
|
|
sudo:security/sudo
|
|
|
|
LIB_DEPENDS+= libpng.so:graphics/png
|
2012-02-28 21:05:01 +01:00
|
|
|
|
Mk/bsd.options.desc.mk: Add shared version control OPTIONS & descriptions
- Add CVS description
- Add DARCS description
- Add GIT description
- Add MERCURIAL description
- Add PERFORCE description
- Rename SVN to SUBVERSION
devel/anjuta:
- Rename OPTION SVN to SUBVERSION
- Sort OPTIONS_DEFINE and OPTIONS_DEFAULT
- Change SUBVERSION_DESC to use the default description
devel/git:
- Rename OPTION P4 to PERFORCE
- Rename OPTION SVN to SUBVERSION
- Change PERFORCE_DESC to use the default description
devel/ocaml-opam:
- Rename OPTION HG to MERCURIAL
- Sort OPTIONS_DEFINE and OPTIONS_DEFAULT
- Change {DARCS,GIT,MERCURIAL}_DESC to use the default description
devel/thunar-vcs-plugin:
- Rename OPTION SVN to SUBVERSION
- Sort OPTIONS_DEFINE
- Change GIT_DESC to use the default description
devel/viewvc-devel:
- Rename OPTION SVN to SUBVERSION
- Sort OPTIONS_DEFINE, OPTIONS_DEFAULT and OPTIONS_SINGLE
net-mgmt/observium:
- Rename OPTION SVN to SUBVERSION
net-mgmt/rancid3:
- Rename OPTION SVN to SUBVERSION
- Sort OPTIONS_SINGLE_SCM
- Change {CVS,GIT,SUBVERSION}_DESC to use the default description
ports-mgmt/portshaker:
- Rename OPTION SVN to SUBVERSION
- Rename HG to MERCURIAL
- Sort OPTIONS_DEFINE
- Change {GIT,MERCURIAL}_DESC to use the default description
security/hydra:
- Rename OPTION SVN to SUBVERSION
security/medusa:
- Rename OPTION SVN to SUBVERSION
- Sort OPTIONS_DEFINE
shells/scponly:
- Rename OPTION SVN to SUBVERSION
- Sort OPTIONS_DEFINE
- Typo fix in SVNSERVE_DESC
www/trac-devel:
- Rename OPTION SVN to SUBVERSION
- Sort OPTIONS_DEFINE, OPTIONS_DEFAULT and OPTIONS_MULTI_DATABASE
- Change {GIT,SUBVERSION}_DESC to use the default description
Reviewed by: koobs, adamw, dvl, garga, hannes_mehnert.org, rm, dbaio, romain
Approved by: koobs (ports, mentor)
Differential Revision: https://reviews.freebsd.org/D17459
MFH: No (OPTION description updates)
2021-06-30 04:45:57 +02:00
|
|
|
OPTIONS_DEFINE= APACHEMOD DOCS EXAMPLES FPING IPMITOOL LIBVIRT MYSQLD NAGPLUGINS NMAP PYPOLLER SUBVERSION WMIC
|
|
|
|
OPTIONS_DEFAULT= APACHEMOD FPING IPMITOOL LIBVIRT NAGPLUGINS NMAP PYPOLLER SUBVERSION 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
|
|
|
|
2016-04-01 16:16:16 +02:00
|
|
|
FPING_RUN_DEPENDS= fping:net/fping
|
|
|
|
IPMITOOL_RUN_DEPENDS= ipmitool:sysutils/ipmitool
|
|
|
|
LIBVIRT_RUN_DEPENDS= virsh:devel/libvirt
|
|
|
|
NAGPLUGINS_RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:net-mgmt/nagios-plugins
|
|
|
|
NMAP_RUN_DEPENDS= nmap:security/nmap
|
2020-04-27 13:19:47 +02:00
|
|
|
PYPOLLER_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mysqlclient>=1.3.13:databases/py-mysqlclient@${PY_FLAVOR}
|
Mk/bsd.options.desc.mk: Add shared version control OPTIONS & descriptions
- Add CVS description
- Add DARCS description
- Add GIT description
- Add MERCURIAL description
- Add PERFORCE description
- Rename SVN to SUBVERSION
devel/anjuta:
- Rename OPTION SVN to SUBVERSION
- Sort OPTIONS_DEFINE and OPTIONS_DEFAULT
- Change SUBVERSION_DESC to use the default description
devel/git:
- Rename OPTION P4 to PERFORCE
- Rename OPTION SVN to SUBVERSION
- Change PERFORCE_DESC to use the default description
devel/ocaml-opam:
- Rename OPTION HG to MERCURIAL
- Sort OPTIONS_DEFINE and OPTIONS_DEFAULT
- Change {DARCS,GIT,MERCURIAL}_DESC to use the default description
devel/thunar-vcs-plugin:
- Rename OPTION SVN to SUBVERSION
- Sort OPTIONS_DEFINE
- Change GIT_DESC to use the default description
devel/viewvc-devel:
- Rename OPTION SVN to SUBVERSION
- Sort OPTIONS_DEFINE, OPTIONS_DEFAULT and OPTIONS_SINGLE
net-mgmt/observium:
- Rename OPTION SVN to SUBVERSION
net-mgmt/rancid3:
- Rename OPTION SVN to SUBVERSION
- Sort OPTIONS_SINGLE_SCM
- Change {CVS,GIT,SUBVERSION}_DESC to use the default description
ports-mgmt/portshaker:
- Rename OPTION SVN to SUBVERSION
- Rename HG to MERCURIAL
- Sort OPTIONS_DEFINE
- Change {GIT,MERCURIAL}_DESC to use the default description
security/hydra:
- Rename OPTION SVN to SUBVERSION
security/medusa:
- Rename OPTION SVN to SUBVERSION
- Sort OPTIONS_DEFINE
shells/scponly:
- Rename OPTION SVN to SUBVERSION
- Sort OPTIONS_DEFINE
- Typo fix in SVNSERVE_DESC
www/trac-devel:
- Rename OPTION SVN to SUBVERSION
- Sort OPTIONS_DEFINE, OPTIONS_DEFAULT and OPTIONS_MULTI_DATABASE
- Change {GIT,SUBVERSION}_DESC to use the default description
Reviewed by: koobs, adamw, dvl, garga, hannes_mehnert.org, rm, dbaio, romain
Approved by: koobs (ports, mentor)
Differential Revision: https://reviews.freebsd.org/D17459
MFH: No (OPTION description updates)
2021-06-30 04:45:57 +02:00
|
|
|
SUBVERSION_RUN_DEPENDS= svn:devel/subversion
|
2016-04-01 16:16:16 +02:00
|
|
|
WMIC_RUN_DEPENDS= wmic: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
|
|
|
|
2017-08-22 18:26:13 +02:00
|
|
|
SUB_FILES+= pkg-message observium.conf.sample
|
2019-04-23 23:57:57 +02:00
|
|
|
SUB_LIST+= PHP="${PREFIX}/bin/php" PYTHON="${PYTHON_CMD}"
|
2012-02-28 21:05:01 +01:00
|
|
|
|
2019-04-23 23:43:17 +02:00
|
|
|
ROOT_FILES= add_device.php adduser.php alerter.php \
|
2018-02-07 15:29:46 +01:00
|
|
|
check-errors.php check-services.php config_to_json.php \
|
|
|
|
config.php.default delete_device.php discovery.php housekeeping.php \
|
|
|
|
irc.php poller-wrapper.py poller.php rename_device.php \
|
2019-04-23 23:43:17 +02:00
|
|
|
snmp.conf.example snmpd.conf.example \
|
|
|
|
snmptrap.php snmptrap.php syslog.php test_alert.php test_code.php VERSION
|
2018-02-07 15:29:46 +01:00
|
|
|
ROOT_DIRS= html includes libs logs mibs rrd scripts templates tests update
|
2014-07-28 18:20:05 +02:00
|
|
|
|
2018-02-07 15:29:46 +01:00
|
|
|
PORTDOCS= INSTALL README VERSION
|
2012-02-28 21:05:01 +01:00
|
|
|
PORTEXAMPLES= snmp.conf.example snmpd.conf.example
|
|
|
|
|
2017-08-22 18:26:13 +02:00
|
|
|
.if ${PORT_OPTIONS:MAPACHEMOD}
|
2018-03-11 19:36:16 +01:00
|
|
|
USES+= apache:run,2.2+
|
2017-08-22 18:26:13 +02:00
|
|
|
.endif
|
|
|
|
.if !defined(PACKAGE_BUILDING)
|
|
|
|
USES+= php:mod
|
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
|
2016-11-16 16:23:47 +01:00
|
|
|
USES+= php:web
|
2012-02-28 21:05:01 +01:00
|
|
|
.endif
|
|
|
|
|
2013-01-28 09:59:36 +01:00
|
|
|
.if ${PORT_OPTIONS:MMYSQLD}
|
2016-11-16 16:23:47 +01:00
|
|
|
USES+= mysql:server
|
2012-02-28 21:05:01 +01:00
|
|
|
.else
|
2016-11-16 16:23:47 +01:00
|
|
|
USES+= mysql:client
|
2012-02-28 21:05:01 +01:00
|
|
|
.endif
|
|
|
|
|
2015-05-27 17:54:36 +02:00
|
|
|
post-patch:
|
|
|
|
${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/poller-wrapper.py ${WRKSRC}/poller.php
|
2018-02-07 15:29:46 +01:00
|
|
|
${FIND} ${WRKSRC} -type d -empty -delete
|
|
|
|
${MKDIR} ${WRKSRC}/logs ${WRKSRC}/rrd
|
2015-05-27 17:54:36 +02:00
|
|
|
|
2012-02-28 21:05:01 +01:00
|
|
|
do-install:
|
2017-08-22 18:26:13 +02:00
|
|
|
${MKDIR} ${STAGEDIR}/${WWWDIR} ${STAGEDIR}/${PREFIX}/${APACHEETCDIR}/Includes
|
2018-02-07 15:29:46 +01:00
|
|
|
${INSTALL_DATA} ${WRKDIR}/observium.conf.sample ${STAGEDIR}/${PREFIX}/${APACHEETCDIR}/Includes
|
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}
|
2018-02-07 15:29:46 +01:00
|
|
|
(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
|
2018-02-07 15:29:46 +01: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 {} \;
|
2018-02-07 15:29:46 +01:00
|
|
|
# Ensure PHP and Python scripts are executable
|
|
|
|
${FIND} ${STAGEDIR}/${WWWDIR} -type f -name '*.py' -or -type f -name \
|
|
|
|
'*.php' -exec ${CHMOD} +x {} \;
|
2014-07-28 18:20:05 +02:00
|
|
|
|
2018-02-07 15:29:46 +01:00
|
|
|
do-install-DOCS-on:
|
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
|
2018-02-07 15:29:46 +01:00
|
|
|
|
|
|
|
do-install-EXAMPLES-on:
|
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
|
2018-02-07 15:29:46 +01:00
|
|
|
|
|
|
|
post-install:
|
|
|
|
@${ECHO} "@sample ${APACHEETCDIR}/Includes/observium.conf.sample" >> ${TMPPLIST}
|
|
|
|
@${FIND} -s ${STAGEDIR}${WWWDIR} -type f '(' -name '*.orig' -or -name '*.bak' ')' -delete
|
|
|
|
@${FIND} -s ${STAGEDIR}${WWWDIR} -not -type d | ${SORT} | \
|
|
|
|
${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST}
|
|
|
|
@${ECHO_CMD} "@dir(www,www,0775) ${WWWDIR}/logs" >> ${TMPPLIST}
|
|
|
|
@${ECHO_CMD} "@dir(www,www,0775) ${WWWDIR}/rrd" >> ${TMPPLIST}
|
2012-02-28 21:05:01 +01:00
|
|
|
|
2013-01-28 09:59:36 +01:00
|
|
|
.include <bsd.port.mk>
|