File ansible.spec of Package ansible

# spec file for package ansible
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright 2013 by Lars Vogdt
# Copyright 2014 by Boris Manojlovic
# 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

Name:           ansible
Release:        0
Summary:        Radically simple IT automation
License:        GPL-3.0
Group:          Development/Languages/Python

Source99:       ansible-rpmlintrc

%if 0%{?suse_version}
%if 0%{?suse_version} >= 01130
BuildRequires:  python-paramiko
Requires:       python-paramiko
BuildRequires:  python-Jinja2
Requires:       python-Jinja2
BuildRequires:  python-PyYAML
Requires:       python-PyYAML
BuildRequires:  python-pycrypto >= 2.6
Requires:       python-pycrypto >= 2.6
BuildRequires:  python-devel
BuildRequires:  python-setuptools
Requires:       python-setuptools
Recommends:     python-dopy
Recommends:     python-pywinrm
Recommends:     sshpass
Recommends:     python-dnspython

# RHEL == 6
%if 0%{?rhel} == 6
Requires:       python-crypto2.6
# RHEL > 5
%if 0%{?rhel} && 0%{?rhel} >= 5
BuildRequires:  python-setuptools
BuildRequires:  python2-devel
Requires:       PyYAML
Requires:       python-httplib2
Requires:       python-jinja2
Requires:       python-keyczar
Requires:       python-paramiko
Requires:       python-setuptools

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%if 0%{?suse_version} && 0%{?suse_version} <= 1110 || 0%{?rhel} == 5
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
BuildArch:      noarch

Ansible is a radically simple IT automation system.  It handles
configuration-management, application deployment, cloud provisioning, ad-hoc
task-execution, and multinode orchestration - including trivializing things
like zero downtime rolling updates with load balancers.

%setup -q -n ansible-%{version}

python build

python install --prefix=%{_prefix} --root=%{buildroot}

mkdir -p %{buildroot}/etc/ansible/
cp examples/hosts %{buildroot}/etc/ansible/
cp examples/ansible.cfg %{buildroot}/etc/ansible/
mkdir -p %{buildroot}/%{_mandir}/man1/
cp -v docs/man/man1/*.1 %{buildroot}/%{_mandir}/man1/
mkdir -p %{buildroot}/%{_datadir}/ansible

%dir %{_sysconfdir}/ansible
%config(noreplace) %{_sysconfdir}/ansible/ansible.cfg
%config(noreplace) %{_sysconfdir}/ansible/hosts

openSUSE Build Service is sponsored by