Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jun 2014 17:27:29 +0200
From:      Marco Steinbach <coco@executive-computing.de>
To:        Lars Engels <lars.engels@0x20.net>
Cc:        ports@FreeBSD.org
Subject:   Re: [CFT]: net-mgmt/icinga2
Message-ID:  <53A30161.7010500@executive-computing.de>
In-Reply-To: <20140619140856.GE53663@e-new.0x20.net>
References:  <20140618143633.GA53663@e-new.0x20.net> <53A2EAD8.40702@executive-computing.de> <20140619140856.GE53663@e-new.0x20.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------030405040101090606040702
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Lars Engels wrote on 19.06.2014 16:08:
> On Thu, Jun 19, 2014 at 03:51:20PM +0200, Marco Steinbach wrote:
>> Lars Engels wrote on 18.06.2014 16:36:
>>> Hey folks,

[Icinga2 port, patch]

> 
> Good catch, thanks for this!
> 
> I just updated the shar file and also added WWW to pkg-descr.
> 

This patch tries to make Icinga2 only link to what database client the 
user selected, instead of linking to whatever database client cmake 
stumbles over in addition to the users selection.

MfG CoCo


--------------030405040101090606040702
Content-Type: text/plain;
 name="icinga2_1.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="icinga2_1.patch"

diff -Naur net-mgmt.orig/icinga2/Makefile net-mgmt/icinga2/Makefile
--- net-mgmt.orig/icinga2/Makefile	2014-06-19 14:12:45.000000000 +0000
+++ net-mgmt/icinga2/Makefile	2014-06-19 14:11:14.000000000 +0000
@@ -25,6 +25,9 @@
 
 OPTIONS_DEFAULT=	MYSQL
 
+MYSQL_CMAKE_ON= -DWITH_MYSQL:BOOL=true
+PGSQL_CMAKE_ON= -DWITH_PGSQL:BOOL=true
+
 ICINGA2USER?=	icinga
 ICINGA2GROUP?=	icinga
 USERS=		${ICINGA2USER}
diff -Naur net-mgmt.orig/icinga2/files/patch-CMakeLists.txt net-mgmt/icinga2/files/patch-CMakeLists.txt
--- net-mgmt.orig/icinga2/files/patch-CMakeLists.txt	1970-01-01 00:00:00.000000000 +0000
+++ net-mgmt/icinga2/files/patch-CMakeLists.txt	2014-06-16 23:21:34.000000000 +0000
@@ -0,0 +1,12 @@
+--- CMakeLists.txt.orig	2014-06-16 23:18:51.000000000 +0000
++++ CMakeLists.txt	2014-06-16 23:19:01.000000000 +0000
+@@ -27,6 +27,9 @@
+       FORCE)
+ endif()
+ 
++option(WITH_MYSQL "MySQL support" OFF)
++option(WITH_PGSQL "PostgreSQL support" OFF)
++
+ file(STRINGS icinga2.spec VERSION_LINE REGEX "^Version: ")
+ string(REPLACE "Version: " "" ICINGA2_VERSION ${VERSION_LINE})
+ 
diff -Naur net-mgmt.orig/icinga2/files/patch-components__CMakeLists.txt net-mgmt/icinga2/files/patch-components__CMakeLists.txt
--- net-mgmt.orig/icinga2/files/patch-components__CMakeLists.txt	1970-01-01 00:00:00.000000000 +0000
+++ net-mgmt/icinga2/files/patch-components__CMakeLists.txt	2014-06-16 23:21:47.000000000 +0000
@@ -0,0 +1,19 @@
+--- components/CMakeLists.txt.orig	2014-06-16 23:20:12.000000000 +0000
++++ components/CMakeLists.txt	2014-06-16 23:20:18.000000000 +0000
+@@ -1,7 +1,14 @@
+ add_subdirectory(checker)
+ add_subdirectory(compat)
+-add_subdirectory(db_ido_mysql)
+-add_subdirectory(db_ido_pgsql)
++
++if(WITH_MYSQL)
++	add_subdirectory(db_ido_mysql)
++endif()
++
++if(WITH_PGSQL)
++	add_subdirectory(db_ido_pgsql)
++endif()
++
+ add_subdirectory(demo)
+ add_subdirectory(livestatus)
+ add_subdirectory(notification)
diff -Naur net-mgmt.orig/icinga2/files/patch-components__db_ido_mysql__CMakeLists.txt net-mgmt/icinga2/files/patch-components__db_ido_mysql__CMakeLists.txt
--- net-mgmt.orig/icinga2/files/patch-components__db_ido_mysql__CMakeLists.txt	1970-01-01 00:00:00.000000000 +0000
+++ net-mgmt/icinga2/files/patch-components__db_ido_mysql__CMakeLists.txt	2014-06-16 23:33:59.000000000 +0000
@@ -0,0 +1,9 @@
+--- components/db_ido_mysql/CMakeLists.txt.orig	2014-06-16 23:31:26.000000000 +0000
++++ components/db_ido_mysql/CMakeLists.txt	2014-06-16 23:31:37.000000000 +0000
+@@ -38,4 +38,6 @@
+       RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
+       LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
+     )
++else()
++    message( FATAL_ERROR "You have selected MySQL support, but MySQL could not be found." )
+ endif()
diff -Naur net-mgmt.orig/icinga2/files/patch-components__db_ido_pgsql__CMakeLists.txt net-mgmt/icinga2/files/patch-components__db_ido_pgsql__CMakeLists.txt
--- net-mgmt.orig/icinga2/files/patch-components__db_ido_pgsql__CMakeLists.txt	1970-01-01 00:00:00.000000000 +0000
+++ net-mgmt/icinga2/files/patch-components__db_ido_pgsql__CMakeLists.txt	2014-06-16 23:34:55.000000000 +0000
@@ -0,0 +1,9 @@
+--- components/db_ido_pgsql/CMakeLists.txt.orig	2014-06-16 23:27:15.000000000 +0000
++++ components/db_ido_pgsql/CMakeLists.txt	2014-06-16 23:29:03.000000000 +0000
+@@ -40,4 +40,6 @@
+       RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
+       LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
+     )
++else()
++    message( FATAL_ERROR "You have selected PostgreSQL support, but PostgreSQL could not be found." )
+ endif()

--------------030405040101090606040702--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53A30161.7010500>