File texinfo.spec of Package texinfo

#
# spec file for package texinfo (Version 4.12)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#



Name:           texinfo
BuildRequires:  help2man libbz2-devel libzio-devel ncurses-devel perl-gettext zlib-devel
License:        GPL v2 or later; GPL v3 or later
Group:          Productivity/Publishing/Texinfo
AutoReqProv:    on
Version:        4.12
Release:        1
Summary:        Tools Needed to Create Documentation from Texinfo Sources
Url:            http://www.texinfo.org
PreReq:         %{install_info_prereq}
Source:         ftp://ftp.gnu.org/pub/gnu/texinfo/texinfo-%{version}.tar.bz2
Source1:        http://download.savannah.nongnu.org/releases/texi2html/texi2html-1.78.tar.bz2
Source2:        http://texinfo.org/texi2roff/texi2roff-2.0.tar.bz2
Source10:       info-dir
Patch:          texinfo-%{version}.dif
Patch1:         texi2html-1.78.dif
Patch2:         texi2roff-2.0.dif
Patch3:         texi2roff.patch.bz2
Patch4:         texinfo-%{version}-zlib.patch
Patch5:         texinfo-4.8-echo.patch
Patch6:         texi2roff-2.0-gcc4.patch
Patch7:         install-info.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Texinfo is a documentation system that uses a single source file to
produce both online information and printed output.  Using Texinfo, you
can create a printed document with the normal features of a book,
including chapters, sections, cross-references, and indices.  From the
same Texinfo source file, you can create a menu-driven, online info
file with nodes, menus, cross-references, and indices.



Authors:
--------
    Andreas Schwab <schwab@suse.de>
    Brian Fox <bfox@gnu.org>
    Charles Hannum <mycroft@gnu.org>
    Daniel Hagerty <hag@gnu.org>
    David J. MacKenzie <djm@gnu.org>
    Eli Zaretskii  <eliz@is.elta.co.il>
    Jim Meyering <meyering@na-net.ornl.gov>
    Karl Berry  <karl@gnu.org>
    Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
    Noah Friedman <friedman@prep.org>
    Richard Stallman <rms@gnu.org>
    Robert J. Chassell <bob@gnu.org>
    Roland McGrath <roland@gnu.org>

%package -n info
License:        GPL v2 or later
Summary:        A Stand-Alone Terminal-Based Info Browser
Group:          Productivity/Publishing/Texinfo
PreReq:         bash zlib libzio

%description -n info
Info is a terminal-based program for reading documentation of computer
programs in the Info format. The GNU Project distributes most of its
on-line manuals in the Info format, so you need a program called "Info
reader" to read the manuals.



Authors:
--------
    Andreas Schwab <schwab@suse.de>
    Brian Fox <bfox@gnu.org>
    Charles Hannum <mycroft@gnu.org>
    Daniel Hagerty <hag@gnu.org>
    David J. MacKenzie <djm@gnu.org>
    Eli Zaretskii  <eliz@is.elta.co.il>
    Jim Meyering <meyering@na-net.ornl.gov>
    Karl Berry  <karl@gnu.org>
    Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
    Noah Friedman <friedman@prep.org>
    Richard Stallman <rms@gnu.org>
    Robert J. Chassell <bob@gnu.org>
    Roland McGrath <roland@gnu.org>

%prep
rm -rf texi2html-1.78 texi2roff-2.0
%setup -q -b 1 -b 2
%patch4 -p0 -b .zlib
%patch5 -p0 -b .echo
%patch7
%patch0 -p0
pushd ../texi2html-*
%patch1 -p0
popd
pushd ../texi2roff-*
%patch3 -p0 -b .Bader
%patch2 -p0
%patch6 -p1
popd

%build
    HOST=%{_target_cpu}-suse-linux
    CFLAGS="$RPM_OPT_FLAGS -pipe"
    LDFLAGS=""
    CC=gcc
    export CFLAGS LDFLAGS CC
    AUTOPOINT=true autoreconf -fi
    ./configure --build=$HOST		\
	--prefix=%{_prefix}		\
	--mandir=%{_mandir}		\
	--datadir=%{_datadir}		\
	--infodir=%{_infodir}		\
	--without-included-gettext	\
	--enable-nls
    PATH=${PWD}/makeinfo:${PWD}/util:$PATH
    export PATH
    make
pushd ../texi2html-*
    ./configure --build=$HOST		\
	--prefix=%{_prefix}		\
	--mandir=%{_mandir}		\
	--datadir=%{_datadir}		\
	--infodir=%{_infodir}		\
	--without-included-gettext	\
	--enable-nls
    make
popd
pushd ../texi2roff-*
    rm -f texi2roff
    make
popd

%install
    make DESTDIR=%{buildroot} \
	infodir=%{_infodir}	   \
	htmldir=%{_defaultdocdir}/texi2html install
    mkdir -p %{buildroot}/sbin
    mv %{buildroot}%{_bindir}/install-info %{buildroot}/sbin/
    ln -sf ../../sbin/install-info %{buildroot}%{_bindir}/install-info
    mkdir -p %{buildroot}%{_infodir}
    install -m 644 %{S:10}       %{buildroot}%{_infodir}/dir
pushd ../texi2html-*
    make DESTDIR=%{buildroot} \
	infodir=%{_infodir}	   \
	texinfohtmldir=%{_defaultdocdir}/texi2html install
    install -m 644 README        %{buildroot}%{_defaultdocdir}/texi2html/
    install -m 644 NEWS          %{buildroot}%{_defaultdocdir}/texi2html/
    install -m 644 COPYING       %{buildroot}%{_defaultdocdir}/texi2html/
popd
pushd ../texi2roff-*
    doc=%{_defaultdocdir}/texi2roff
    install -m 755 texi2roff     %{buildroot}%{_bindir}/
    install -m 755 texi2index    %{buildroot}%{_bindir}/
    install -m 644 texi2roff.1   %{buildroot}%{_mandir}/man1/
    mkdir -p                     %{buildroot}${doc}
    install -m 644 Readme        %{buildroot}${doc}
    install -m 644 copyright     %{buildroot}${doc}
popd
%find_lang %name %{name}.lang

%clean
test -n "%{buildroot}" && rm -rf %{buildroot}

%post
%install_info --info-dir=%{_infodir} %{_infodir}/texinfo.gz
%install_info --info-dir=%{_infodir} %{_infodir}/texi2html.info.gz

%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/texinfo.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/texi2html.info.gz

%post -n info
%install_info --info-dir=%{_infodir} %{_infodir}/info-stnd.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/info.info.gz

%postun -n info
%install_info_delete --info-dir=%{_infodir} %{_infodir}/info-stnd.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/info.info.gz

%files -f %{name}.lang
%defattr(-, root, root)
%dir %{_defaultdocdir}/texi2html
%dir %{_defaultdocdir}/texi2roff
%doc ABOUT-NLS AUTHORS COPYING INTRODUCTION NEWS README TODO
%doc doc/texinfo.tex doc/txi-*.tex
%doc %{_defaultdocdir}/texi2html/*
%doc %{_defaultdocdir}/texi2roff/*
%{_bindir}/makeinfo
%{_bindir}/pdftexi*
%{_bindir}/texi*
%{_infodir}/texinfo*.gz
%{_infodir}/texi2html*.gz
%{_mandir}/man1/makeinfo.1.gz
%{_mandir}/man1/pdftexi2dvi.1.gz
%{_mandir}/man1/texi*.1.gz
%{_mandir}/man5/texinfo.5.gz
%{_datadir}/texinfo
%{_datadir}/texi2html

%files -n info
%defattr(-,root,root)
%config(noreplace) %verify(not md5 size mtime) %{_infodir}/dir
/sbin/install-info
%{_bindir}/install-info
%{_bindir}/info
%{_bindir}/infokey
%{_infodir}/info.info*
%{_infodir}/info-stnd.info*
%{_mandir}/man1/info.1*
%{_mandir}/man1/infokey.1*
%{_mandir}/man1/install-info.1*
%{_mandir}/man5/info.5*

%changelog
* Sun Jun 15 2008 schwab@suse.de
- Update to texinfo 4.12.
  * Language:
  . new commands @clicksequence, @click, and @clickstyle for documenting
  GUI sequences, and @arrow for the default glyph used.
  . new commands @geq{} and @leq{} for the normal >= and <= relations.
  * install-info:
  . lzma compression supported.
  . Much work towards compatibility with Debian's independent
  implementation.  Changes in behavior:
      - new entries are formatted to start at column 34 by default.
      - existing entries are replaced by default.
      - new sections are alphabetized among existing sections.
      - if an entry being removed is the last one in a section, the
  section is also removed.
  . Also many new options:
      --section REGEX TITLE.
      --no-indent: disable formatting of new entries.
      --menuentry, --name: specify left-hand side of an entry.
      --dry-run: alias for --test.
      --regex REGEX: renamed from --section regex, adds to all sections
  matching REGEX by default.
      --add-once: add only to first specified or matching section.
      --align COL: start description at column COL.
      --calign COL: start continuation lines in description at COL.
      --max-width COL: wrap the description at COL.
  . New section in the Texinfo manual describing all this.
  * Info:
  Our goal with these changes to the default interface is to make Info
  documents more easily and quickly readable, especially by non-experts.
  . the PageUp and PageDown keys move through the whole document by
  default, instead of just the current node.
  . the h command shows the basic help, and H starts the Info tutorial.
  . the newly-bound x command deletes the current window, e.g., within help.
  . the scroll-step variable is set to 1 by default, for smooth scrolling.
  . the cursor-movement-scrolls-p variable is set to 1 by default, so
  link searches look through the whole document.
  . regular expression searches are supported, and are the default for
  both regular and incremental searches.
  . the new R command toggles between regexp and literal-string searches.
  . the new variable scroll-last-node controls scrolling at the end of
  the last node; by default, it now simply reports there are no more
  nodes.  To restore the old behavior, set scroll-last-node=Scroll.
  . the precise line number specified in index entries is used if available.
  . --usage=info shows usage for standalone Info.
  . lzma compression supported.
  * Distribution:
  . language support for no removed/renamed to nb, per Norwegian translators.
  . new translation: es.
  . bug fixes in make check (and elsewhere).
  . gettext 0.17, automake 1.10.1, autoconf 2.62.
* Mon Mar 10 2008 werner@suse.de
- Update to texinfo version 4.11 (4.10 was omitted)
  * Language:
  . @documentlanguage now supports an optional country code
  specification after the language code, a la gettext.
  . new command @allowcodebreaks controls breaks at _ and - within @code.
  . new command @frenchspacing controls spacing after sentences.
  . new command @fonttextsize allows changing body text font size to 10pt.
  . new command @textdegree{} produces the normal degrees symbol.
  . new command @thischapternum can be used in TeX headers/footers.
  . new commands for quotes: @quotedblleft @quotedblright
  @quoteleft @quoteright  @quotedblbase @quotesinglbase
  @guillemetleft @guillemetright @guilsinglleft @guilsinglright.
  . new option @set txicodequoteundirected produces an undirected quote
  in code and example output, instead of the regular right quote.
  . new option @set txicodequotebacktick produces a grave accent in
  code and example output, instead of the regular left quote.
  * makeinfo:
  . The @documentlanguage locale is used to translate various document strings.
  . --enable-encoding is now the default, meaning Info and plain text
  output use 8-bit characters given a supported @documentencoding.
  . new option --css-ref=URL for creating a stylesheet <link> in HTML output.
  . new option --transliterate-file-names to use a reduction-to-ASCII
  algorithm for split HTML file names, useful for non-Latin-based languages.
  . @enddots{} outputs three dots instead of four, for consistency with
  texinfo.tex.
  . the Local Variables coding: setting written by --enable-encoding now
  comes at the very end, after the tags table, so that Emacs can find
  it in more cases.
  . @allow-recursion (never documented) is deprecated and produces a warning.
  . @quote-args (never documented) is now the default behavior.
  . centering and such take account of character widths.
  . the --reference-limit option is now a no-op.
  . improvements to XML and Docbook output and the DTD.
  * texinfo.tex:
  . @thissection can now be used in custom headings, and @thischapter
  works reliably even without @set chapternewpage.  Custom headings
  have additional flexibility as well.
  * texi2dvi:
  . pdftexi2dvi is a new wrapper to `texi2dvi --pdf', equal to texi2pdf,
  for the sake of AUC-TeX which prepends `pdf' to the compilation
  command when requested to produce PDF.
  * info:
  . look for info files in the current directory first, by default.
  . when calling man, use -a if no explicit section is found.
  . avoid showing the top(1) man page for nonexistent info files.
  * install-info:
  . new options --section-regex, --remove-exactly, --debug, --test.
  * Distribution:
  . autoconf 2.60, automake 1.10, gettext 0.16.1.
  . gettext support now [external].
  . new translations: hu (Hungarian), rw (Kinyarwandan), vi (Vietnamese).
  . most common sources imported from gnulib.
* Wed Jul 11 2007 werner@suse.de
- Update to texinfo version 4.9
  * GPLv3.
  * texi2dvi:
  . new mode --build=tidy which supports compilation in a separate
  directory, where intermediate files are preserved.
  . new option --build-dir, to specify where the tidy build will take
  place, either locally or globally.  This allows avoiding the clutter
  while preserving auxiliary files.
  . new support for AUC-TeX: texi2dvi (weakly) supports arguments a la
  TeX such as `\nonstopmode\input{file.tex}'.
  . new options --ps and --dvipdf, useful especially for pstricks documents.
  . new option --src-specials, passed to TeX.
  . pdftexi2dvi is a new wrapper to `texi2dvi --pdf', equal to texi2pdf,
  for the sake of AUC-TeX which prepends `pdf' to the compilation
  command when requested to produce PDF.
  * texinfo.tex:
  . Latin1, Latin2, Latin9, and UTF-8 are supported as well as Computer
  Modern can manage.
  . png and jpg images supported in pdf output.
  . new Russian, Serbian, and Ukrainian translations for texinfo.tex:
  txi-ru.tex, txi-sr.tex, txi-uk.tex.
  . section names with \ characters work properly in pdf outlines.
  . have .toc files use @ as the escape character, instead of \.
- Update to texi2html version 1.78
  * Transliterate accented characters in file names. Use Text::Unidecode
  if detected.
  * Handle @frenchspacing, @tie, @indent, @setcontentsaftertitlepage,
  @setshortcontentsaftertitlepage and the obsolete @allow-recursion
  and @quote-arg.
  * With book style the Table of Contents is put where it is set.
  * Use more numeric entities, especially for accented letters.
  * The `examples' directory now contains an init file for Mediawiki output.
  Mediawiki is the GPL'd wiki used by Wikipedia.
  * new init file tex4ht.init. With this init file, httex or htlatex from
  tex4ht is used to format @tex and @math.
  * Init files now have a chance to override all file names, rather than just
  page names.
  * Put the images under a double licence by adding back their original GPL
  licence.
  * If SIMPLE_MENU is true the menu is simply enclosed in a preformatted
  environment.
  * The user can bypass the texi2html functions and provide his own function
  to do things similar that what is done for interfacing with LaTeX2HTML
  or tex4ht.
  * LaTeX2HTML stuff is moved out of texi2html.pl, to T2h_l2h.pm.
  * Add $USER and $DATE variables to override the defaults detected for the
  footer.
  * $TOP_FILE and $TOC_FILE are only set if set by the user. The elements
  file names are in the hash reference $Texi2HTML::THISDOC{'filename'}
  for use in init files.
  * The API for image, normal_text, paragraph and node_file_name has changed.
  * The $ENCODING variable is deprecated, replaced by $ENCODING_NAME
  and $OUT_ENCODING.
  * utf8 is used as default out file encoding. This should allow for utf8
  translations for languages which cannot use @-commands for non ascii
  characters.
  * Use entities for ``, '', ---, -- and quotes used for some formatting
  @-commands if $USE_ISO is set.
  * don't set unset MENU-ENTRY-NAME if it is similar with the NODE-NAME,
  it is useless as it is a construct that shouldn't happen.
  * avoid menu entry and description redundancy in the formatting function
  and not in the main program.
  * accept - in @-command names (compatibility with makeinfo)
  * in user-defined macro arguments a comma in brace is escaped (compatibility
  with makeinfo from texinfo 4.8.90)
  * don't add the section title to the html title when the document isn't split
  * When the file extension is set to the empty string, a trailing `.' will not
  be automatically added to file names.
  * The texi2html script is now created by make and not configure.
  * It is possible to build the translation files from outside of the
  build directory.
  * When configure detects that no Data::Dumper is present, the build scripts
  will simply copy the files instead of breaking.
  * remove handling of quotation second arg, quotation has only one arg.
  * handle nested ifset/ifclear.
  * Improved handling of @sc and @centerchap.
  * More flexible normal_text.
  * style_stack really contains the formatting @-commands.
  * caching of html generated by latex2html reenabled.
  * when not split and no section navigation is output, the about page and
  navigation direction are not output for all the elements.
* Mon Mar 26 2007 rguenther@suse.de
- Add libbz2-devel, ncurses-devel and zlib-devel BuildRequires
- Exchange libzio for libzio-devel BuildRequires
* Mon Feb 19 2007 werner@suse.de
- Avoid array subscript below array bounds (bug #246740)
* Fri Nov 10 2006 werner@suse.de
- Fix buffer overflow in texi2dvi (bug #214920)
* Mon Jul 24 2006 adrian@suse.de
- add libzio as PreReq for info
* Fri Jun 16 2006 werner@suse.de
- Re-enable texi2pdf because now tetex does not install this
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Dec 19 2005 werner@suse.de
- Add missing sym link to file list
* Thu Oct 06 2005 werner@suse.de
- Use directory for the base of temporary index files (bug #120577)
* Thu Mar 24 2005 uli@suse.de
- fixed to build with GCC4
* Thu Feb 10 2005 werner@suse.de
- Update to next bug fix release 1.76 of texi2html
* Tue Feb 01 2005 werner@suse.de
- Update to bug fix release 1.74 of texi2html
* Thu Jan 27 2005 werner@suse.de
- Fix texi2html to not loop around on broken texi files
- Remove texi2pdf from texinfo file list due already part of
  tetex
* Wed Jan 26 2005 schwab@suse.de
- Reenable strict aliasing.
* Tue Jan 25 2005 werner@suse.de
- Move texi2html version to 1.72
- Update texinfo version to 4.8
* Tue Oct 19 2004 ro@suse.de
- drop no locale support, nb is already there
* Mon Aug 09 2004 werner@suse.de
- Info: check remaining buffer size before printing into echo area
* Fri Jul 02 2004 mfabian@suse.de
- apply makeinfo.patch received from Karl Berry
  <karl@freefriends.org> fixing the problem that makeinfo 4.7
  could not process groff.texinfo anymore. See
  http://lists.gnu.org/archive/html/bug-texinfo/2004-04/msg00026.html
  http://article.gmane.org/gmane.comp.tex.texinfo.bugs/2019/
* Wed Apr 21 2004 werner@suse.de
- Use libzio together with zlib and libbz2 to support bz2 info
  files to avoids pipe()/fork()/execve() calls in install-info.
* Mon Apr 19 2004 werner@suse.de
- Be sure that texi2html find all required tools
* Fri Apr 16 2004 werner@suse.de
- Update to texinfo 4.7
- Use -fno-strict-aliasing
* Sun Mar 14 2004 schwab@suse.de
- Fix uses of snprintf and gzFile.
* Sat Jan 10 2004 adrian@suse.de
- build as user
* Wed Dec 10 2003 werner@suse.de
- Update to texinfo 4.6
* Wed May 21 2003 ro@suse.de
- fix filelist: package files in /usr/share/texinfo
* Thu Apr 24 2003 ro@suse.de
- fix install_info --delete call and move from preun to postun
* Mon Mar 10 2003 kukuk@suse.de
- Add zlib to info PreRequires [Bug #24954]
* Tue Feb 11 2003 kukuk@suse.de
- Branch off info sub package
- Add /usr/share/info/dir
* Sat Feb 08 2003 kukuk@suse.de
- Remove PreRequire for gzip, link against zlib instead (patched
  based on version from RH)
* Sat Feb 08 2003 ro@suse.de
- fixed pre/post install scripts
* Fri Feb 07 2003 ro@suse.de
- removed self-prereq again
* Thu Feb 06 2003 aj@suse.de
- Use install_info.
- Update to texinfo 4.5.
* Wed Jan 22 2003 werner@suse.de
- Request gzip before installing (bug #22992)
* Fri Aug 30 2002 werner@suse.de
- Add a warning on missed programs and say what todo (bug #18642)
* Mon Jun 17 2002 schwab@suse.de
- Update to texinfo 4.2.
* Thu Mar 07 2002 schwab@suse.de
- Update to texinfo 4.1.
* Thu Feb 14 2002 schwab@suse.de
- Fix verbose message of texi2dvi.
* Thu Jan 24 2002 okir@suse.de
- fixed tempfile races in texindex (moved all tempfiles
  into a subdirectory of /tmp).
* Wed Jan 16 2002 schwab@suse.de
- Fix bad free in "makeinfo --html".
* Tue Jun 12 2001 schwab@suse.de
- Fix directive inside macro call.
* Thu Apr 12 2001 werner@suse.de
- Use CVS snapshot of texi2html which works on glibc texinfo code
* Thu Apr 12 2001 ro@suse.de
- fixed glossary for texi2html
* Wed Apr 11 2001 werner@suse.de
- Update of texi2html and texi2roff
* Thu Sep 28 2000 werner@suse.de
- Move /usr/bin/install-info to /sbin/install-info and
  set backward compatibility symlink.
* Wed May 31 2000 werner@suse.de
- use rpm macros for common paths
* Mon Feb 28 2000 werner@suse.de
- Fix segmentation fault (close bug #1911)
* Thu Feb 03 2000 werner@suse.de
- Fixed de.po
* Wed Feb 02 2000 werner@suse.de
- Remove Makefile.Linux
- /usr/man -> /usr/share/man
- /usr/info -> /usr/share/info (man pages and main for info program)
- Install info pages of texinfo
* Wed Dec 01 1999 werner@suse.de
- small changes
* Mon Nov 29 1999 ke@suse.de
- update: version 4.0 (#600).
- use BuildRoot.
- install COPYRIGHT, etc.
- don't disable NLS.
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Mon Jan 11 1999 ro@suse.de
- info/terminal.c : TIOCGETC and TIOCGLTC are defined on alpha,
  but we can't access tchars and ltchars strutures,
  so undef both
  use tcgetattr and cfgetospeed to determine output
  speed
* Fri Jul 17 1998 werner@suse.de
- check exit satus of mkdir for temp directories
* Tue Oct 14 1997 ro@suse.de
- update to 3.12
- ready for autobuild
* Fri Oct 10 1997 florian@suse.de
- update to texinfo 3.11
* Sun Jun 22 1997 florian@suse.de
- add debian-changes to support ANSI-cursor movements
- add texi2html 1.51
- add texi2roff 2.0
* Mon Apr 14 1997 florian@suse.de
- cosmetic changes, just done in preparation for glibc
* Thu Jan 02 1997 florian@suse.de
- Update auf neue Version 3.9.
openSUSE Build Service is sponsored by