2018-09-11 11:52:10 +02:00
|
|
|
#
|
|
|
|
# spec file for package ansible-lint
|
|
|
|
#
|
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
|
|
# Copyright 2018 by Lars Vogdt
|
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-09-10 08:42:53 +02:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
%global lib_name ansiblelint
|
|
|
|
|
2018-09-11 11:52:10 +02:00
|
|
|
Name: ansible-lint
|
|
|
|
Version: 3.4.23
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Summary: Best practices checker for Ansible
|
|
|
|
License: MIT
|
|
|
|
Url: https://github.com/willthames/ansible-lint
|
|
|
|
Source0: https://github.com/willthames/ansible-lint/archive/v%{version}/ansible-lint-%{version}.tar.gz
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: ansible
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildRequires: fdupes
|
|
|
|
Requires: ansible
|
|
|
|
Requires(post): update-alternatives
|
2017-09-10 08:42:53 +02:00
|
|
|
Requires(postun): update-alternatives
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
Checks playbooks for practices and behavior that could potentially be improved
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -n ansible-lint-%{version}
|
|
|
|
rm -rf *.egg-info
|
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/ansible-lint
|
|
|
|
%python_expand %fdupes -s %{buildroot}/%{$python_sitelib}
|
|
|
|
|
|
|
|
%post
|
|
|
|
%python_install_alternative ansible-lint
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative ansible-lint
|
|
|
|
|
|
|
|
%check
|
2018-01-23 08:52:32 +01:00
|
|
|
PYTHONPATH=%{buildroot}%{python2_sitelib} %__python setup.py test
|
2017-09-10 08:42:53 +02:00
|
|
|
|
|
|
|
%files %python_files
|
2018-09-11 11:52:10 +02:00
|
|
|
%defattr(-,root,root)
|
2017-09-10 08:42:53 +02:00
|
|
|
%doc README.md
|
2018-09-11 11:52:10 +02:00
|
|
|
%if 0%{?suse_version} >= 1500
|
|
|
|
%license LICENSE
|
|
|
|
%else
|
|
|
|
%doc LICENSE
|
|
|
|
%endif
|
2017-09-10 08:42:53 +02:00
|
|
|
%python_alternative %{_bindir}/ansible-lint
|
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|