Blob Blame History Raw
%global archive_name ansible-inventory-grapher
%global lib_name ansibleinventorygrapher

Name:           %{archive_name}
Version:        2.1.0
Release:        2%{?dist}
Summary:        Creates graphs representing ansible inventory

License:        GPLv3+
URL:            http://github.com/willthames/ansible-inventory-grapher
Source0:        https://github.com/willthames/ansible-inventory-grapher/archive/v%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python2-devel
BuildRequires:  python-setuptools
BuildRequires:  ansible
Requires:       ansible

%description
ansible-inventory-grapher creates a dot file suitable for use by graphviz.


%prep
%autosetup -n %{archive_name}-%{version}
rm -rf *.egg-info
sed -i -e '/^#!\//, 1d' lib/ansibleinventorygrapher/__init__.py

find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'

%build
%py2_build

%install
%py2_install

%check
%{__python2} setup.py test

%files
%doc README.md
%license LICENSE.txt
%{_bindir}/%{name}
%{python2_sitelib}/%{lib_name}
%{python2_sitelib}/ansible_inventory_grapher-%{version}-py2.*.egg-info

%changelog
* Tue May 10 2016 Parag Nemade <pnemade AT redhat DOT com> - 2.1.0-2
- Use github source that provided license and test files

* Mon May 09 2016 Parag Nemade <pnemade AT redhat DOT com> - 2.1.0-1
- Update to 2.1.0

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Mon Oct 27 2014 Parag Nemade <pnemade AT redhat DOT com> - 1.0.1-2
- Rename to ansible-inventory-grapher

* Sat Oct 25 2014 Parag Nemade <pnemade AT redhat DOT com> - 1.0.1-1
- Update to 1.0.1

* Thu Sep 25 2014 Parag Nemade <pnemade AT redhat DOT com> - 1.0.0-1
- Initial packaging