[packages/gengetopt] - updated to 2.22.6, use make install - added info patch (unify direntry) - added am patch (fix auto

qboosh qboosh at pld-linux.org
Tue May 22 17:37:00 CEST 2018


commit a65684ca403a37b36f223a85cb51459d8f64ec5b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue May 22 17:37:51 2018 +0200

    - updated to 2.22.6, use make install
    - added info patch (unify direntry)
    - added am patch (fix automake dependencies problem)

 gengetopt-am.patch   | 11 ++++++++++
 gengetopt-info.patch | 14 +++++++++++++
 gengetopt.spec       | 58 ++++++++++++++++++++++++++++++----------------------
 3 files changed, 58 insertions(+), 25 deletions(-)
---
diff --git a/gengetopt.spec b/gengetopt.spec
index 47e5582..19ee94e 100644
--- a/gengetopt.spec
+++ b/gengetopt.spec
@@ -1,17 +1,20 @@
-#
 Summary:	C code generator that generates command line options parsers
-Summary(pl.UTF-8):	Generator kodu C generujący paser opcji linii poleceń
+Summary(pl.UTF-8):	Generator kodu C generujący analizatory opcji linii poleceń
 Name:		gengetopt
-Version:	2.22.1
+Version:	2.22.6
 Release:	1
 License:	GPL v3+
 Group:		Development/Tools
 Source0:	http://ftp.gnu.org/gnu/gengetopt/%{name}-%{version}.tar.gz
-# Source0-md5:	3877433c69902a26887ad65c1a2d60eb
+# Source0-md5:	29749a48dda69277ab969c510597a14e
+Patch0:		%{name}-info.patch
+Patch1:		%{name}-am.patch
 URL:		http://www.gnu.org/software/gengetopt/
 BuildRequires:	autoconf >= 2.58
 BuildRequires:	automake
-BuildRequires:	libtool
+BuildRequires:	help2man
+BuildRequires:	libstdc++-devel
+BuildRequires:	libtool >= 2:1.5
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -19,56 +22,61 @@ Gengetopt generates a C function that uses getopt_long function to
 parse the command line options, to validate them and fills a struct.
 
 %description -l pl.UTF-8
-Gengetopt jest to narzędzie generujące kod w języku C, który służy do
-parsowania opcji przekazanych w wierszu poleceń z użyciem biblioteki
-getopt. Kod wygenerowany przez gengetopt potrafi obsłużyć zarówno
-krótkie opcje, jak i długie - sprawdzić poprawność przekazazych
-argumentów i wypełnić odpowiednie struktury.
+Gengetopt jest to narzędzie generujące kod w języku C, wykorzystujący
+funkcję getopt_long do analizy opcji linii poleceń, sprawdzania ich
+poprawności i umieszczania ich w strukturze.
 
 %package examples
 Summary:	gengetopt examples
-Summary(pl.UTF-8):	Przykłady gengetopt
+Summary(pl.UTF-8):	Przykłady do gengetopt
 Group:		Documentation
-Requires:	%{name} = %{epoch}:%{version}-%{release}
+Requires:	%{name} = %{version}-%{release}
 
 %description examples
 Gengetopt examples.
 
 %description examples -l pl.UTF-8
-Przykładowe pliki dla gengetopt.
+Przykłady do gengetopt.
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
 
 %build
 %{__libtoolize}
-%{__aclocal} -I gl/m4
+%{__aclocal} -I m4 -I gl/m4
 %{__autoconf}
 %{__autoheader}
-%{__automake} --add-missing --gnu
+%{__automake} --gnu
 %configure
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_examplesdir}/%{name}-%{version},%{_datadir}/%{name},%{_infodir},%{_mandir}/man1}
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
 
-install src/%{name} $RPM_BUILD_ROOT%{_bindir}/gengetopt
-install doc/*.{c,cc,ggo,h} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-install doc/README.example $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-install src/gnugetopt.h $RPM_BUILD_ROOT%{_datadir}/%{name}/gnugetopt.h
-install src/getopt.c $RPM_BUILD_ROOT%{_datadir}/%{name}/getopt.c
-install src/getopt1.c $RPM_BUILD_ROOT%{_datadir}/%{name}/getopt1.c
-install doc/gengetopt.info $RPM_BUILD_ROOT%{_infodir}/gengetopt.info
-install doc/gengetopt.1 $RPM_BUILD_ROOT%{_mandir}/man1/gengetopt.1
+cp -p doc/*.{c,cc,ggo,h} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -p doc/README.example $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+
+# packaged as %doc
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/gengetopt
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post	-p /sbin/postshell
+-/usr/sbin/fix-info-dir -c %{_infodir}
+
+%postun	-p /sbin/postshell
+-/usr/sbin/fix-info-dir -c %{_infodir}
+
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS ChangeLog NEWS README THANKS TODO
+%doc AUTHORS ChangeLog LICENSE NEWS README THANKS TODO doc/{gengetopt,index}.html
 %attr(755,root,root) %{_bindir}/gengetopt
 %{_mandir}/man1/gengetopt.1*
 %{_infodir}/gengetopt.info*
diff --git a/gengetopt-am.patch b/gengetopt-am.patch
new file mode 100644
index 0000000..fb7553a
--- /dev/null
+++ b/gengetopt-am.patch
@@ -0,0 +1,11 @@
+--- gengetopt-2.22.6/src/Makefile.am.orig	2012-11-02 14:26:54.000000000 +0100
++++ gengetopt-2.22.6/src/Makefile.am	2018-05-22 17:14:37.828404404 +0200
+@@ -51,7 +51,7 @@
+ 	@LTLIBOBJS@ \
+ 	skels/libgen.la
+ 
+-LDADD = $(top_builddir)/src/libgengetopt.la
++LDADD = libgengetopt.la
+ 
+ EXTRA_DIST = parser.h argsdef.h gengetopt.h ggos.h gm.h gnugetopt.h \
+ cmdline.c cmdline.h \
diff --git a/gengetopt-info.patch b/gengetopt-info.patch
new file mode 100644
index 0000000..3c09a01
--- /dev/null
+++ b/gengetopt-info.patch
@@ -0,0 +1,14 @@
+--- gengetopt-2.22.6/doc/gengetopt.texinfo.orig	2012-11-02 18:43:24.000000000 +0100
++++ gengetopt-2.22.6/doc/gengetopt.texinfo	2018-05-22 17:14:01.845071479 +0200
+@@ -50,9 +50,9 @@
+ @end quotation
+ @end copying
+ 
+- at dircategory GNU programming tools
++ at dircategory Programming tools:
+ @direntry
+-* Gengetopt: (gengetopt).         Create command line options parsers
++* Gengetopt: (gengetopt).		Create command line options parsers
+ @end direntry
+ 
+ @titlepage
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gengetopt.git/commitdiff/a65684ca403a37b36f223a85cb51459d8f64ec5b



More information about the pld-cvs-commit mailing list