From cee4353f1581ec20f4026a32078f62d25ce2f922 Mon Sep 17 00:00:00 2001 From: Krystian Kozak Date: Fri, 5 Oct 2018 22:26:21 +0200 Subject: [PATCH] zabbix: add mysql support Allows to choose database management software and adds mysql support. Proxy gets the same database management software as server, because it must be the same type. Signed-off-by: Etienne Champetier [Keep postgresl as default / depend on libpq] Signed-off-by: Krystian Kozak --- admin/zabbix/Makefile | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/admin/zabbix/Makefile b/admin/zabbix/Makefile index 6710e4c21..7345003e5 100644 --- a/admin/zabbix/Makefile +++ b/admin/zabbix/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zabbix PKG_VERSION:=3.4.14 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_HASH:=7443873cc970672d3c884230d3aeb082f2d8afcc2b757506c2d684ffdd12d77e @@ -25,7 +25,9 @@ PKG_FIXUP:=autoreconf PKG_CONFIG_DEPENDS:= \ CONFIG_ZABBIX_GNUTLS \ - CONFIG_ZABBIX_OPENSSL + CONFIG_ZABBIX_OPENSSL \ + CONFIG_ZABBIX_MYSQL \ + CONFIG_ZABBIX_POSTGRESQL include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk @@ -49,6 +51,22 @@ choice endchoice endef +define Package/zabbix-server/config +comment "Database Software" + +choice + prompt "Selected Database Software" + default ZABBIX_POSTGRESQL + + config ZABBIX_MYSQL + bool "MySQL/MariaDB" + + config ZABBIX_POSTGRESQL + bool "PostgreSQL" + +endchoice +endef + define Package/zabbix/Default SECTION:=admin CATEGORY:=Administration @@ -96,13 +114,13 @@ endef define Package/zabbix-server $(call Package/zabbix/Default) TITLE+= server - DEPENDS += +pgsql-cli +libevent2 + DEPENDS += +ZABBIX_POSTGRESQL:libpq +ZABBIX_MYSQL:libmariadbclient +libevent2 endef define Package/zabbix-proxy $(call Package/zabbix/Default) TITLE+= proxy - DEPENDS += +pgsql-cli + DEPENDS += +ZABBIX_POSTGRESQL:libpq +ZABBIX_MYSQL:libmariadbclient endef define Package/zabbix-extra-mac80211/description @@ -129,7 +147,8 @@ CONFIGURE_ARGS+= \ --enable-proxy \ $(call autoconf_bool,CONFIG_IPV6,ipv6) \ --disable-java \ - --with-postgresql \ + $(if $(CONFIG_ZABBIX_MYSQL),--with-mysql) \ + $(if $(CONFIG_ZABBIX_POSTGRESQL),--with-postgresql) \ --with-libevent=$(STAGING_DIR)/usr/include/libevent \ --with-libpcre=$(STAGING_DIR)/usr/include \ $(if $(CONFIG_ZABBIX_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr") \