%global milestone .0rc2 %global pypi_name trove-dashboard %global mod_name trove_dashboard # tests are disabled by default %bcond_with tests %{!?upstream_version: %global upstream_version %{version}%{?milestone}} Name: openstack-trove-ui Version: 6.0.0 Release: 0.1%{?milestone}%{?dist} Summary: Trove Management Dashboard License: ASL 2.0 URL: https://github.com/openstack/%{pypi_name} Source0: http://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-pbr BuildRequires: python-sphinx BuildRequires: python-oslo-sphinx Requires: python-babel Requires: openstack-dashboard Requires: python-iso8601 Requires: python-keystoneclient Requires: python-swiftclient Requires: python-troveclient %description OpenStack Dashboard plugin for Trove project %prep %setup -q -n %{pypi_name}-%{upstream_version} # Remove the requirements file so that pbr hooks don't add it # to distutils requires_dist config rm -rf {test-,}requirements.txt tools/{pip,test}-requires rm -rf %{pypi_name}.egg-info # clean up find -size 0 -not -name '__init__.py' -delete %build %{__python2} setup.py build %install %{__python2} setup.py install --skip-build --root %{buildroot} # Move config to horizon mkdir -p %{buildroot}%{_sysconfdir}/openstack-dashboard/enabled mkdir -p %{buildroot}%{_datadir}/openstack-dashboard/openstack_dashboard/local/enabled pushd . cd %{mod_name}/enabled for f in `ls _17*.py` do mv $f %{buildroot}%{_sysconfdir}/openstack-dashboard/enabled/$f ln -s %{_sysconfdir}/openstack-dashboard/enabled/$f \ %{buildroot}%{_datadir}/openstack-dashboard/openstack_dashboard/local/enabled/$f done popd # Move static files to horizon. These require that you compile them again # post install { python manage.py compress } mkdir -p %{buildroot}%{python2_sitelib}/%{mod_name}/static cp -r %{mod_name}/static/* %{buildroot}%{python2_sitelib}/%{mod_name}/static/ %check %if 0%{with tests} PYTHONPATH=/usr/share/openstack-dashboard/ ./run_tests.sh -N -P %endif %files %doc README.rst %license LICENSE %{python2_sitelib}/%{mod_name} %{python2_sitelib}/*.egg-info %{_datadir}/openstack-dashboard/openstack_dashboard/local/enabled/_1710_database_panel_group.py %{_datadir}/openstack-dashboard/openstack_dashboard/local/enabled/_1720_project_databases_panel.py %{_datadir}/openstack-dashboard/openstack_dashboard/local/enabled/_1730_project_database_backups_panel.py %{_datadir}/openstack-dashboard/openstack_dashboard/local/enabled/_1731_project_database_backups_panel.py %{_datadir}/openstack-dashboard/openstack_dashboard/local/enabled/_1740_project_database_clusters_panel.py %{_sysconfdir}/openstack-dashboard/enabled/_1710_database_panel_group.py* %{_sysconfdir}/openstack-dashboard/enabled/_1720_project_databases_panel.py* %{_sysconfdir}/openstack-dashboard/enabled/_1730_project_database_backups_panel.py* %{_sysconfdir}/openstack-dashboard/enabled/_1731_project_database_backups_panel.py* %{_sysconfdir}/openstack-dashboard/enabled/_1740_project_database_clusters_panel.py* %changelog * Tue Apr 5 2016 Haïkel Guémar - 6.0.0-0.1.0rc2 - Upstream 6.0.0 RC2 (based on Pete McKinnon initial spec)