# - 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
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
configure() {
%configure \
--enable-agent \
- --enable-agent2 \
+ %{__enable_disable agent2} \
--enable-ipv6 \
%{__enable_disable java} \
--with-jabber \
%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
%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)