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

# spec file for package openstack-horizon-plugin-karbor-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-karbor-ui
Version:        1.1.1~dev3
Release:        0
Summary:        The Karbor Dashboard
License:        Apache-2.0
Group:          Development/Languages/Python
Source0:        karbor-dashboard-stable-rocky.tar.gz
BuildRequires:  fdupes
BuildRequires:  openstack-dashboard
BuildRequires:  openstack-macros
BuildRequires:  python-karborclient
BuildRequires:  python-pbr
Requires:       python-horizon-plugin-karbor-ui = %{version}
BuildArch:      noarch

The Karbor UI Horizon plugin adds Karbor panel to the OpenStack dashboard.

%package -n    python-horizon-plugin-karbor-ui
Summary:        The Karbor Dashboard - Python module
Group:          Development/Languages/Python
Requires:       python-Babel
Requires:       python-Django
Requires:       python-PyYAML
Requires:       python-django-babel
Requires:       python-django-pyscss
Requires:       python-django_compressor
Requires:       python-karborclient
Requires:       python-pbr

%description -n python-horizon-plugin-karbor-ui
The Karbor UI Horizon plugin adds Karbor panel to the OpenStack dashboard.

%autosetup -n karbor-dashboard-1.1.1.dev3



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

%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-karbor-ui
%doc README.rst
%license LICENSE

openSUSE Build Service is sponsored by