From 90dd56a215122de71fb0578b3e76e71867e5b082 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 7 Mar 2008 17:08:10 +0000 Subject: [PATCH] - Version bump to 2.22. Closes Red Hat Bugzilla bug #428641. - 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. --- .cvsignore | 2 +- gengetopt-2.22-gcc43.patch | 11 ++++++ gengetopt.spec | 74 +++++++++++++++++++++++++++----------- sources | 2 +- 4 files changed, 66 insertions(+), 23 deletions(-) create mode 100644 gengetopt-2.22-gcc43.patch diff --git a/.cvsignore b/.cvsignore index 4fd1a92..67300cc 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -gengetopt-2.21.tar.gz +gengetopt-2.22.tar.gz diff --git a/gengetopt-2.22-gcc43.patch b/gengetopt-2.22-gcc43.patch new file mode 100644 index 0000000..073ec56 --- /dev/null +++ b/gengetopt-2.22-gcc43.patch @@ -0,0 +1,11 @@ +diff -urNp gengetopt-2.22.orig/src/fileutils.cpp gengetopt-2.22/src/fileutils.cpp +--- gengetopt-2.22.orig/src/fileutils.cpp 2006-05-07 15:12:05.000000000 +0530 ++++ gengetopt-2.22/src/fileutils.cpp 2008-03-05 08:52:25.000000000 +0530 +@@ -12,6 +12,7 @@ + + #include + #include ++#include + + #include "fileutils.h" + diff --git a/gengetopt.spec b/gengetopt.spec index 8cb1dc5..00794b6 100644 --- a/gengetopt.spec +++ b/gengetopt.spec @@ -1,19 +1,22 @@ -Summary: Tool to write command line option parsing code for C programs -Name: gengetopt -Version: 2.21 -Release: 3%{dist} -License: GPLv3+ -Group: Development/Tools -URL: http://www.gnu.org/software/gengetopt/ -Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz +Summary: Tool to write command line option parsing code for C programs +Name: gengetopt +Version: 2.22 +Release: 1%{dist} +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) +Patch0: %{name}-%{version}-gcc43.patch -Requires(post): /sbin/install-info +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + +Requires(post): /sbin/install-info Requires(preun): /sbin/install-info -BuildRequires: help2man -BuildRequires: valgrind +%ifarch %{ix86} x86_64 ppc ppc64 +BuildRequires: valgrind +%endif %description Gengetopt is a tool to generate C code to parse the command line arguments @@ -22,21 +25,35 @@ the C library function getopt_long to perform the actual command line parsing. %prep %setup -q +%patch0 -p1 + +# Suppress rpmlint error. +iconv --from-code ISO8859-1 --to-code UTF-8 ./ChangeLog \ + --output ChangeLog.utf-8 && mv ChangeLog.utf-8 ./ChangeLog +iconv --from-code ISO8859-1 --to-code UTF-8 ./THANKS \ + --output THANKS.utf-8 && mv THANKS.utf-8 ./THANKS %build %configure -make %{?_smp_mflags} + +# Parallel make does not work. +make %check make check +%ifarch %{ix86} x86_64 ppc ppc64 +pushd ./tests + make check-valgrind +popd +%endif + %install rm -rf $RPM_BUILD_ROOT -# To retain timestamps on files installed without any modification. make install INSTALL="%{__install} -p" DESTDIR=$RPM_BUILD_ROOT -rm -rf $RPM_BUILD_ROOT%{_infodir}/dir +rm -f $RPM_BUILD_ROOT%{_infodir}/dir # Move /usr/share/doc/gengetopt/examples to RPM_BUILD_DIR. # To be later listed against %doc. @@ -47,17 +64,26 @@ rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name} rm -rf $RPM_BUILD_ROOT %post -/sbin/install-info %{_infodir}/%{name}.info.gz %{_infodir}/dir || : +/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || : %preun if [ $1 = 0 ]; then - /sbin/install-info --delete %{_infodir}/%{name}.info.gz \ - %{_infodir}/dir >/dev/null 2>&1 || : + /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || : fi %files %defattr(-,root,root,-) -%doc AUTHORS ChangeLog COPYING LICENSE NEWS README THANKS TODO doc/gengetopt.html doc/index.html examples +%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 %{_bindir}/%{name} %{_infodir}/%{name}.info.gz %{_mandir}/man1/%{name}.1.gz @@ -68,8 +94,14 @@ fi %{_datadir}/%{name}/gnugetopt.h %changelog -* Wed Aug 22 2007 Debarshi Ray - 2.21-3 -- Rebuilding. +* Fri Mar 07 2008 Debarshi Ray - 2.22-1 +- Version bump to 2.22. Closes Red Hat Bugzilla bug #428641. +- 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. * Tue Aug 07 2007 Debarshi Ray - 2.21-2 - Removed 'BuildRequires: source-highlight' to prevent build failure. diff --git a/sources b/sources index befa556..f8331e8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f44cc7507a3c069a0374e371efcc69ab gengetopt-2.21.tar.gz +346f35c9e0607733b26dcbba9fbbfa8c gengetopt-2.22.tar.gz