diff --git a/openvswitch.spec b/openvswitch.spec index 3e601be..6d5bd20 100644 --- a/openvswitch.spec +++ b/openvswitch.spec @@ -1,8 +1,25 @@ %global _hardened_build 1 + +# This provides a way for distros that doesn't provide +# python-twisted-conch to disable building of ovsdbmonitor +# by default. You can override by passing --with ovsdbmonitor +# or --without ovsdbmonitor while building the RPM. +%if 0%{?el7} +%define _pkg_ovsdbmonitor 0 +%else +%define _pkg_ovsdbmonitor 1 +%endif + +%if %{?_with_ovsdbmonitor: 1}%{!?_with_ovsdbmonitor: 0} +%define with_ovsdbmonitor 1 +%else +%define with_ovsdbmonitor %{?_without_ovsdbmonitor: 0}%{!?_without_ovsdbmonitor: %{_pkg_ovsdbmonitor}} +%endif + Name: openvswitch Version: 1.11.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Open vSwitch daemon/database/utilities # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the @@ -22,9 +39,12 @@ Source7: openvswitch-nonetwork.service Source8: sysconfig.template BuildRequires: systemd-units openssl openssl-devel -BuildRequires: python python-twisted-core python-twisted-conch python-zope-interface PyQt4 +BuildRequires: python python-twisted-core python-zope-interface PyQt4 BuildRequires: desktop-file-utils BuildRequires: groff graphviz +%if %{with_ovsdbmonitor} +BuildRequires: python-twisted-conch +%endif Requires: openssl iproute module-init-tools @@ -46,6 +66,7 @@ Requires: python %description -n python-openvswitch Python bindings for the Open vSwitch database +%if %{with_ovsdbmonitor} %package -n ovsdbmonitor Summary: Open vSwitch graphical monitoring tool License: ASL 2.0 @@ -58,6 +79,7 @@ A GUI tool for monitoring and troubleshooting local or remote Open vSwitch installations. It presents GUI tables that graphically represent an Open vSwitch kernel flow table (similar to "ovs-dpctl dump-flows") and Open vSwitch database contents (similar to "ovs-vsctl list