File flawfinder.spec of Package flawfinder

# vim:set ai ts=4 sw=4:
#
# spec file for package flawfinder
#
# Copyright (c) 2023 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


Name:           flawfinder
Version:        2.0.19
Release:        0
Summary:        Examines C/C++ source code for security flaws
License:        GPL-2.0-or-later
Group:          Development/Tools/Other
URL:            https://www.dwheeler.com/flawfinder/
Source:         http://www.dwheeler.com/flawfinder/%{name}-%{version}.tar.gz
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildArch:      noarch

%description
Flawfinder scans through C/C++ source code,
identifying lines ("hits") with potential security flaws.
By default it reports hits sorted by severity, with the riskiest lines first.
Flawfinder is released under the GNU Public License (GPL).

%python_subpackages

%prep
%setup -q

%build
%{python_expand $python setup.py build -g}

%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/flawfinder
%python_clone -a %{buildroot}%{_mandir}/man1/flawfinder.1.gz

%post
%python_install_alternative flawfinder %{_mandir}/man1/flawfinder.1.gz

%postun
%python_uninstall_alternative flawfinder

%files %{python_files}
%license COPYING
%doc README.md ChangeLog flawfinder.ps
%python_alternative %{_bindir}/flawfinder
%python_alternative %{_mandir}/man1/flawfinder.1.gz
%{python_sitelib}/*
%pycache_only %{python_sitelib}/__pycache__/flawfinder*

%changelog
openSUSE Build Service is sponsored by