diff --git a/README.md b/README.md index 50f8582..2be078c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # indent +Indent changes the appearance of a C program by inserting or deleting whitespace. +It also has options for controlling the alignment of braces and declarations, program indenting, formatting of both C and C++ comments, and other stylistic parameters. + diff --git a/indent-2.2.11-texinfo-5.0.patch b/indent-2.2.11-texinfo-5.0.patch new file mode 100644 index 0000000..8658ec0 --- /dev/null +++ b/indent-2.2.11-texinfo-5.0.patch @@ -0,0 +1,42 @@ +diff -Nru indent-2.2.11/doc.orig/Makefile.am indent-2.2.11/doc/Makefile.am +--- indent-2.2.11/doc.orig/Makefile.am 2008-04-14 20:31:19.000000000 +0200 ++++ indent-2.2.11/doc/Makefile.am 2014-12-28 12:57:09.337750595 +0100 +@@ -34,14 +34,14 @@ + html-split: @PACKAGE@_toc.html + + @PACKAGE@.html: version.texi $(@PACKAGE@_TEXINFOS) +- $(TEXI2HTML) -expandinfo -number -monolithic `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` ++ $(TEXI2HTML) -expandinfo -monolithic `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` + + @PACKAGE@_toc.html: version.texi $(@PACKAGE@_TEXINFOS) + case "$(TEXI2HTML)" in \ + *"/missing texi2html") \ +- $(TEXI2HTML) -expand info -number -nomenu -split section `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` || exit 0 ;; \ ++ $(TEXI2HTML) -expand info -nomenu -split section `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` || exit 0 ;; \ + *) $(RM) @PACKAGE@_*.html ; \ +- $(TEXI2HTML) -expand info -number -nomenu -split section `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` ;; \ ++ $(TEXI2HTML) -expand info -nomenu -split section `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` ;; \ + esac + + install-html-monolithic: @PACKAGE@.html +diff -Nru indent-2.2.11/doc.orig/Makefile.in indent-2.2.11/doc/Makefile.in +--- indent-2.2.11/doc.orig/Makefile.in 2010-01-31 17:25:21.000000000 +0100 ++++ indent-2.2.11/doc/Makefile.in 2014-12-28 12:56:49.929854993 +0100 +@@ -663,14 +663,14 @@ + html-split: @PACKAGE@_toc.html + + @PACKAGE@.html: version.texi $(@PACKAGE@_TEXINFOS) +- $(TEXI2HTML) -expandinfo -number -monolithic `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` ++ $(TEXI2HTML) -expandinfo -monolithic `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` + + @PACKAGE@_toc.html: version.texi $(@PACKAGE@_TEXINFOS) + case "$(TEXI2HTML)" in \ + *"/missing texi2html") \ +- $(TEXI2HTML) -expand info -number -nomenu -split section `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` || exit 0 ;; \ ++ $(TEXI2HTML) -expand info -nomenu -split section `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` || exit 0 ;; \ + *) $(RM) @PACKAGE@_*.html ; \ +- $(TEXI2HTML) -expand info -number -nomenu -split section `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` ;; \ ++ $(TEXI2HTML) -expand info -nomenu -split section `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` ;; \ + esac + + install-html-monolithic: @PACKAGE@.html diff --git a/indent-2.2.9-gcc4fix.patch b/indent-2.2.9-gcc4fix.patch new file mode 100644 index 0000000..c15b294 --- /dev/null +++ b/indent-2.2.9-gcc4fix.patch @@ -0,0 +1,10 @@ +--- indent-2.2.9/src/output.c ++++ indent-2.2.9/src/output.c +@@ -23,7 +23,7 @@ + + RCSTAG_CC ("$Id: output.c,v 1.5 2002/12/12 17:36:49 david Exp $"); + +-static FILE * output = NULL; ++FILE* output = NULL; + static BOOLEAN inhibited = 0; + static buf_break_st_ty * buf_break_list = NULL; diff --git a/indent.spec b/indent.spec new file mode 100644 index 0000000..f1b667f --- /dev/null +++ b/indent.spec @@ -0,0 +1,85 @@ +Name: indent +Version: 2.2.11 +Release: 1mamba +Summary: A flexible tool to indent C programs +Group: Development/Tools +Vendor: openmamba +Distribution: openmamba +Packager: Aleph0 +URL: http://www.gnu.org/directory/GNU/indent.html +Source: http://ftp.de.debian.org/debian/pool/main/i/indent/indent_%{version}.orig.tar.gz +#Source: http://ftp.gnu.org/gnu/indent/indent-%{version}.tar.gz +Patch: %{name}-2.2.9-gcc4fix.patch +Patch1: indent-2.2.11-texinfo-5.0.patch +License: GPL +Requires(post):%{__install_info} +BuildRequires: gettext-devel +BuildRequires: tetex +## AUTOBUILDREQ-BEGIN +BuildRequires: bash +BuildRequires: glibc-devel +BuildRequires: texinfo +## AUTOBUILDREQ-END +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +# FIXME: 'texi2pdf' missing + +%description +Indent changes the appearance of a C program by inserting or deleting whitespace. +It also has options for controlling the alignment of braces and declarations, program indenting, formatting of both C and C++ comments, and other stylistic parameters. + +%prep +%setup -q +%patch -p1 +%patch1 -p1 + +%build +%configure +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +%find_lang %{name} + +# remove duplicate file +rm %{buildroot}%{_prefix}/doc/indent/indent.html + +%post +%install_info %{name}.info + +%preun +%uninstall_info %{name}.info +exit 0 + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files -f %{name}.lang +%defattr(-,root,root) +%{_bindir}/indent +%{_bindir}/texinfo2man +%{_datadir}/info/* +%{_datadir}/man/man1/* +%doc AUTHORS COPYING doc/indent.html +#ChangeLog* NEWS README doc/indent.html + +%changelog +* Tue Jan 29 2013 Automatic Build System 2.2.11-1mamba +- update to 2.2.11 + +* Sun Jul 08 2012 Automatic Build System 2.2.10-1mamba +- update to 2.2.10 + +* Tue Dec 11 2007 Aleph0 2.2.9-4mamba +- fixed license + +* Wed Sep 28 2005 Davide Madrisan 2.2.9-3qilnx +- specfile fixes: use %%find_lang, install/uninstall info files + +* Mon Sep 26 2005 Stefano Cotta Ramusino 2.2.9-2qilnx +- bug with gcc4 fixed + +* Thu Feb 12 2004 Davide Madrisan 2.2.9-1qilnx +- first build