Summary: Tool to write command line option parsing code for C programs Name: gengetopt Version: 2.23 Release: 1 License: GPLv3+ Group: Development/Tools URL: http://www.gnu.org/software/gengetopt/ Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.bz2 Source1: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Requires: info %description Gengetopt is a tool to generate C code to parse the command line arguments argc and argv that are part of every C or C++ program. The generated code uses the C library function getopt_long to perform the actual command line parsing. %prep %setup -q # suppress rpmlint error. chmod 644 ./AUTHORS chmod 644 ./ChangeLog chmod 644 ./COPYING chmod 644 ./LICENSE chmod 644 ./NEWS chmod 644 ./README chmod 644 ./THANKS chmod 644 ./TODO chmod 644 ./doc/README.example chmod 644 ./doc/index.html chmod 644 ./src/parser.yy chmod 644 ./src/scanner.ll find . -name '*.c' -exec chmod 644 {} ';' find . -name '*.cc' -exec chmod 644 {} ';' find . -name '*.cpp' -exec chmod 644 {} ';' find . -name '*.h' -exec chmod 644 {} ';' find . -name '*.ggo' -exec chmod 644 {} ';' %build ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --docdir=%{_docdir}/%{name}-%{version} make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make install DESTDIR=${RPM_BUILD_ROOT} /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir gzip -9 ${RPM_BUILD_ROOT}%{_infodir}/*.info* mkdir ./examples cd doc cp README.example ../examples cp main1.cc sample1.ggo ../examples cp main2.c sample2.ggo ../examples cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . %post /sbin/install-info %{_infodir}/%{name}.info.gz %{_infodir}/dir || : %preun if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir || : fi %clean ###[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc AUTHORS ChangeLog COPYING LICENSE NEWS README THANKS TODO %doc doc/index.html %doc doc/%{name}.html %doc examples %{_bindir}/%{name} %{_mandir}/man1/%{name}.1* %{_infodir}/%{name}.info* %dir %{_datadir}/%{name} %{_datadir}/%{name}/getopt.c %{_datadir}/%{name}/getopt1.c %{_datadir}/%{name}/gnugetopt.h /usr/bin/%{name} %changelog * Tue Jun 04 2019 Michael Perzl - 2.23-1 - updated to version 2.23 * Thu Nov 08 2012 Michael Perzl - 2.22.6-1 - first version for AIX V5.1 and higher