File openstack-refstack.spec of Package openstack-refstack
#
# spec file for package openstack-refstack
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2013 B1 Systems GmbH, Vohburg, 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/
#
%define component refstack
Name: openstack-%{component}
Version: 0.1.dev233.gba3168e
Release: 0
Summary: OpenStack Compliance Test Suite (RefStack)
License: Apache-2.0
Group: System/Management
Url: https://launchpad.net/refstack
Source0: %{component}-%{version}.tar.gz
%if 0%{?suse_version} > 1230
Source10: %name.conf
BuildRequires: systemd
%endif
BuildRequires: crudini
BuildRequires: fdupes
BuildRequires: openstack-suse-macros
BuildRequires: python-base
BuildRequires: python-pbr
%if 0%{?suse_version} > 1110
Requires(pre): pwdutils
%else
Requires(pre): shadow-utils
%endif
Requires: %name-test = %{version}
Requires: git-core
Requires: python >= 2.6.8
Requires: python-refstack = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%description
This is a set of tests for compliance testing an OpenStack installation.
%package test
Summary: OpenStack Compliance Test Suite (RefStack) - Test Package
Group: Development/Languages/Python
Requires: %{name} = %{version}
Requires: python-testrepository >= 0.0.18
%description test
This is a set of compliance tests to be run against a live OpenStack installation.
%package -n python-refstack
Summary: OpenStack Compliance Test Suite (RefStack) - Python module
Group: Development/Languages/Python
Requires: python >= 2.6.8
Requires: python-Flask >= 0.10.1
Requires: python-Flask-Admin >= 1.0.7
Requires: python-Flask-Login >= 0.1.3
Requires: python-Flask-Mail >= 0.8.2
#Requires: python-Flask-OpenID >= 1.1.1
Requires: python-Flask-Principal >= 0.3.5
Requires: python-Flask-Restless >= 0.12.0
Requires: python-Flask-SQLAlchemy >= 1.0
Requires: python-Flask-Security >= 1.6.3
#Requires: python-Flask-WTF >= 0.8.3
Requires: python-Jinja2 >= 2.7.1
Requires: python-SQLAlchemy >= 0.8.3
Requires: python-WTForms >= 1.0.4
Requires: python-Werkzeug >= 0.8.3
Requires: python-alembic >= 0.5.0
Requires: python-gear >= 0.5.4
Requires: python-gunicorn >= 0.17.4
Requires: python-pyOpenSSL >= 0.13
Requires: python-pycrypto >= 2.6
Requires: python-python-keystoneclient
Requires: python-python-openid >= 2.2.5
Requires: python-requests >= 1.2.3
%description -n python-refstack
This package contains the core Python module of OpenStack RefStack.
%prep
%setup -q -n %{component}-%{version}
%openstack_cleanup_prep
%build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
install -d -m 755 %{buildroot}%{_localstatedir}/lib/refstack
install -d -m 700 %{buildroot}%{_localstatedir}/run/refstack
%if 0%{?suse_version} > 1230
install -D -m 644 %{SOURCE10} %{buildroot}/%_tmpfilesdir/%name.conf
%endif
install -d -m 755 %{buildroot}%{_sysconfdir}/refstack
install -m 644 refstack.cfg %{buildroot}%{_sysconfdir}/refstack/refstack.cfg
%fdupes %{buildroot}%{python_sitelib}/%{component}
### test subpackage
%openstack_test_package_install
%files
%defattr(-,root,root)
#%doc LICENSE
%dir %{_sysconfdir}/refstack
%ghost %dir %attr(700,root,root) %{_localstatedir}/run/refstack
%if 0%{?suse_version} > 1230
%_tmpfilesdir/%name.conf
%endif
%config(noreplace) %{_sysconfdir}/refstack/refstack.cfg
%files test
%defattr(-,root,root)
%doc README.rst
%{_localstatedir}/lib/openstack-%{component}-test
/var/lib/openstack-refstack-test/
%files -n python-refstack
%defattr(-,root,root,-)
%{python_sitelib}/%{component}/
%{python_sitelib}/%{component}-*.egg-info
%changelog