Add dnstap and systemd option build support

This commit is contained in:
Petr Menšík 2020-03-20 12:33:00 +01:00
parent b6d9ed08b0
commit 776a059376

View File

@ -1,6 +1,8 @@
%{?!with_python2: %global with_python2 0}
%{?!with_python3: %global with_python3 1}
%{?!with_munin: %global with_munin 1}
%bcond_with dnstap
%bcond_with systemd
%global _hardened_build 1
@ -68,6 +70,12 @@ BuildRequires: python2-devel swig
%if 0%{with_python3}
BuildRequires: python3-devel swig
%endif
%if %{with dnstap}
BuildRequires: fstrm-devel protobuf-c-devel
%endif
%if %{with systemd}
BuildRequires: systemd-devel
%endif
%if 0%{?fedora} >= 30
BuildRequires: systemd-rpm-macros
%else
@ -197,6 +205,12 @@ pushd %{dir_primary}
%configure \
%if 0%{?python_primary:1}
--with-pythonmodule --with-pyunbound PYTHON=%{python_primary} \
%endif
%if %{with dnstap}
--enable-dnstap \
%endif
%if %{with systemd}
--enable-systemd \
%endif
%{configure_args}
@ -209,6 +223,12 @@ popd
pushd %{dir_secondary}
%configure \
--with-pythonmodule --with-pyunbound PYTHON=%{python_secondary} \
%if %{with dnstap}
--enable-dnstap \
%endif
%if %{with systemd}
--enable-systemd \
%endif
%{configure_args}
%{__make} %{?_smp_mflags}