File openstack-horizon-plugin-designate-ui.spec of Package openstack-horizon-plugin-designate-ui
#
# spec file for package openstack-horizon-plugin-designate-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 7.0.1.dev8
Name: openstack-horizon-plugin-designate-ui
Version: 7.0.1~dev8
Release: 0
Summary: Designate UI plugin for Horizon
License: Apache-2.0
Group: System/Management
URL: https://bugs.launchpad.net/designate
Source: http://tarballs.openstack.org/designate-dashboard/designate-dashboard-stable-rocky.tar.gz
BuildRequires: fdupes
BuildRequires: openstack-dashboard
BuildRequires: openstack-suse-macros
BuildRequires: openstack-suse-sudo
BuildRequires: python-base
BuildRequires: python-designateclient
BuildRequires: python-pbr
Requires: openstack-dashboard
Requires: python-horizon-plugin-designate-ui = %{version}
Requires(post): python-horizon-plugin-designate-ui = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
OpenStack DNS As A Service (Designate) Horizon Plugin
%package -n python-horizon-plugin-designate-ui
Summary: OpenStack DNS As A Service (Designate) Horizon Plugin - Python module
Group: Development/Languages/Python
Requires: python >= 2.7
Requires: python-Babel >= 2.3.4
Requires: python-designateclient >= 2.7.0
Requires: python-oslo.log >= 3.36.0
%description -n python-horizon-plugin-designate-ui
OpenStack DNS As A Service (Designate) Horizon Plugin
This package contains the core Python module of the designate dashboard.
%package test
Summary: Designate Plugin for Horizon - Testsuite
Group: Development/Languages/Python
Requires: %{name} = %{version}
Requires: python-django-nose >= 1.4.4
Requires: python-django_compressor >= 2.0
Requires: python-horizon >= 14.0.0.0~xbeta2
Requires: python-mock >= 2.0.0
Requires: python-mox3 >= 0.20.0
Requires: python-nose >= 1.3.7
Requires: python-oslo.config >= 5.2.0
Requires: python-testrepository >= 0.0.18
Requires: python-testtools >= 2.2.0
%description test
Designate Dashboard Plugin for Horizon testsuite. It is used to verify the
functionality of the Designate Dashboard Plugin.
%prep
%setup -q -n designate-dashboard-%{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
for i in designatedashboard/enabled/_17*; do
install -m 644 -p $i %{buildroot}/srv/www/openstack-dashboard/openstack_dashboard/enabled/
done
### misc
%fdupes %{buildroot}%{python_sitelib}/designatedashboard
%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)
%doc ChangeLog README.rst
%license LICENSE
/srv/www/openstack-dashboard/openstack_dashboard/enabled
%files -n python-horizon-plugin-designate-ui
%defattr(-,root,root,-)
%license LICENSE
%{python_sitelib}/designatedashboard/
%{python_sitelib}/designate_dashboard-*.egg-info
%exclude %{python_sitelib}/designatedashboard/test*
%files test
%defattr(-,root,root)
%license LICENSE
%{python_sitelib}/designatedashboard/test*
%changelog