From 47aa018a841df3f8422168cfbc1cd48089e77ee5 Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Mon, 5 Mar 2012 12:15:24 -0500 Subject: [PATCH 1/3] add MANIFEST.in, ansible.spec, modify setup.py for rpm pkg creation --- MANIFEST.in | 3 +++ ansible.spec | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 6 +++--- 3 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 MANIFEST.in create mode 100644 ansible.spec diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 00000000000..607c4271ae9 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,3 @@ +include README.md AUTHORS.md ansible.spec +recursive-include docs * +include Makefile diff --git a/ansible.spec b/ansible.spec new file mode 100644 index 00000000000..8a9516c1596 --- /dev/null +++ b/ansible.spec @@ -0,0 +1,48 @@ +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} + +Summary: Minimal SSH command and control +Name: ansible +Version: 1.0 +Release: 1 +Source0: ansible-%{version}.tar.gz +License: MIT +Group: Development/Libraries +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +Prefix: %{_prefix} +BuildArch: noarch +Url: http://github.com/mpdehaan/ansible/ +BuildRequires: asciidoc + +%description +Ansible is a extra-simple tool/API for doing 'parallel remote things' over SSH +executing commands, running "modules", or executing larger 'playbooks' that +can serve as a configuration management or deployment system. + +%prep +%setup -n %{name}-%{version} + +%build +python setup.py build +make docs + +%install +python setup.py install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES +mkdir -p $RPM_BUILD_ROOT/etc/ansible/ + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%doc README.md AUTHORS.md PKG-INFO +%defattr(-,root,root) +%{_mandir}/man1/*.gz +%{_mandir}/man5/*.gz +%{python_sitelib}/* +%{_bindir}/ansible* +%{_datadir}/ansible/* +%{_sysconfdir}/ansible/ + +%changelog +* Mon Mar 5 2012 Seth Vidal +- spec file + diff --git a/setup.py b/setup.py index e501072ee28..013f49c3a95 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup(name='ansible', author='Michael DeHaan', author_email='michael.dehaan@gmail.com', url='http://github.com/mpdehaan/ansible/', - license='MIT', + license='GPLv3', package_dir = { 'ansible' : 'lib/ansible' }, packages=[ 'ansible', @@ -25,10 +25,10 @@ setup(name='ansible', 'library/template', 'library/git', ]), - ('man/man1', [ + ('/usr/share/man/man1', [ 'docs/man/man1/ansible.1' ]), - ('man/man5', [ + ('/usr/share/man/man5', [ 'docs/man/man5/ansible-modules.5', 'docs/man/man5/ansible-playbook.5' ]) From 11bf2a5e034b33c43fc5159bc6c5868aa914baf4 Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Mon, 5 Mar 2012 12:16:08 -0500 Subject: [PATCH 2/3] add python-paramiko dependency --- ansible.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible.spec b/ansible.spec index 8a9516c1596..1cc92daaa64 100644 --- a/ansible.spec +++ b/ansible.spec @@ -12,6 +12,7 @@ Prefix: %{_prefix} BuildArch: noarch Url: http://github.com/mpdehaan/ansible/ BuildRequires: asciidoc +Requires: python-paramiko %description Ansible is a extra-simple tool/API for doing 'parallel remote things' over SSH From 78566946c0638d042ea2fabd58fe9f2ea6b81af3 Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Mon, 5 Mar 2012 12:24:01 -0500 Subject: [PATCH 3/3] correct license --- ansible.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible.spec b/ansible.spec index 1cc92daaa64..c9aa6516209 100644 --- a/ansible.spec +++ b/ansible.spec @@ -5,7 +5,7 @@ Name: ansible Version: 1.0 Release: 1 Source0: ansible-%{version}.tar.gz -License: MIT +License: GPLv3 Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Prefix: %{_prefix}