File openstack-horizon-plugin-neutron-vpnaas-ui.spec of Package openstack-horizon-plugin-neutron-vpnaas-ui

# spec file for package openstack-horizon-plugin-neutron-vpnaas-ui
# Copyright (c) 2023 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

%if 0%{?rhel} || 0%{?fedora}
%global http_dashboard_dir %{_datarootdir}/openstack-dashboard
%global http_dashboard_dir /srv/www/openstack-dashboard
Name:           openstack-horizon-plugin-neutron-vpnaas-ui
Version:        3.0.1~dev4
Release:        0
Summary:        Neutron VPNaaS management plugin for Horizon
License:        Apache-2.0
Group:          Development/Languages/Python
Source0:        neutron-vpnaas-dashboard-stable-victoria.tar.gz
BuildRequires:  fdupes
BuildRequires:  openstack-dashboard
BuildRequires:  openstack-macros
BuildRequires:  python3-django-nose
BuildRequires:  python3-mock
BuildRequires:  python3-openstackdocstheme
BuildRequires:  python3-pbr
BuildRequires:  python3-python-subunit
BuildRequires:  python3-reno
BuildRequires:  python3-testrepository
BuildRequires:  python3-testscenarios
BuildRequires:  python3-testtools
Requires:       python-horizon-plugin-neutron-vpnaas-ui = %{version}
BuildArch:      noarch

OpenStack Neutron VPNaaS management plugin for Horizon.

%package -n    python-horizon-plugin-neutron-vpnaas-ui
Summary:        Neutron VPNaaS Management Plugin for Horizon - Python module
Requires:       python3-Django
Requires:       python3-neutronclient
Requires:       python3-pbr

%description -n python-horizon-plugin-neutron-vpnaas-ui
OpenStack Neutron VPNaaS management plugin for Horizon.

This package contains the core Python module of the neutron-vpnaas-ui.

%package test
Summary:        Neutron VPNaaS Management Plugin for Horizon - Testsuite
Requires:       python3-django-nose
Requires:       python3-mock
Requires:       python3-openstackdocstheme
Requires:       python3-python-subunit
Requires:       python3-reno
Requires:       python3-testrepository
Requires:       python3-testscenarios
Requires:       python3-testtools

%description test
OpenStack Neutron VPNaaS management plugin for Horizon.
It is used to verify the functionality of the Neutron VPNaaS UI Plugin.

%autosetup -n neutron-vpnaas-dashboard-3.0.1.dev4


PYTHONPATH=%{http_dashboard_dir} python3 test neutron_vpnaas_dashboard --settings=neutron_vpnaas_dashboard.test.settings


install -m 0755 -d %{buildroot}%{http_dashboard_dir}/openstack_dashboard/enabled/
cp -a neutron_vpnaas_dashboard/enabled/_71*.py* %{buildroot}%{http_dashboard_dir}/openstack_dashboard/enabled/

%fdupes %{buildroot}%{python3_sitelib}
%fdupes %{buildroot}%{http_dashboard_dir}

su %{apache_user} -s /bin/sh -c "python3 %{http_dashboard_dir}/ collectstatic --noinput --clear > /dev/null"

su %{apache_user} -s /bin/sh -c "python3 %{http_dashboard_dir}/ collectstatic --noinput --clear > /dev/null"

%doc ChangeLog CONTRIBUTING.rst README.rst
%license LICENSE

%files -n python-horizon-plugin-neutron-vpnaas-ui
%doc README.rst
%license LICENSE
%exclude %{python3_sitelib}/neutron_vpnaas_dashboard/test*

%files test

openSUSE Build Service is sponsored by