File openstack-horizon-plugin-manila-ui.spec of Package openstack-horizon-plugin-manila-ui
#
# spec file for package openstack-horizon-plugin-manila-ui
#
# Copyright (c) 2023 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 https://bugs.opensuse.org/
#
%define version_unconverted 2.16.2.dev2
Name: openstack-horizon-plugin-manila-ui
Version: 2.16.2~dev2
Release: 0
Summary: Manila management plugin for Horizon
License: Apache-2.0
Group: System/Management
URL: https://launchpad.net/manila-ui
Source: http://tarballs.openstack.org/manila-ui/manila-ui-stable-rocky.tar.gz
BuildRequires: fdupes
BuildRequires: openstack-dashboard
BuildRequires: openstack-suse-macros
BuildRequires: openstack-suse-sudo
BuildRequires: python-base
BuildRequires: python-manilaclient
Requires: openstack-dashboard
Requires: openstack-suse-sudo
Requires: python >= 2.7
Requires: python-Babel >= 2.3.4
Requires: python-Django >= 1.11
Requires: python-django_compressor >= 1.4
Requires: python-horizon-plugin-manila-ui = %{version}
Requires(post): python-horizon-plugin-manila-ui = %{version}
Requires: python-iso8601 >= 0.1.11
Requires: python-keystoneclient >= 3.8.0
Requires: python-manilaclient >= 1.16.0
Requires: python-pbr >= 2.0.0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
OpenStack shared file system server (manila) management plugin for Horizon.
%package -n python-horizon-plugin-manila-ui
Summary: Manila Management Plugin for Horizon - Python module
Group: Development/Languages/Python
Requires: python >= 2.7
Requires: python-manilaclient >= 1.16.0
Requires: python-oslo.utils >= 3.33.0
Requires: python-six >= 1.10.0
%description -n python-horizon-plugin-manila-ui
OpenStack shared file system server (manila) management plugin for Horizon.
This package contains the core Python module of the manila-ui.
%package test
Summary: Manila Management Plugin for Horizon - Testsuite
Group: Development/Languages/Python
Requires: %{name} = %{version}
Requires: python-django-nose >= 1.4.4
Requires: python-horizon >= 14.0.0.0~xbeta2
Requires: python-mock >= 2.0.0
Requires: python-python-subunit >= 1.0.0
Requires: python-testrepository >= 0.0.18
Requires: python-testscenarios >= 0.4
Requires: python-testtools >= 2.2.0
%description test
OpenStack Manila UI Plugin for Horizon testsuite. It is used to verify the
functionality of the Manila UI Plugin.
%prep
%setup -q -n manila-ui-%{version_unconverted}
%openstack_cleanup_prep
%build
python setup.py build
%install
python setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot}
mkdir -p %{buildroot}/srv/www/openstack-dashboard/openstack_dashboard/enabled/
install -m 0755 -d %{buildroot}/srv/www/openstack-dashboard/openstack_dashboard/dashboards/
install -m 0755 -d %{buildroot}/srv/www/openstack-dashboard/openstack_dashboard/dashboards/enabled
# include *.pyc files for proper uninstall, skip __init__.py* to avoid conflicts
cp -a %{buildroot}%{python_sitelib}/manila_ui/local/enabled/_*manila*.py* %{buildroot}/srv/www/openstack-dashboard/openstack_dashboard/enabled/
### misc
%fdupes %{buildroot}%{python_sitelib}/manila_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 LICENSE
%files -n python-horizon-plugin-manila-ui
%defattr(-,root,root,-)
%license LICENSE
%{python_sitelib}/manila_ui/
%{python_sitelib}/manila_ui-*.egg-info
%exclude %{python_sitelib}/manila_ui/test*
%files test
%defattr(-,root,root)
%{python_sitelib}/manila_ui/test*
%changelog