File complexity.spec of Package complexity

#
# spec file for package complexity
#
# Copyright (c) 2017 SUSE LINUX 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:           complexity
Version:        1.10
Release:        0
Summary:        Compute the complexity of C source code
License:        GPL-3.0+
Group:          Development/Tools/Other
URL:            https://www.gnu.org/software/complexity/
Source:         https://ftp.gnu.org/gnu/complexity/%{name}-%{version}.tar.xz
Patch0:         complexity-1.10-avoid-random-return-in-nonvoid-function.patch
BuildRequires:  autogen
Requires(post): %{install_info_prereq}
Requires(preun): %{install_info_prereq}

%description

Complexity a tool designed for analyzing the complexity of ā€œCā€ program functions.
It is very similar to the McCabe scoring, but addresses several issues not considered
in that scoring scheme.

%prep
%setup -q
%patch0 -p1

%build
%configure
make %{?_smp_mflags}

%install
%make_install

%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%preun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%files
%doc AUTHORS ChangeLog README COPYING NEWS
%{_bindir}/complexity
%{_bindir}/cx-vs-mc
%{_infodir}/complexity.info%{ext_info}
%{_mandir}/man1/complexity.1%{ext_man}

%changelog
openSUSE Build Service is sponsored by