File openstack-horizon-plugin-magnum-ui.spec of Package openstack-horizon-plugin-magnum-ui

#
# spec file for package openstack-horizon-plugin-magnum-ui
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#


%define version_unconverted 2.1.2.dev10

Name:           openstack-horizon-plugin-magnum-ui
Version:        2.1.2~dev10
Release:        0
Summary:        Magnum management plugin for Horizon
License:        Apache-2.0
Group:          System/Management
Url:            https://launchpad.net/magnum-ui
Source:         http://tarballs.openstack.org/magnum-ui/magnum-ui-stable-newton.tar.gz
Patch10:        0001-Drop-support-for-coe-swarm.patch
BuildRequires:  fdupes
BuildRequires:  openstack-dashboard
BuildRequires:  openstack-suse-macros
BuildRequires:  openstack-suse-sudo
BuildRequires:  python-base
BuildRequires:  python-magnumclient
BuildRequires:  python-pbr
Requires:       python-horizon-plugin-magnum-ui = %{version}
Requires(post): python-horizon-plugin-magnum-ui = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
OpenStack container orchestration engines (Magnum) management
plugin for Horizon.

%package -n python-horizon-plugin-magnum-ui
Summary:        Manila Management Plugin for Horizon - Python module
Group:          Development/Languages/Python
Requires:       python >= 2.7
Requires:       python-Babel >= 2.3.4
Requires:       python-Django >= 1.8
Requires:       python-XStatic >= 1.0.0
Requires:       python-XStatic-Angular >= 1.3.7
Requires:       python-XStatic-Angular-Bootstrap >= 0.11.0.2
Requires:       python-XStatic-Angular-Gettext >= 2.1.0.2
Requires:       python-XStatic-Angular-lrdragndrop >= 1.0.2.2
Requires:       python-XStatic-Bootstrap-Datepicker >= 1.3.1.0
Requires:       python-XStatic-Bootstrap-SCSS >= 3
Requires:       python-XStatic-D3 >= 3.1.6.2
Requires:       python-XStatic-Font-Awesome >= 4.3.0
Requires:       python-XStatic-Hogan >= 2.0.0.2
Requires:       python-XStatic-JQuery-Migrate >= 1.2.1.1
Requires:       python-XStatic-JQuery.TableSorter >= 2.14.5.1
Requires:       python-XStatic-JQuery.quicksearch >= 2.0.3.1
Requires:       python-XStatic-JSEncrypt >= 2.0.0.2
Requires:       python-XStatic-Jasmine >= 2.1.2.0
Requires:       python-XStatic-Magic-Search >= 0.2.5.1
Requires:       python-XStatic-Rickshaw >= 1.5.0
Requires:       python-XStatic-Spin >= 1.2.5.2
Requires:       python-XStatic-jQuery >= 1.7.2
Requires:       python-XStatic-jquery-ui >= 1.10.1
Requires:       python-XStatic-smart-table >= 1.4.5.3
Requires:       python-XStatic-term.js >= 0.0.4
Requires:       python-django-babel >= 0.5.1
Requires:       python-django-pyscss >= 2.0.2
Requires:       python-django_compressor >= 1.4
Requires:       python-django_openstack_auth >= 1.4.0
Requires:       python-magnumclient >= 2.0.0

%description -n python-horizon-plugin-magnum-ui
OpenStack container orchestration engines (Magnum) management
plugin for Horizon.

This package contains the core Python module of the magnum-ui.

%package test
Summary:        Magnum Management Plugin for Horizon - Testsuite
Group:          Development/Languages/Python
Requires:       %{name} = %{version}
Requires:       python-django-nose >= 1.4.4
Requires:       python-horizon
Requires:       python-mock >= 2.0
Requires:       python-python-subunit >= 0.0.18
Requires:       python-testtools >= 1.4.0

%description test
OpenStack Magnum UI Plugin for Horizon testsuite. It is used to verify the
functionality of the Magnum UI Plugin.

%prep
%setup -q -n magnum-ui-%{version_unconverted}
%patch10 -p1
%openstack_cleanup_prep

%build
python setup.py build

%install
python setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot}

install -m 0755 -d %{buildroot}/srv/www/openstack-dashboard/openstack_dashboard/enabled/
cp -a magnum_ui/enabled/_1370_project_container_infra_panel_group.py %{buildroot}/srv/www/openstack-dashboard/openstack_dashboard/enabled/
cp -a magnum_ui/enabled/_1371_project_container_infra_clusters_panel.py %{buildroot}/srv/www/openstack-dashboard/openstack_dashboard/enabled/
cp -a magnum_ui/enabled/_1372_project_container_infra_cluster_templates_panel.py %{buildroot}/srv/www/openstack-dashboard/openstack_dashboard/enabled/

### misc
%fdupes %{buildroot}%{python_sitelib}/magnum_ui

%post
su wwwrun -s /bin/sh -c "python /srv/www/openstack-dashboard/manage.py collectstatic --noinput --clear > /dev/null"

%postun
su wwwrun -s /bin/sh -c "python /srv/www/openstack-dashboard/manage.py collectstatic --noinput --clear > /dev/null"

%files
%defattr(-,root,root)
/srv/www/openstack-dashboard/openstack_dashboard/enabled
%doc ChangeLog README.rst LICENSE

%files -n python-horizon-plugin-magnum-ui
%defattr(-,root,root,-)
%doc LICENSE
%{python_sitelib}/magnum_ui/
%{python_sitelib}/magnum_ui-*.egg-info
%exclude %{python_sitelib}/magnum_ui/test*

%files test
%defattr(-,root,root)
%{python_sitelib}/magnum_ui/test*

%changelog
openSUSE Build Service is sponsored by