File openstack-neutron-dynamic-routing.spec of Package openstack-neutron-dynamic-routing

#
# spec file for package openstack-neutron-dynamic-routing
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           openstack-neutron-dynamic-routing
Version:        17.1.0~dev3
Release:        0
Summary:        OpenStack Neutron Dynamic Routing Service
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://docs.openstack.org/neutron
Source0:        neutron-dynamic-routing-master.tar.gz
Source1:        openstack-neutron-bgp-dragent.service
BuildRequires:  openstack-macros
BuildRequires:  openstack-neutron
BuildRequires:  python3-pbr
Requires:       python3-neutron-dynamic-routing = %{version}-%{release}
BuildArch:      noarch

%description
Neutron is a virtual network service for Openstack.
This is a dynamic routing service plugin for Openstack Neutron (Networking) service.

%package -n python3-neutron-dynamic-routing
Summary:        OpenStack Neutron Dynamic Routing Service - Python module
Group:          Development/Languages/Python
Requires:       openstack-neutron
Requires:       python3-SQLAlchemy
Requires:       python3-alembic
Requires:       python3-eventlet
Requires:       python3-httplib2
Requires:       python3-netaddr
Requires:       python3-neutron-lib
Requires:       python3-os-ken
Requires:       python3-oslo.config
Requires:       python3-oslo.db
Requires:       python3-oslo.log
Requires:       python3-oslo.messaging
Requires:       python3-oslo.serialization
Requires:       python3-oslo.service
Requires:       python3-oslo.utils
Requires:       python3-pbr
Requires:       python3-six

%description -n   python3-neutron-dynamic-routing
Neutron is a virtual network service for Openstack.
This is a dynamic routing service plugin for Openstack Neutron (Networking) service.

This package contains the Neutron Dynamic Routing Python library.

%package bgp-dragent
Summary:        Neutron Dynamic Routing Agent
Group:          Development/Languages/Python
Requires:       openstack-neutron-dynamic-routing = %{version}-%{release}
Provides:       openstack-neutron-bgp-dragent = %{version}-%{release}

%description bgp-dragent
Provides BGP dynamic routing services for Neutron.

%package doc
Summary:        OpenStack Neutron Dynamic Routing Service - Documentation
Group:          Documentation/HTML
BuildRequires:  python3-Sphinx
BuildRequires:  python3-mock
BuildRequires:  python3-openstackdocstheme
BuildRequires:  python3-sphinxcontrib-svg2pdfconverter

%description doc
Neutron is a virtual network service for Openstack.
This is a dynamic routing service plugin for Openstack Neutron (Networking) service.

This package contains the documentation.

%prep
%autosetup -p1 -n neutron-dynamic-routing-17.1.0.dev3
%py_req_cleanup

%build
%py3_build

# generate html docs
PYTHONPATH=$PWD PBR_VERSION=17.1.0.dev3 %sphinx_build --keep-going -b html doc/source doc/build/html
# remove the Sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}

%install
%py3_install

### configuration files
PYTHONPATH=. oslo-config-generator --config-file etc/oslo-config-generator/bgp_dragent.ini

install -p -D -m 644 etc/bgp_dragent.ini.sample %{buildroot}%{_sysconfdir}/neutron/bgp_dragent.ini

### systemd
install -p -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/openstack-neutron-bgp-dragent.service

%post
%systemd_post openstack-neutron-bgp-dragent.service

%preun
%systemd_preun openstack-neutron-bgp-dragent.service

%postun
%systemd_postun_with_restart openstack-neutron-bgp-dragent.service

%files
%license LICENSE
%doc README.rst
%config(noreplace) %{_sysconfdir}/neutron/bgp_dragent.ini

%files -n python3-neutron-dynamic-routing
%license LICENSE
%{python3_sitelib}/neutron_dynamic_routing
%{python3_sitelib}/neutron_dynamic_routing-*.egg-info

%files bgp-dragent
%license LICENSE
%{_bindir}/neutron-bgp-dragent
%{_unitdir}/openstack-neutron-bgp-dragent.service

%files doc
%license LICENSE
%doc doc/build/html

%changelog