%define name gengetopt %define version 2.11 %define release 1mdk Summary: GNU gengetopt generates command line parsers Name: %{name} Version: %{version} Release: %{release} Source0: %{name}-%{version}.tar.bz2 License: GPL Group: Development/C URL: http://www.gnu.org/software/gengetopt/gengetopt.html BuildRoot: %{_tmppath}/%{name}-buildroot BuildRequires: flex %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 And both long options (those that start with --) and short options (start with - and consist of only one character) can be handled. For standards about short and long options you may want to take a look at the GNU Coding Standards. %prep %setup -q perl -pi -e "s!@prefix@/share/doc/gengetopt!@prefix@/share/doc/gengetopt-%{version}!" doc/gengetopt.1.in %build %configure2_5x make %install rm -rf $RPM_BUILD_ROOT %makeinstall_std mkdir -p examples cp -f doc/*ggo doc/cmdline*[ch] doc/main*c examples rm -rf %buildroot/%_datadir/doc/gengetopt %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc doc/*html doc/no_getopt_long.txt ChangeLog COPYING LICENSE NEWS %doc README THANKS examples %_bindir/gengetopt %_datadir/gengetopt/ %_mandir/man1/gengetopt.1* %changelog * Fri Oct 3 2003 Götz Waschk <waschk@linux-mandrake.com> 2.11-1mdk - drop prefix - new version * Fri May 23 2003 Götz Waschk <waschk@linux-mandrake.com> 2.10-1mdk - new version * Mon Apr 28 2003 Götz Waschk <waschk@linux-mandrake.com> 2.9-2mdk - use the right configure macro - fix distriblint warning * Mon Apr 14 2003 Götz Waschk <waschk@linux-mandrake.com> 2.9-1mdk - new version * Thu Apr 3 2003 Götz Waschk <waschk@linux-mandrake.com> 2.8.1-1mdk - disable parallel build - new version * Tue Mar 11 2003 Götz Waschk <waschk@linux-mandrake.com> 2.7.1-5mdk - fix buildrequires * Fri Dec 27 2002 Götz Waschk <waschk@linux-mandrake.com> 2.7.1-4mdk - fix installation, clean unpackaged files * Fri Aug 16 2002 Götz Waschk <waschk@linux-mandrake.com> 2.7.1-3mdk - gcc 3.2-0.3mdk build * Mon Jul 29 2002 Götz Waschk <waschk@linux-mandrake.com> 2.7.1-2mdk - gcc 3.2 build * Tue Jul 23 2002 Götz Waschk <waschk@linux-mandrake.com> 2.7.1-1mdk - 2.7.1 * Fri Jan 4 2002 Götz Waschk <waschk@linux-mandrake.com> 2.5-1mdk - patched doc path in the man page - initial RPM package