2008-03-07 17:08:10 +00:00
|
|
|
Summary: Tool to write command line option parsing code for C programs
|
|
|
|
Name: gengetopt
|
2009-11-12 11:03:45 +00:00
|
|
|
Version: 2.22.3
|
|
|
|
Release: 1%{dist}
|
2008-03-07 17:08:10 +00:00
|
|
|
License: GPLv3+
|
|
|
|
Group: Development/Tools
|
|
|
|
URL: http://www.gnu.org/software/gengetopt/
|
|
|
|
Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz
|
|
|
|
|
|
|
|
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
|
|
|
|
2009-01-14 16:59:47 +00:00
|
|
|
Requires(post): info
|
|
|
|
Requires(preun): info
|
2007-06-14 03:01:50 +00:00
|
|
|
|
2008-03-07 17:08:10 +00:00
|
|
|
%ifarch %{ix86} x86_64 ppc ppc64
|
|
|
|
BuildRequires: valgrind
|
|
|
|
%endif
|
2007-06-14 03:01:50 +00:00
|
|
|
|
|
|
|
%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
|
2008-03-07 17:08:10 +00:00
|
|
|
|
|
|
|
# Suppress rpmlint error.
|
2009-11-12 11:03:45 +00:00
|
|
|
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
|
|
|
|
chmod 644 `find . -name "*.c" -perm /111 -print`
|
|
|
|
chmod 644 `find . -name "*.cc" -perm /111 -print`
|
|
|
|
chmod 644 `find . -name "*.cpp" -perm /111 -print`
|
|
|
|
chmod 644 `find . -name "*.h" -perm /111 -print`
|
|
|
|
chmod 644 `find . -name "*.ggo" -perm /111 -print`
|
2007-06-14 03:01:50 +00:00
|
|
|
|
|
|
|
%build
|
2009-11-12 11:03:45 +00:00
|
|
|
%configure --docdir=%{_docdir}/%{name}-%{version}
|
2008-06-02 18:37:08 +00:00
|
|
|
make %{?_smp_mflags}
|
2007-06-14 03:01:50 +00:00
|
|
|
|
|
|
|
%check
|
|
|
|
make check
|
|
|
|
|
2008-03-07 17:08:10 +00:00
|
|
|
%ifarch %{ix86} x86_64 ppc ppc64
|
|
|
|
pushd ./tests
|
|
|
|
make check-valgrind
|
|
|
|
popd
|
|
|
|
%endif
|
|
|
|
|
2007-06-14 03:01:50 +00:00
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
2007-08-07 02:55:06 +00:00
|
|
|
make install INSTALL="%{__install} -p" DESTDIR=$RPM_BUILD_ROOT
|
2007-07-06 21:54:38 +00:00
|
|
|
|
2008-03-07 17:08:10 +00:00
|
|
|
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
2007-06-14 03:01:50 +00:00
|
|
|
|
2009-11-12 11:03:45 +00:00
|
|
|
mkdir ./examples
|
|
|
|
pushd ./doc
|
|
|
|
cp -p README.example ../examples
|
|
|
|
cp -p main1.cc sample1.ggo ../examples
|
|
|
|
cp -p main2.c sample2.ggo ../examples
|
|
|
|
popd
|
2007-06-14 03:01:50 +00:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%post
|
2008-03-07 17:08:10 +00:00
|
|
|
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
|
2007-06-14 03:01:50 +00:00
|
|
|
|
|
|
|
%preun
|
|
|
|
if [ $1 = 0 ]; then
|
2008-03-07 17:08:10 +00:00
|
|
|
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
|
2007-06-14 03:01:50 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
2008-03-07 17:08:10 +00:00
|
|
|
%doc AUTHORS
|
|
|
|
%doc ChangeLog
|
|
|
|
%doc COPYING
|
|
|
|
%doc LICENSE
|
|
|
|
%doc NEWS
|
|
|
|
%doc README
|
|
|
|
%doc THANKS
|
|
|
|
%doc TODO
|
|
|
|
%doc doc/index.html
|
|
|
|
%doc doc/%{name}.html
|
|
|
|
%doc examples
|
2009-01-14 16:59:47 +00:00
|
|
|
%doc %{_infodir}/%{name}.info*
|
|
|
|
%doc %{_mandir}/man1/%{name}.1*
|
2007-06-14 03:01:50 +00:00
|
|
|
%{_bindir}/%{name}
|
|
|
|
|
|
|
|
%dir %{_datadir}/%{name}
|
|
|
|
%{_datadir}/%{name}/getopt.c
|
|
|
|
%{_datadir}/%{name}/getopt1.c
|
|
|
|
%{_datadir}/%{name}/gnugetopt.h
|
|
|
|
|
|
|
|
%changelog
|
2009-11-12 11:03:45 +00:00
|
|
|
* Wed Nov 04 2009 Debarshi Ray <rishi@fedoraproject.org> - 2.22.3-1
|
|
|
|
- Version bump to 2.22.3. (Red Hat Bugzilla #512414)
|
|
|
|
* enum option values can contain + and -.
|
|
|
|
* Fixed compilation problems due to macro FIX_UNUSED which was not in the
|
|
|
|
right place.
|
|
|
|
* New command line switches --header-output-dir and --src_output-dir to
|
|
|
|
store cmdline.h separately from cmdline.c.
|
|
|
|
* Use #include <getopt.h> in the generated files, instead of "getopt.h".
|
|
|
|
* Generated functions use prototypes with char ** instead of char *const *.
|
|
|
|
* Removed compilation warnings for generated files.
|
|
|
|
* Fixed a compilation problem for files generated with --include-getopt
|
|
|
|
with some versions of stdlib.h.
|
|
|
|
* Use PACKAGE_NAME, if defined, for printing help and version.
|
|
|
|
- Encoding of ChangeLog and THANKS fixed by upstream.
|
|
|
|
- Removed spurious executable permissions from a bunch of files.
|
|
|
|
|
|
|
|
* Fri Jul 24 2009 Release Engineering <rel-eng@fedoraproject.org> - 2.22.1-3
|
|
|
|
- Autorebuild for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
|
|
|
|
|
* Tue Feb 24 2009 Release Engineering <rel-eng@fedoraproject.org> - 2.22.1-2
|
|
|
|
- Autorebuild for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
2009-02-24 20:33:28 +00:00
|
|
|
|
2008-06-02 18:37:08 +00:00
|
|
|
* Mon Jun 02 2008 Debarshi Ray <rishi@fedoraproject.org> - 2.22.1-1
|
2009-11-12 11:03:45 +00:00
|
|
|
- Version bump to 2.22.1. (Red Hat Bugzilla #444335)
|
|
|
|
* Removed compilation warnings for generated files.
|
|
|
|
* Fixed a bug with --long-help and enum options.
|
|
|
|
* The outputs of --help and output of --show-help correspond with each other.
|
|
|
|
* Fixed a compilation problem in generated output with mode options.
|
2008-06-02 18:37:08 +00:00
|
|
|
- Parallel build problems fixed by upstream.
|
|
|
|
|
2008-03-07 17:08:10 +00:00
|
|
|
* Fri Mar 07 2008 Debarshi Ray <rishi@fedoraproject.org> - 2.22-1
|
2009-11-12 11:03:45 +00:00
|
|
|
- Version bump to 2.22. (Red Hat Bugzilla #428641)
|
2008-03-07 17:08:10 +00:00
|
|
|
- Fixed build failure with gcc-4.3.
|
|
|
|
- Trimmed the 'BuildRequires' list.
|
|
|
|
- Changed character encodings from ISO8859-1 to UTF-8.
|
|
|
|
- Disabled parallel make to prevent failure with -j2.
|
|
|
|
- Added 'make check-valgrind' for ix86, x86_64, ppc and ppc64 in check stanza.
|
|
|
|
- Fixed Texinfo scriptlets according to Fedora packaging guidelines.
|
2007-08-21 20:03:43 +00:00
|
|
|
|
2007-08-07 03:20:40 +00:00
|
|
|
* Tue Aug 07 2007 Debarshi Ray <rishi@fedoraproject.org> - 2.21-2
|
|
|
|
- Removed 'BuildRequires: source-highlight' to prevent build failure.
|
|
|
|
|
2007-08-07 02:55:06 +00:00
|
|
|
* Sat Aug 04 2007 Debarshi Ray <rishi@fedoraproject.org> - 2.21-1
|
2009-11-12 11:03:45 +00:00
|
|
|
- Version bump to 2.21. (Red Hat Bugzilla #250817)
|
2007-08-07 02:55:06 +00:00
|
|
|
- License changed to GPLv3 or later.
|
|
|
|
- Parallel build problems fixed by upstream.
|
|
|
|
- README.example added by upstream.
|
|
|
|
|
2007-07-06 21:54:38 +00:00
|
|
|
* Mon Jun 12 2007 Debarshi Ray <rishi@fedoraproject.org> - 2.20-1
|
|
|
|
- Version bump to 2.20.
|
|
|
|
|
2007-06-14 03:01:50 +00:00
|
|
|
* Mon Jun 12 2007 Debarshi Ray <rishi@fedoraproject.org> - 2.19.1-3
|
|
|
|
- Added 'BuildRequires: ...' for check stanza.
|
|
|
|
- Added a check stanza.
|
|
|
|
- Removed -devel package.
|
|
|
|
|
|
|
|
* Mon Jun 11 2007 Debarshi Ray <rishi@fedoraproject.org> - 2.19.1-2
|
|
|
|
- Used variables name and version in Source0.
|
|
|
|
- Mentioned /sbin/install-info as a requirement for post and preun.
|
|
|
|
- Used _datadir instead of defining sharedir.
|
|
|
|
- Disabled parallel make to prevent failure with -j2.
|
|
|
|
- Removing /usr/share/info/dir in the install stanza.
|
|
|
|
- Replaced '$RPM_BUILD_DIR' with '.' in the install stanza.
|
|
|
|
|
|
|
|
* Sun Jun 10 2007 Debarshi Ray <rishi@fedoraproject.org> - 2.19.1-1
|
|
|
|
- Initial build.
|
|
|
|
- Added README.example from Debian.
|
|
|
|
- Changed version and date in online manual page to 2.19.1 from 2.19rc.
|