File spacewalk-pylint.spec of Package spacewalk-pylint.378
#
# spec file for package spacewalk-pylint
#
# Copyright (c) 2015 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: spacewalk-pylint
Version: 0.12.4
Release: 0
Summary: Pylint configuration for spacewalk python packages
License: GPL-2.0
Group: Development/Debuggers
Url: https://fedorahosted.org/spacewalk
Source0: spacewalk-pylint-git-0.6b1751b.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%if 0%{?fedora} >= 19
Requires: pylint > 1.0
%else
Requires: pylint < 1.0
%endif
%if 0%{?suse_version} != 1010
BuildRequires: asciidoc
%endif
BuildRequires: libxslt
%if 0%{?rhel} && 0%{?rhel} < 6
BuildRequires: docbook-style-xsl
%endif
%description
Pylint configuration fine tuned to check coding style of spacewalk python
packages.
%prep
%setup -q -n spacewalk-pylint-git-0.6b1751b
%build
%if 0%{?suse_version} != 1010
a2x -d manpage -f manpage spacewalk-pylint.8.asciidoc
%endif
%install
rm -rf %{buildroot}
install -d -m 755 %{buildroot}/%{_bindir}
install -p -m 755 spacewalk-pylint %{buildroot}/%{_bindir}/
install -d -m 755 %{buildroot}/%{_sysconfdir}
install -p -m 644 spacewalk-pylint.rc %{buildroot}/%{_sysconfdir}/
%if 0%{?fedora} < 19
# old pylint don't understand new checks
sed -i '/disable=/ s/\(,C1001\|,W0121\)//g;' \
%{buildroot}%{_sysconfdir}/spacewalk-pylint.rc
%endif
%if 0%{?suse_version} != 1010
sed -i '/disable=/ s/\(,bad-whitespace\|,unpacking-non-sequence\|,superfluous-parens\|,C1001\|,W0121\)//g;' \
%{buildroot}%{_sysconfdir}/spacewalk-pylint.rc
mkdir -p %{buildroot}/%{_mandir}/man8
install -m 644 spacewalk-pylint.8 %{buildroot}/%{_mandir}/man8
%endif
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_bindir}/spacewalk-pylint
%config(noreplace) %{_sysconfdir}/spacewalk-pylint.rc
%if 0%{?suse_version} != 1010
%doc %{_mandir}/man8/spacewalk-pylint.8*
%endif
%doc LICENSE
%changelog