Marcus Meissner
14a14fc974
- Cleanup spec file with spec-cleaner - Use url for source - Add gpg signature - Correct info scriplet dependencies OBS-URL: https://build.opensuse.org/request/show/291114 OBS-URL: https://build.opensuse.org/package/show/devel:tools/gengetopt?expand=0&rev=18
76 lines
2.3 KiB
RPMSpec
76 lines
2.3 KiB
RPMSpec
#
|
|
# spec file for package gengetopt
|
|
#
|
|
# Copyright (c) 2015 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: gengetopt
|
|
Version: 2.22.6
|
|
Release: 0
|
|
Summary: Commandline parser generator
|
|
License: GPL-3.0+
|
|
Group: Development/Languages/C and C++
|
|
Url: http://www.gnu.org/software/gengetopt/
|
|
Source0: ftp://ftp.gnu.org/gnu/gengetopt/%{name}-%{version}.tar.gz
|
|
Source1: ftp://ftp.gnu.org/gnu/gengetopt/%{name}-%{version}.tar.gz.sig
|
|
Source2: %{name}.keyring
|
|
BuildRequires: gcc-c++
|
|
Requires(post): %{install_info_prereq}
|
|
Requires(preun): %{install_info_prereq}
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
Gengetopt is a tool to generate C code to parse getopt styled command line
|
|
arguments.
|
|
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.
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
%configure \
|
|
--docdir=%{_docdir}/%{name}
|
|
make --jobs 1
|
|
|
|
%install
|
|
%{?make_install} %{!?make_install:make install DESTDIR=%{buildroot}}
|
|
|
|
# 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
|
|
# make rpmlint happy and delete INSTALL
|
|
rm -f %{buildroot}%{_docdir}/%{name}/INSTALL
|
|
|
|
%check
|
|
make check --jobs 1
|
|
|
|
%post
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
|
|
|
%preun
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
|
|
|
%files
|
|
%defattr(-, root, root)
|
|
%{_bindir}/%{name}
|
|
%doc %{_infodir}/*.info*
|
|
%doc %{_mandir}/man1/%{name}*
|
|
%doc %{_docdir}/%{name}
|
|
|
|
%changelog
|