# # spec file for package gengetopt (Version 2.22.4) # # Copyright (c) 2009 SUSE LINUX Products 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.4 Release: 1 License: GPL3 Summary: Commandline parser generator Url: http://www.gnu.org/software/gengetopt/ Group: Development/Languages/C and C++ Source: %{name}-%{version}.tar.bz2 BuildRequires: gcc-c++ PreReq: %install_info_prereq BuildRoot: %{_tmppath}/%{name}-%{version}-build %description This program generates a C function that uses getopt_long function to parse the command line options, to validate them and fills a struct. Thus your program can now handle options such as: myprog --input foo.c -o foo.o --no-tabs -i 100 *.class Both long options (those that start with --) and short options (start with - and consist of only one character) can be handled. %prep %setup -q %build autoreconf -fi %configure \ --docdir=%{_docdir}/%{name} make %install %{?make_install} %{!?make_install:make install DESTDIR=$RPM_BUILD_ROOT} rm -rf %{buildroot}%{_datadir}/%{name} %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