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

# spec file for package openstack-horizon-plugin-neutron-fwaas-ui
# 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

%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-fwaas-ui
Version:        1.5.1~dev6
Release:        0
Summary:        Neutron FWaaS management plugin for Horizon
License:        Apache-2.0
Group:          Development/Languages/Python
Source0:        neutron-fwaas-dashboard-stable-rocky.tar.gz
BuildRequires:  fdupes
BuildRequires:  gettext
BuildRequires:  openstack-dashboard
BuildRequires:  openstack-macros
BuildRequires:  python-ddt
BuildRequires:  python-django-nose
BuildRequires:  python-mock
BuildRequires:  python-mox3
BuildRequires:  python-openstackdocstheme
BuildRequires:  python-pbr
BuildRequires:  python-python-subunit
BuildRequires:  python-reno
BuildRequires:  python-testrepository
BuildRequires:  python-testscenarios
BuildRequires:  python-testtools
Requires:       python-horizon-plugin-neutron-fwaas-ui = %{version}
BuildArch:      noarch

OpenStack Neutron FWaaS management plugin for Horizon.

%package -n    python-horizon-plugin-neutron-fwaas-ui
Summary:        Neutron FWaaS Management Plugin for Horizon - Python module
Group:          Development/Languages/Python
Requires:       python-Django
Requires:       python-neutronclient
Requires:       python-pbr

%description -n python-horizon-plugin-neutron-fwaas-ui
OpenStack Neutron FWaaS management plugin for Horizon.

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

%package test
Summary:        Neutron FWaaS Management Plugin for Horizon - Testsuite
Group:          Development/Languages/Python
Requires:       python-ddt
Requires:       python-django-nose
Requires:       python-mock
Requires:       python-mox3
Requires:       python-openstackdocstheme
Requires:       python-python-subunit
Requires:       python-reno
Requires:       python-testrepository
Requires:       python-testscenarios
Requires:       python-testtools

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

%autosetup -n neutron-fwaas-dashboard-1.5.1.dev6

pushd neutron_fwaas_dashboard
PYTHONPATH=%{http_dashboard_dir} python ../ compilemessages

PYTHONPATH=%{http_dashboard_dir} python test neutron_fwaas_dashboard --settings=neutron_fwaas_dashboard.test.settings


install -m 0755 -d %{buildroot}%{http_dashboard_dir}/openstack_dashboard/enabled/
cp -a neutron_fwaas_dashboard/enabled/_70*.py* %{buildroot}%{http_dashboard_dir}/openstack_dashboard/enabled/
install -m 0755 -d %{buildroot}%{http_dashboard_dir}/openstack_dashboard/conf/
cp -a etc/neutron-fwaas-policy.json %{buildroot}%{http_dashboard_dir}/openstack_dashboard/conf/

%fdupes %{buildroot}%{python2_sitelib}
%fdupes %{buildroot}%{http_dashboard_dir}

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

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

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

%files -n python-horizon-plugin-neutron-fwaas-ui
%doc README.rst
%license LICENSE
%exclude %{python_sitelib}/neutron_fwaas_dashboard/test*

%files test

openSUSE Build Service is sponsored by