1 Summary: C code generator that generates command line options parsers
2 Summary(pl.UTF-8): Generator kodu C generujący analizatory opcji linii poleceń
7 Group: Development/Tools
8 Source0: https://ftp.gnu.org/gnu/gengetopt/%{name}-%{version}.tar.xz
9 # Source0-md5: ea165d618640dbdecb42ae4491337965
10 Patch0: %{name}-info.patch
11 URL: http://www.gnu.org/software/gengetopt/
12 BuildRequires: autoconf >= 2.58
13 BuildRequires: automake
14 BuildRequires: help2man
15 BuildRequires: libstdc++-devel
16 BuildRequires: libtool >= 2:1.5
17 BuildRequires: tar >= 1:1.22
18 BuildRequires: texinfo
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 Gengetopt generates a C function that uses getopt_long function to
24 parse the command line options, to validate them and fills a struct.
26 %description -l pl.UTF-8
27 Gengetopt jest to narzędzie generujące kod w języku C, wykorzystujący
28 funkcję getopt_long do analizy opcji linii poleceń, sprawdzania ich
29 poprawności i umieszczania ich w strukturze.
32 Summary: gengetopt examples
33 Summary(pl.UTF-8): Przykłady do gengetopt
35 Requires: %{name} = %{version}-%{release}
40 %description examples -l pl.UTF-8
41 Przykłady do gengetopt.
49 %{__aclocal} -I m4 -I gl/m4
57 rm -rf $RPM_BUILD_ROOT
58 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
61 DESTDIR=$RPM_BUILD_ROOT
63 cp -p doc/*.{c,cc,ggo,h} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
64 cp -p doc/README.example $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
67 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/gengetopt
68 # .texi meant just for index.html(?)
69 %{__rm} $RPM_BUILD_ROOT%{_infodir}/index.info
72 rm -rf $RPM_BUILD_ROOT
74 %post -p /sbin/postshell
75 -/usr/sbin/fix-info-dir -c %{_infodir}
77 %postun -p /sbin/postshell
78 -/usr/sbin/fix-info-dir -c %{_infodir}
81 %defattr(644,root,root,755)
82 %doc AUTHORS ChangeLog LICENSE NEWS README THANKS TODO doc/{gengetopt,index}.html
83 %attr(755,root,root) %{_bindir}/gengetopt
84 %{_mandir}/man1/gengetopt.1*
85 %{_infodir}/gengetopt.info*
89 %defattr(644,root,root,755)
90 %{_examplesdir}/%{name}-%{version}