2011-04-11 13:19:42 +02:00
|
|
|
#
|
2011-09-25 00:44:39 +02:00
|
|
|
# spec file for package gengetopt
|
2011-04-11 13:19:42 +02:00
|
|
|
#
|
2012-02-08 12:52:14 +01:00
|
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2011-04-11 13:19:42 +02:00
|
|
|
#
|
|
|
|
# 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
|
2011-09-27 19:29:11 +02:00
|
|
|
Version: 2.22.5
|
2011-12-17 13:03:11 +01:00
|
|
|
Release: 0
|
2011-04-11 13:19:42 +02:00
|
|
|
Summary: Commandline parser generator
|
2011-12-17 13:03:11 +01:00
|
|
|
License: GPL-3.0+
|
2011-04-11 13:19:42 +02:00
|
|
|
Group: Development/Languages/C and C++
|
2011-12-17 13:03:11 +01:00
|
|
|
Url: http://www.gnu.org/software/gengetopt/
|
2011-04-11 13:19:42 +02:00
|
|
|
Source: %{name}-%{version}.tar.bz2
|
|
|
|
BuildRequires: gcc-c++
|
2011-09-25 00:44:39 +02:00
|
|
|
Requires(pre): info
|
2011-04-11 13:19:42 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
2011-09-19 16:52:00 +02:00
|
|
|
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.
|
2011-04-11 13:19:42 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
|
|
|
%configure \
|
|
|
|
--docdir=%{_docdir}/%{name}
|
|
|
|
make
|
|
|
|
|
|
|
|
%install
|
2011-09-25 00:44:39 +02:00
|
|
|
%{?make_install} %{!?make_install:make install DESTDIR=%{buildroot}}
|
2011-09-18 18:43:28 +02:00
|
|
|
|
|
|
|
# our system's getopt.h has getopt_long() on board, no need to install sources
|
2011-04-11 13:19:42 +02:00
|
|
|
rm -rf %{buildroot}%{_datadir}/%{name}
|
2011-09-25 00:44:39 +02:00
|
|
|
# info's dir file is not auto ignored on some systems
|
|
|
|
rm -rf %{buildroot}%{_infodir}/dir
|
2011-09-18 18:43:28 +02:00
|
|
|
# make rpmlint happy and delete INSTALL
|
|
|
|
rm -f %{buildroot}%{_docdir}/%{name}/INSTALL
|
|
|
|
|
2011-04-11 13:19:42 +02:00
|
|
|
%check
|
|
|
|
make check
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
%post
|
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%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
|