File openstack-horizon-plugin-murano-ui.spec of Package openstack-horizon-plugin-murano-ui
#
# spec file for package openstack-horizon-plugin-murano-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/
#
%global sname murano-dashboard
%if 0%{?rhel} || 0%{?fedora}
%global rdo 1
%global http_dashboard_dir %{_datarootdir}/openstack-dashboard
%else
%global http_dashboard_dir /srv/www/openstack-dashboard
%endif
Name: openstack-horizon-plugin-murano-ui
Version: 3.2.0
Release: 0
Summary: The Murano Dashboard
License: Apache-2.0
Group: Development/Languages/Python
Url: https://wiki.openstack.org/wiki/Murano
Source0: https://pypi.io/packages/source/m/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: openstack-dashboard
BuildRequires: openstack-macros
BuildRequires: python-muranoclient >= 0.8.2
BuildRequires: python-pbr >= 2.0.0
Requires: python-horizon-plugin-murano-ui = %{version}
BuildArch: noarch
%description
The Murano UI Horizon plugin adds Murano panel to the OpenStack dashboard.
%package -n python-horizon-plugin-murano-ui
Summary: The Murano Dashboard - Python module
Group: Development/Languages/Python
Requires: python-Babel >= 2.3.4
Requires: python-Django >= 1.8
Requires: python-PyYAML >= 3.10.0
Requires: python-beautifulsoup4 >= 4.6.0
Requires: python-django-babel >= 0.5.1
Requires: python-django-formtools
Requires: python-muranoclient >= 0.8.2
Requires: python-oslo.log >= 3.22.0
Requires: python-pbr >= 2.0.0
Requires: python-semantic_version >= 2.3.1
Requires: python-yaql >= 1.1.0
%description -n python-horizon-plugin-murano-ui
The Murano UI Horizon plugin adds Murano panel to the OpenStack dashboard.
%prep
%autosetup -n %{sname}-%{version}
%py_req_cleanup
%build
%py2_build
%install
%py2_install
install -m 0755 -d %{buildroot}%{http_dashboard_dir}/openstack_dashboard/enabled/
cp -a muranodashboard/local/enabled/*.py %{buildroot}%{http_dashboard_dir}/openstack_dashboard/enabled/
install -m 0755 -d %{buildroot}%{http_dashboard_dir}/openstack_dashboard/local/local_settings.d/
cp -a muranodashboard/local/local_settings.d/_50_murano.py %{buildroot}%{http_dashboard_dir}/openstack_dashboard/local/local_settings.d/_50_murano.py.example
install -m 0755 -d %{buildroot}%{http_dashboard_dir}/openstack_dashboard/conf/
cp -a muranodashboard/conf/murano_policy.json %{buildroot}%{http_dashboard_dir}/openstack_dashboard/conf/
%fdupes %{buildroot}%{python2_sitelib}
%fdupes %{buildroot}%{http_dashboard_dir}
%post
su %{apache_user} -s /bin/sh -c "python %{http_dashboard_dir}/manage.py collectstatic --noinput --clear > /dev/null"
%postun
su %{apache_user} -s /bin/sh -c "python %{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/*.py
%{http_dashboard_dir}/openstack_dashboard/local/local_settings.d/_50_murano.py.example
%{http_dashboard_dir}/openstack_dashboard/conf/murano_policy.json
%files -n python-horizon-plugin-murano-ui
%doc README.rst
%license LICENSE
%{python2_sitelib}/muranodashboard
%{python2_sitelib}/murano_dashboard-*.egg-info
%exclude %{http_dashboard_dir}/openstack_dashboard/enabled/*.pyc
%exclude %{http_dashboard_dir}/openstack_dashboard/enabled/*.pyo
%changelog