From: Marcin Krol Date: Thu, 20 Jul 2023 13:36:39 +0000 (+0200) Subject: - don't build Zabbix Agent 2 by default, it requires systemd to run X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=ca56748d598c82fea4b5c9f37a7250f52320e464;p=packages%2Fzabbix.git - don't build Zabbix Agent 2 by default, it requires systemd to run --- diff --git a/zabbix.spec b/zabbix.spec index fcbbe4c..ec23c8c 100644 --- a/zabbix.spec +++ b/zabbix.spec @@ -2,6 +2,7 @@ # - initscript for zabbix-server, zabbix-proxy and zabbix-java # # Conditional build: +%bcond_with agent2 # build Zabbix Agent 2 %bcond_without pgsql # enable PostgreSQL support %bcond_without sqlite3 # enable sqlite3 support %bcond_without mysql # enable MySQL support @@ -35,7 +36,7 @@ BuildRequires: OpenIPMI-devel BuildRequires: autoconf BuildRequires: automake >= 1:1.15 BuildRequires: curl-devel -BuildRequires: golang +%{?with_agent2:BuildRequires: golang} %{?with_java:BuildRequires: jdk} BuildRequires: libevent-devel BuildRequires: libssh2-devel @@ -278,7 +279,7 @@ This package provides the Zabbix Java Gateway. configure() { %configure \ --enable-agent \ - --enable-agent2 \ + %{__enable_disable agent2} \ --enable-ipv6 \ %{__enable_disable java} \ --with-jabber \ @@ -515,6 +516,7 @@ fi %attr(755,root,root) %{_sbindir}/zabbix_agentd %{_mandir}/man8/zabbix_agentd* +%if %{with agent2} %files agent2 %defattr(644,root,root,755) %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent2.conf @@ -532,6 +534,7 @@ fi %attr(754,root,root) /etc/rc.d/init.d/zabbix_agent2 %attr(755,root,root) %{_sbindir}/zabbix_agent2 %{_mandir}/man8/zabbix_agent2* +%endif %files web %defattr(644,root,root,755)