File pychecker.spec of Package pychecker

#
# spec file for package pychecker (Version 0.8.18)
#
# Copyright (c) 2009 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/
#

# norootforbuild


Name:           pychecker
BuildRequires:  python-devel
License:        BSD 3-clause (or similar)
Group:          Development/Languages/Python
AutoReqProv:    on
Version:        0.8.18
Release:        4
Source:         %{name}-%{version}.tar.bz2
Source1:        pychecker.1
Url:            http://sourceforge.net/projects/pychecker
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        A tool for finding bugs in python source code
%{py_requires}
%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
BuildArch:      noarch
%endif

%description
PyChecker is a tool for finding bugs in python source code. It finds
problems that are typically caught by a compiler for less dynamic
languages, like C and C++.  Because of the dynamic nature of python,
some warnings may be incorrect; however, spurious warnings should be
fairly infrequent.



Authors:
--------
    Neal Norwitz <neal@metaslash.com>
    Eric C. Newton <ecn@metaslash.com>

%prep
%setup

%build
export CFLAGS="$RPM_OPT_FLAGS" 
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record-rpm=INSTALLED_FILES
sed -e "s#$RPM_BUILD_ROOT##" $RPM_BUILD_ROOT/usr/bin/pychecker > pychecker.modified
cp pychecker.modified $RPM_BUILD_ROOT/usr/bin/pychecker
install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1
install -m 644 %{S:1} $RPM_BUILD_ROOT%{_mandir}/man1

%clean
rm -rf $RPM_BUILD_ROOT

%files -f INSTALLED_FILES 
%defattr(-,root,root)
%doc COPYRIGHT CHANGELOG KNOWN_BUGS MAINTAINERS pycheckrc README TODO
%doc %{_mandir}/man1/*

%changelog