File gengetopt.spec of Package gengetopt

# spec file for package gengetopt
# Copyright (c) 2018 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

Name:           gengetopt
Version:        2.22.6
Release:        0
Summary:        Commandline parser generator
License:        GPL-3.0-or-later
Group:          Development/Languages/C and C++
Source2:        %{name}.keyring
BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  gcc-c++
BuildRequires:  help2man
Requires(post): %{install_info_prereq}
Requires(preun): %{install_info_prereq}

Gengetopt is a tool to generate C code to parse getopt styled command line
It's similar or even more powerful than the well known libpopt but does not
add any run or compile time dependencies to your projects. Moreover
reading/writing the options from/to config files is also supported.

%setup -q

make --jobs 1


# our system's getopt.h has getopt_long() on board, no need to install sources
rm -rf %{buildroot}%{_datadir}/%{name}
# info's dir file is not auto ignored on some systems
rm -rf %{buildroot}%{_infodir}/dir
# documentation is handled by doc macr
rm -rf %{buildroot}%{_datadir}/doc/%{name}

make check --jobs 1

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

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

%doc doc/*.h doc/*.c doc/*.ggo doc/README.example

openSUSE Build Service is sponsored by