]> TLD Linux GIT Repositories - packages/zabbix.git/commitdiff
- don't build Zabbix Agent 2 by default, it requires systemd to run
authorMarcin Krol <hawk@tld-linux.org>
Thu, 20 Jul 2023 13:36:39 +0000 (15:36 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Thu, 20 Jul 2023 13:36:39 +0000 (15:36 +0200)
zabbix.spec

index fcbbe4c9c1c821ea5f0ef3a13ac702a0aecf34bf..ec23c8caab5a82c0c6b867bd7ee4f8f9dbc4a272 100644 (file)
@@ -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)