diff options
author | lme <lme@FreeBSD.org> | 2014-09-30 22:48:25 +0800 |
---|---|---|
committer | lme <lme@FreeBSD.org> | 2014-09-30 22:48:25 +0800 |
commit | 356a8dbd36a26fc4ce8a2b944ad005f154245854 (patch) | |
tree | bf466c828e0445526cfd300eae06e8c6673e2405 /net-mgmt/icinga2 | |
parent | 0dc5b2e736cf10a40e9ea4bfa8a74a6de9f91c33 (diff) | |
download | freebsd-ports-gnome-356a8dbd36a26fc4ce8a2b944ad005f154245854.tar.gz freebsd-ports-gnome-356a8dbd36a26fc4ce8a2b944ad005f154245854.tar.zst freebsd-ports-gnome-356a8dbd36a26fc4ce8a2b944ad005f154245854.zip |
- Add EXAMPLES option to install schemas to create mysql/pgsql databases for Icinga 2
- Bump PORTREVISION
Diffstat (limited to 'net-mgmt/icinga2')
-rw-r--r-- | net-mgmt/icinga2/Makefile | 16 | ||||
-rw-r--r-- | net-mgmt/icinga2/pkg-plist | 6 |
2 files changed, 19 insertions, 3 deletions
diff --git a/net-mgmt/icinga2/Makefile b/net-mgmt/icinga2/Makefile index 041df32299d1..b3b39dfc01ef 100644 --- a/net-mgmt/icinga2/Makefile +++ b/net-mgmt/icinga2/Makefile @@ -2,6 +2,7 @@ PORTNAME= icinga2 DISTVERSION= 2.1.1 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= http://github.com/Icinga/${PORTNAME}/archive/v${DISTVERSION}.tar.gz?dummy=/ @@ -20,13 +21,13 @@ USE_LDCONFIG= yes USE_RC_SUBR= ${PORTNAME} -OPTIONS_DEFINE= DOCS +OPTIONS_DEFINE= DOCS EXAMPLES OPTIONS_MULTI= BACKEND OPTIONS_MULTI_BACKEND= MYSQL PGSQL OPTIONS_RADIO= PLUGINS OPTIONS_RADIO_PLUGINS= MONPLUGINS NAGPLUGINS -OPTIONS_DEFAULT= MYSQL MONPLUGINS +OPTIONS_DEFAULT= MYSQL 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 @@ -56,6 +57,7 @@ SUB_LIST= ICINGA2LOGDIR=${ICINGA2LOGDIR} \ ICINGA2GROUP=${ICINGA2GROUP} \ WWWGRP=${WWWGRP} +# Config files with references to "Linux" LINUX_CONFIG= groups.conf services.conf hosts/localhost.conf .include <bsd.port.pre.mk> @@ -75,7 +77,7 @@ PLIST_SUB+= MYSQL="@comment " .endif .if ${PORT_OPTIONS:MPGSQL} -USE_PGSQL= yes +USES+= pgsql PLIST_SUB+= PGSQL="" .else PLIST_SUB+= PGSQL="@comment " @@ -94,4 +96,12 @@ post-patch: ${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 <bsd.port.post.mk> diff --git a/net-mgmt/icinga2/pkg-plist b/net-mgmt/icinga2/pkg-plist index aeb0baae32d1..fcdcd62d4a96 100644 --- a/net-mgmt/icinga2/pkg-plist +++ b/net-mgmt/icinga2/pkg-plist @@ -98,6 +98,12 @@ sbin/icinga2-list-objects %%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 |