File openstack-heat-cfntools.spec of Package openstack-heat-cfntools
#
# spec file for package openstack-heat-cfntools
#
# Copyright (c) 2014 SUSE LINUX Products 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/
#
Name: openstack-heat-cfntools
Version: 1.2.7
Release: 0
Summary: Openstack Orchestration Tools for Clients (Heat)
License: Apache-2.0
Group: System/Management
Url: https://launchpad.net/heat-cfntools
Source: http://tarballs.openstack.org/heat-cfntools/heat-cfntools-%{version}.tar.gz
Patch0: 0001-Add-support-for-package-install-via-zypper.patch
BuildRequires: fdupes
BuildRequires: python-devel
BuildRequires: python-pbr > 0.5.21
# Documentation requirements:
BuildRequires: python-Sphinx
# Test requirements:
BuildRequires: python-boto >= 2.5.2
BuildRequires: python-mox3
BuildRequires: python-testrepository >= 0.0.17
BuildRequires: python-testtools >= 0.9.32
Requires: cron
Requires: curl
Requires: python >= 2.6.8
Requires: python-boto >= 2.12.0
Requires: python-heat_cfntools = %{version}
Requires: python-pbr >= 0.6
Requires: python-psutil >= 1.1.1
# Required by the user scripts
Requires: python-setuptools
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
# We need argparse installed for %post
BuildRequires: python-argparse
BuildRequires: python-discover
Requires: python-argparse
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%description
heat-cfntools contains the tools that can be installed on Heat
provisioned cloud instances to implement portions of
CloudFormation compatibility.
%package -n python-heat_cfntools
Summary: Openstack Heat CFNTools - Python module
Group: Development/Languages/Python
Provides: %{name}-test = %{version}
Obsoletes: %{name}-test < %{version}
%description -n python-heat_cfntools
This package contains the core Python module of Heat CFNTools
%prep
%setup -q -n heat-cfntools-%{version}
%patch0 -p1
%build
python setup.py build
python setup.py build_sphinx -b man && rm build/sphinx/html/.buildinfo
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%fdupes %{buildroot}%{python_sitelib}/heat_cfntools
install -d %{buildroot}%{_mandir}/man1
install -m 0644 build/sphinx/man/cfn-*.1 %{buildroot}%{_mandir}/man1
install -d -m 0755 %{buildroot}/opt/aws
%check
testr init && testr run --parallel
%post
%{_bindir}/cfn-create-aws-symlinks
%files
%defattr(-,root,root)
%doc LICENSE README.rst build/sphinx/html
%{_bindir}/cfn-create-aws-symlinks
%{_mandir}/man1/cfn-create-aws-symlinks.1.gz
%{_bindir}/cfn-hup
%{_mandir}/man1/cfn-hup.1.gz
%{_bindir}/cfn-init
%{_mandir}/man1/cfn-init.1.gz
%{_bindir}/cfn-push-stats
%{_mandir}/man1/cfn-push-stats.1.gz
%{_bindir}/cfn-signal
%{_mandir}/man1/cfn-signal.1.gz
%{_bindir}/cfn-get-metadata
%{_mandir}/man1/cfn-get-metadata.1.gz
%dir /opt/aws
%files -n python-heat_cfntools
%defattr(-,root,root)
%doc LICENSE
%{python_sitelib}/heat_cfntools
%{python_sitelib}/heat_cfntools-%{version}-py%{py_ver}.egg-info
%changelog