diff --git a/net-mgmt/icinga2/Makefile b/net-mgmt/icinga2/Makefile index b3b39dfc01ef..245f7c2179ef 100644 --- a/net-mgmt/icinga2/Makefile +++ b/net-mgmt/icinga2/Makefile @@ -1,107 +1,96 @@ # $FreeBSD$ PORTNAME= icinga2 DISTVERSION= 2.1.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net-mgmt MASTER_SITES= http://github.com/Icinga/${PORTNAME}/archive/v${DISTVERSION}.tar.gz?dummy=/ MAINTAINER= lme@FreeBSD.org COMMENT= Monitoring and management system for hosts, services and networks LICENSE= GPLv2 BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools${PYTHON_SUFFIX}>0:${PORTSDIR}/devel/py-setuptools${PYTHON_SUFFIX} LIB_DEPENDS= libboost_system.so:${PORTSDIR}/devel/boost-libs \ libexecinfo.so:${PORTSDIR}/devel/libexecinfo # for better debugging RUN_DEPENDS= ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash USES= bison cmake python USE_LDCONFIG= yes USE_RC_SUBR= ${PORTNAME} OPTIONS_DEFINE= DOCS EXAMPLES OPTIONS_MULTI= BACKEND OPTIONS_MULTI_BACKEND= MYSQL PGSQL OPTIONS_RADIO= PLUGINS OPTIONS_RADIO_PLUGINS= MONPLUGINS NAGPLUGINS -OPTIONS_DEFAULT= MYSQL MONPLUGINS EXAMPLES +OPTIONS_DEFAULT= MYSQL PGSQL MONPLUGINS EXAMPLES MONPLUGINS_RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/monitoring-plugins NAGPLUGINS_RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagios-plugins MYSQL_CMAKE_ON= -DWITH_MYSQL:BOOL=true PGSQL_CMAKE_ON= -DWITH_PGSQL:BOOL=true ICINGA2USER?= icinga ICINGA2GROUP?= icinga USERS= ${ICINGA2USER} GROUPS= ${ICINGA2GROUP} LOCALSTATEDIR?= /var ICINGA2LOGDIR?= /var/log/${PORTNAME} CMAKE_ARGS+= -DICINGA2_USER=${ICINGA2USER} \ -DICINGA2_GROUP=${ICINGA2GROUP} \ -DICINGA2_COMMAND_USER=${ICINGA2USER} \ -DICINGA2_COMMAND_GROUP=${ICINGA2USER} \ -DICINGA2_PLUGINDIR=${LOCALBASE}/libexec/nagios \ -DCMAKE_INSTALL_SYSCONFDIR=${PREFIX}/etc \ -DCMAKE_INSTALL_LOCALSTATEDIR=${LOCALSTATEDIR} \ -DCMAKE_INSTALL_MANDIR=${MANPREFIX}/man \ SUB_LIST= ICINGA2LOGDIR=${ICINGA2LOGDIR} \ ICINGA2USER=${ICINGA2USER} \ ICINGA2GROUP=${ICINGA2GROUP} \ WWWGRP=${WWWGRP} # Config files with references to "Linux" LINUX_CONFIG= groups.conf services.conf hosts/localhost.conf -.include +MYSQL_USE= mysql=yes +PGSQL_USES= pgsql + +OPTIONS_SUB= yes + +.include .if ${OSVERSION} < 1000033 BUILD_DEPENDS+= flex>=2.5.31:${PORTSDIR}/textproc/flex CMAKE_ARGS+= -DFLEX_EXECUTABLE:STRING=${LOCALBASE}/bin/flex CXXFLAGS+= -I${LOCALBASE}/include/flex .endif -.include - -.if ${PORT_OPTIONS:MMYSQL} -USE_MYSQL= yes -PLIST_SUB+= MYSQL="" -.else -PLIST_SUB+= MYSQL="@comment " -.endif - -.if ${PORT_OPTIONS:MPGSQL} -USES+= pgsql -PLIST_SUB+= PGSQL="" -.else -PLIST_SUB+= PGSQL="@comment " -.endif - post-patch: ${REINPLACE_CMD} -e '/^add_subdirectory(initsystem)/d' \ -e '/logrotate\.d/d' ${WRKSRC}/etc/CMakeLists.txt .for f in ${LINUX_CONFIG} ${REINPLACE_CMD} 's,[Ll]inux,FreeBSD,g' ${WRKSRC}/etc/icinga2/conf.d/${f} .endfor .if !${PORT_OPTIONS:MMYSQL} ${REINPLACE_CMD} '/^add_subdirectory(db_ido_mysql)/d' ${WRKSRC}/components/CMakeLists.txt .endif .if !${PORT_OPTIONS:MMYSQL} ${REINPLACE_CMD} '/^add_subdirectory(db_ido_pgsql)/d' ${WRKSRC}/components/CMakeLists.txt .endif post-install: .if ${PORT_OPTIONS:MEXAMPLES} .for db in mysql pgsql @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/${db} (cd ${WRKSRC}/components/db_ido_${db} && ${COPYTREE_SHARE} schema ${STAGEDIR}${EXAMPLESDIR}/${db}) .endfor .endif -.include +.include diff --git a/net-mgmt/icinga2/files/patch-third-party__cmake__GNUInstallDirs.cmake b/net-mgmt/icinga2/files/patch-third-party__cmake__GNUInstallDirs.cmake new file mode 100644 index 000000000000..e6a04c6cabd6 --- /dev/null +++ b/net-mgmt/icinga2/files/patch-third-party__cmake__GNUInstallDirs.cmake @@ -0,0 +1,11 @@ +--- third-party/cmake/GNUInstallDirs.cmake.orig 2014-10-03 15:04:47.712808574 +0200 ++++ third-party/cmake/GNUInstallDirs.cmake 2014-10-03 15:05:17.916805737 +0200 +@@ -166,7 +166,7 @@ + set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATAROOTDIR}") + endif() + +-if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") ++if(CMAKE_SYSTEM_NAME MATCHES "^(FreeBSD|OpenBSD)$") + if(NOT CMAKE_INSTALL_INFODIR) + set(CMAKE_INSTALL_INFODIR "" CACHE PATH "info documentation (info)") + set(CMAKE_INSTALL_INFODIR "info") diff --git a/net-mgmt/icinga2/pkg-plist b/net-mgmt/icinga2/pkg-plist index fcdcd62d4a96..be3e023e580e 100644 --- a/net-mgmt/icinga2/pkg-plist +++ b/net-mgmt/icinga2/pkg-plist @@ -1,140 +1,140 @@ bin/icinga2-build-ca bin/icinga2-build-key bin/icinga2-sign-key %%ETCDIR%%/conf.d/commands.conf %%ETCDIR%%/conf.d/downtimes.conf %%ETCDIR%%/conf.d/groups.conf %%ETCDIR%%/conf.d/hosts/localhost.conf %%ETCDIR%%/conf.d/hosts/localhost/disk.conf %%ETCDIR%%/conf.d/hosts/localhost/http.conf %%ETCDIR%%/conf.d/hosts/localhost/icinga.conf %%ETCDIR%%/conf.d/hosts/localhost/load.conf %%ETCDIR%%/conf.d/hosts/localhost/procs.conf %%ETCDIR%%/conf.d/hosts/localhost/ssh.conf %%ETCDIR%%/conf.d/hosts/localhost/swap.conf %%ETCDIR%%/conf.d/hosts/localhost/users.conf %%ETCDIR%%/conf.d/notifications.conf %%ETCDIR%%/conf.d/services.conf %%ETCDIR%%/conf.d/templates.conf %%ETCDIR%%/conf.d/timeperiods.conf %%ETCDIR%%/conf.d/users.conf %%ETCDIR%%/constants.conf %%ETCDIR%%/features-available/api.conf %%ETCDIR%%/features-available/checker.conf %%ETCDIR%%/features-available/command.conf %%ETCDIR%%/features-available/compatlog.conf %%ETCDIR%%/features-available/debuglog.conf %%ETCDIR%%/features-available/graphite.conf %%ETCDIR%%/features-available/icingastatus.conf %%ETCDIR%%/features-available/ido-mysql.conf %%ETCDIR%%/features-available/ido-pgsql.conf %%ETCDIR%%/features-available/livestatus.conf %%ETCDIR%%/features-available/mainlog.conf %%ETCDIR%%/features-available/notification.conf %%ETCDIR%%/features-available/perfdata.conf %%ETCDIR%%/features-available/statusdata.conf %%ETCDIR%%/features-available/syslog.conf %%ETCDIR%%/features-enabled/checker.conf %%ETCDIR%%/features-enabled/mainlog.conf %%ETCDIR%%/features-enabled/notification.conf %%ETCDIR%%/icinga2.conf %%ETCDIR%%/scripts/mail-host-notification.sh %%ETCDIR%%/scripts/mail-service-notification.sh %%ETCDIR%%/zones.conf %%ETCDIR%%/zones.d/README lib/icinga2/libbase.so lib/icinga2/libcJSON.so lib/icinga2/libchecker.so lib/icinga2/libcompat.so lib/icinga2/libconfig.so lib/icinga2/libdb_ido.so %%MYSQL%%lib/icinga2/libdb_ido_mysql.so %%PGSQL%%lib/icinga2/libdb_ido_pgsql.so lib/icinga2/libdemo.so lib/icinga2/libexecvpe.so lib/icinga2/libhello.so lib/icinga2/libicinga.so lib/icinga2/liblivestatus.so lib/icinga2/libmethods.so lib/icinga2/libmmatch.so lib/icinga2/libnotification.so lib/icinga2/libperfdata.so lib/icinga2/libremote.so %%PYTHON_SITELIBDIR%%/icinga2-2.1.1-py%%PYTHON_VER%%.egg-info/PKG-INFO %%PYTHON_SITELIBDIR%%/icinga2-2.1.1-py%%PYTHON_VER%%.egg-info/SOURCES.txt %%PYTHON_SITELIBDIR%%/icinga2-2.1.1-py%%PYTHON_VER%%.egg-info/dependency_links.txt %%PYTHON_SITELIBDIR%%/icinga2-2.1.1-py%%PYTHON_VER%%.egg-info/entry_points.txt %%PYTHON_SITELIBDIR%%/icinga2-2.1.1-py%%PYTHON_VER%%.egg-info/top_level.txt %%PYTHON_SITELIBDIR%%/icinga2/__init__.py %%PYTHON_SITELIBDIR%%/icinga2/__init__.pyc %%PYTHON_SITELIBDIR%%/icinga2/commands/__init__.py %%PYTHON_SITELIBDIR%%/icinga2/commands/__init__.pyc %%PYTHON_SITELIBDIR%%/icinga2/commands/list_objects.py %%PYTHON_SITELIBDIR%%/icinga2/commands/list_objects.pyc %%PYTHON_SITELIBDIR%%/icinga2/config.py %%PYTHON_SITELIBDIR%%/icinga2/config.pyc %%PYTHON_SITELIBDIR%%/icinga2/utils/__init__.py %%PYTHON_SITELIBDIR%%/icinga2/utils/__init__.pyc %%PYTHON_SITELIBDIR%%/icinga2/utils/debug.py %%PYTHON_SITELIBDIR%%/icinga2/utils/debug.pyc %%PYTHON_SITELIBDIR%%/icinga2/utils/netstring.py %%PYTHON_SITELIBDIR%%/icinga2/utils/netstring.pyc +man/man8/icinga2-build-ca.8.gz +man/man8/icinga2-build-key.8.gz +man/man8/icinga2-disable-feature.8.gz +man/man8/icinga2-enable-feature.8.gz +man/man8/icinga2-prepare-dirs.8.gz +man/man8/icinga2-sign-key.8.gz +man/man8/icinga2.8.gz sbin/icinga2 sbin/icinga2-disable-feature sbin/icinga2-enable-feature sbin/icinga2-list-objects %%PORTDOCS%%%%DOCSDIR%%/AUTHORS %%PORTDOCS%%%%DOCSDIR%%/COPYING %%PORTDOCS%%%%DOCSDIR%%/COPYING.Exceptions %%PORTDOCS%%%%DOCSDIR%%/ChangeLog %%PORTDOCS%%%%DOCSDIR%%/NEWS %%PORTDOCS%%%%DOCSDIR%%/README.md %%PORTDOCS%%%%DOCSDIR%%/markdown/1-about.md %%PORTDOCS%%%%DOCSDIR%%/markdown/2-getting-started.md %%PORTDOCS%%%%DOCSDIR%%/markdown/3-monitoring-basics.md %%PORTDOCS%%%%DOCSDIR%%/markdown/4-monitoring-remote-systems.md %%PORTDOCS%%%%DOCSDIR%%/markdown/5-addons-plugins.md %%PORTDOCS%%%%DOCSDIR%%/markdown/6-configuring-icinga-2.md %%PORTDOCS%%%%DOCSDIR%%/markdown/7-troubleshooting.md %%PORTDOCS%%%%DOCSDIR%%/markdown/8-migration.md %%PORTDOCS%%%%DOCSDIR%%/markdown/9-appendix.md %%PORTEXAMPLES%%%%EXAMPLESDIR%%/mysql/schema/mysql.sql %%PORTEXAMPLES%%%%EXAMPLESDIR%%/mysql/schema/upgrade/2.0.2.sql %%PORTEXAMPLES%%%%EXAMPLESDIR%%/mysql/schema/upgrade/2.1.0.sql %%PORTEXAMPLES%%%%EXAMPLESDIR%%/pgsql/schema/pgsql.sql %%PORTEXAMPLES%%%%EXAMPLESDIR%%/pgsql/schema/upgrade/2.0.2.sql %%PORTEXAMPLES%%%%EXAMPLESDIR%%/pgsql/schema/upgrade/2.1.0.sql %%DATADIR%%/include/command-icinga.conf %%DATADIR%%/include/command-plugins-manubulon.conf %%DATADIR%%/include/command-plugins.conf %%DATADIR%%/include/command.conf %%DATADIR%%/include/itl %%DATADIR%%/include/manubulon %%DATADIR%%/include/plugins %%DATADIR%%/include/timeperiod.conf %%DATADIR%%/pki/openssl-quiet.cnf %%DATADIR%%/pki/openssl.cnf %%DATADIR%%/pki/pkifuncs %%DATADIR%%/pki/vars -share/man/man8/icinga2-build-ca.8 -share/man/man8/icinga2-build-key.8 -share/man/man8/icinga2-disable-feature.8 -share/man/man8/icinga2-enable-feature.8 -share/man/man8/icinga2-prepare-dirs.8 -share/man/man8/icinga2-sign-key.8 -share/man/man8/icinga2.8 @dir /var/cache/icinga2 @dir /var/lib/icinga2/api/log @dir /var/lib/icinga2/api/repository @dir /var/lib/icinga2/api/zones @dir /var/lib/icinga2/api @dir /var/lib/icinga2 @dir /var/lib @dir /var/log/icinga2/compat/archives @dir /var/log/icinga2/compat @dir /var/log/icinga2 @dir /var/run/icinga2/cmd @dir /var/run/icinga2 @dir /var/spool/icinga2/perfdata @dir /var/spool/icinga2/tmp @dir /var/spool/icinga2