e5aac6b7df
Change-Id: I762fe6da863ed0a532c57eae86c6c99c5f5de577
104 lines
3.6 KiB
Django/Jinja
104 lines
3.6 KiB
Django/Jinja
{% set pypi_name = 'neutron-vpnaas-dashboard' %}
|
|
{% set source = fetch_source('https://tarballs.openstack.org/neutron-vpnaas-dashboard/neutron-vpnaas-dashboard-stable-victoria.tar.gz') %}
|
|
{% set upstream_version = upstream_version() %}
|
|
{% set rpm_release = '1' %}
|
|
|
|
%if 0%{?rhel} || 0%{?fedora}
|
|
%global http_dashboard_dir %{_datarootdir}/openstack-dashboard
|
|
%else
|
|
%global http_dashboard_dir /srv/www/openstack-dashboard
|
|
%endif
|
|
Name: {{ py2name() }}
|
|
Version: {{ py2rpmversion() }}
|
|
Release: {{ py2rpmrelease() }}
|
|
Summary: Neutron VPNaaS management plugin for Horizon
|
|
License: {{ license('Apache-2.0') }}
|
|
Group: Development/Languages/Python
|
|
URL: https://launchpad.net/neutron-vpnaas-dashboard
|
|
Source0: {{ source|basename }}
|
|
BuildRequires: fdupes
|
|
BuildRequires: {{ py3('horizon') }}
|
|
BuildRequires: openstack-macros
|
|
BuildRequires: {{ py3('django-nose') }}
|
|
BuildRequires: {{ py3('mock') }}
|
|
BuildRequires: {{ py3('openstackdocstheme') }}
|
|
BuildRequires: {{ py3('pbr') }}
|
|
BuildRequires: {{ py3('python-subunit') }}
|
|
BuildRequires: {{ py3('reno') }}
|
|
BuildRequires: {{ py3('testrepository') }}
|
|
BuildRequires: {{ py3('testscenarios') }}
|
|
BuildRequires: {{ py3('testtools') }}
|
|
Requires: {{ py2pkg('horizon-plugin-neutron-vpnaas-ui') }} = %{version}
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
OpenStack Neutron VPNaaS management plugin for Horizon.
|
|
|
|
%package -n {{ py2pkg('horizon-plugin-neutron-vpnaas-ui') }}
|
|
Summary: Neutron VPNaaS Management Plugin for Horizon - Python module
|
|
Requires: {{ py3('Django') }}
|
|
Requires: {{ py3('python-neutronclient') }}
|
|
Requires: {{ py3('pbr') }}
|
|
|
|
%description -n {{ py2pkg('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: {{ py3('django-nose') }}
|
|
Requires: {{ py3('mock') }}
|
|
Requires: {{ py3('openstackdocstheme') }}
|
|
Requires: {{ py3('python-subunit') }}
|
|
Requires: {{ py3('reno') }}
|
|
Requires: {{ py3('testrepository') }}
|
|
Requires: {{ py3('testscenarios') }}
|
|
Requires: {{ py3('testtools') }}
|
|
|
|
%description test
|
|
OpenStack Neutron VPNaaS management plugin for Horizon.
|
|
It is used to verify the functionality of the Neutron VPNaaS UI Plugin.
|
|
|
|
%prep
|
|
%autosetup -n {{ pypi_name }}-{{upstream_version}}
|
|
%py_req_cleanup
|
|
|
|
%build
|
|
%{py3_build}
|
|
|
|
%check
|
|
PYTHONPATH=%{http_dashboard_dir} python3 manage.py test neutron_vpnaas_dashboard --settings=neutron_vpnaas_dashboard.test.settings
|
|
|
|
%install
|
|
%{py3_install}
|
|
|
|
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}
|
|
|
|
%post
|
|
su %{apache_user} -s /bin/sh -c "python3 %{http_dashboard_dir}/manage.py collectstatic --noinput --clear > /dev/null"
|
|
|
|
%postun
|
|
su %{apache_user} -s /bin/sh -c "python3 %{http_dashboard_dir}/manage.py collectstatic --noinput --clear > /dev/null"
|
|
|
|
%files
|
|
%doc ChangeLog CONTRIBUTING.rst README.rst
|
|
%license LICENSE
|
|
%{http_dashboard_dir}/openstack_dashboard/enabled/_71*.py*
|
|
|
|
%files -n {{ py2pkg('horizon-plugin-neutron-vpnaas-ui') }}
|
|
%doc README.rst
|
|
%license LICENSE
|
|
%{python3_sitelib}/neutron_vpnaas_dashboard/
|
|
%{python3_sitelib}/neutron_vpnaas_dashboard-*.egg-info
|
|
%exclude %{python3_sitelib}/neutron_vpnaas_dashboard/test*
|
|
|
|
%files test
|
|
%{python3_sitelib}/neutron_vpnaas_dashboard/test*
|
|
|
|
%changelog
|