Skip to content

Instantly share code, notes, and snippets.

@halton
Forked from KeithYue/texinfo.spec
Created April 12, 2013 04:31
Show Gist options
  • Save halton/5369366 to your computer and use it in GitHub Desktop.
Save halton/5369366 to your computer and use it in GitHub Desktop.
%define tex_texinfo %{_datadir}/texmf/tex/texinfo
#
# Example spec file for cdplayer app...
#
Summary: Tools needed to create Texinfo format documentation files
Name: texinfo
Version: 5.1
Release: 1
Source: http://ftp.gnu.org/gnu/texinfo/texinfo-5.1.tar.gz
URL: http://www.gnu.org/software/texinfo/
Distribution: WSS Linux
Vendor: White Socks Software, Inc.
License: GNU
BuildRequires:zlib-devel, ncurses-devel
%description
Texinfo is a documentation system that can produce both online
information and printed output from a single source file. The GNU
Project uses the Texinfo file format for most of its documentation.
%package -n info
Summary: A stand-alone TTY-based reader for GNU texinfo documentation
Group: System Environment/Base
%description -n info
The GNU project uses the texinfo file format for much of its
documentation. The info package provides a standalone TTY-based
browser program for viewing texinfo files.
%package tex
Summary: Tools for formatting Texinfo documentation files using TeX
Group: Applications/Publishing
Requires: texinfo = %{version}-%{release}
Requires: tetex
Requires(post): %{_bindir}/texconfig-sys
Requires(postun): %{_bindir}/texconfig-sys
%description tex
Texinfo is a documentation system that can produce both online
information and printed output from a single source file. The GNU
Project uses the Texinfo file format for most of its documentation.
The texinfo-tex package provides tools to format Texinfo documents
for printing using TeX.
%prep
%setup -q -n %{name}-5.1
%build
%configure
make %{?_smp_mflags}
%install
rm -rf ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}/sbin
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
%find_lang %name
%clean
rm -rf ${RPM_BUILD_ROOT}
%post
if [ -f %{_infodir}/texinfo ]; then # --excludedocs?
/sbin/install-info %{_infodir}/texinfo %{_infodir}/dir || :
fi
%preun
if [ $1 = 0 ]; then
if [ -f %{_infodir}/texinfo ]; then # --excludedocs?
/sbin/install-info --delete %{_infodir}/texinfo %{_infodir}/dir || :
fi
fi
%post -n info
if [ -f %{_infodir}/info-stnd.info ]; then # --excludedocs?
/sbin/install-info %{_infodir}/info-stnd.info %{_infodir}/dir
fi
if [ -x /bin/sed ]; then
/bin/sed -i '/^This is.*produced by makeinfo.*from/d' %{_infodir}/dir || :
fi
%preun -n info
if [ $1 = 0 ]; then
if [ -f %{_infodir}/info-stnd.info ]; then # --excludedocs?
/sbin/install-info --delete %{_infodir}/info-stnd.info %{_infodir}/dir \
|| :
fi
fi
%post tex
%{_bindir}/texconfig-sys rehash 2> /dev/null || :
%postun tex
%{_bindir}/texconfig-sys rehash 2> /dev/null || :
%files -f %{name}.lang
%defattr(-,root,root,-)
%{_bindir}
%{_datadir}
%{_infodir}
%{_mandir}
%files -n info
%{_bindir}
%{_datadir}
%{_infodir}
%{_mandir}
%files tex
%{_bindir}
%{_mandir}
# %files -f %{name}.lang
# %defattr(-,root,root,-)
# # %doc AUTHORS ChangeLog INTRODUCTION NEWS README TODO COPYING
# %{_bindir}/makeinfo
# %{_datadir}/texinfo
# %{_infodir}/texinfo*
# %{_mandir}/man1/makeinfo.1*
# %{_mandir}/man5/texinfo.5*
#
# %files -n info
# %defattr(-,root,root,-)
# %config(noreplace) %verify(not md5 size mtime) %{_infodir}/dir
# %doc COPYING
# %{_bindir}/info
# %{_bindir}/infokey
# %{_infodir}/info.info*
# %{_infodir}/info-stnd.info*
# /sbin/install-info
# %{_mandir}/man1/info.1*
# %{_mandir}/man1/infokey.1*
# %{_mandir}/man1/install-info.1*
# %{_mandir}/man5/info.5*
#
# %files tex
# %defattr(-,root,root)
# %{_bindir}/texindex
# %{_bindir}/texi2dvi
# %{_bindir}/texi2pdf
# %{_bindir}/pdftexi2dvi
# %{tex_texinfo}/
# %{_mandir}/man1/texindex.1*
# %{_mandir}/man1/texi2dvi.1*
# %{_mandir}/man1/texi2pdf.1*
# %{_mandir}/man1/pdftexi2dvi.1*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment