1Name: texi2html
2Version: 5.0
3Release: 1
4# GPLv2+ is for the code
5# OFSFDL (Old FSF Documentation License) for the documentation
6# CC-BY-SA or GPLv2 for the images
7License: GPLv2+ and OFSFDL and (CC-BY-SA or GPLv2)
8Group: Applications/Text
9Summary: A highly customizable texinfo to HTML and other formats translator
10Source0: http://download.savannah.nongnu.org/releases/%{name}/%{name}-%{version}.tar.bz2
11URL: http://www.nongnu.org/texi2html/
12Requires(post): /sbin/install-info
13Requires(preun): /sbin/install-info
14# perl is picked up automatically in most cases and the package may have
15# a different name so it is better not to require it. Moreover such old perl
16# is unlikely to show up in a rpm based distribution.
17#Requires: perl >= 5.004
18Requires: latex2html
19BuildRequires: perl(Text::Unidecode)
20# not detected automatically because it is required at runtime based on
21# user configuration
22Requires: perl(Text::Unidecode)
23BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
24BuildArch: noarch
25
26%description
27The basic purpose of texi2html is to convert Texinfo documents into HTML,
28and other formats.  Configuration files written in perl provide fine degree
29of control over the final output, allowing most every aspect of the final
30output not specified in the Texinfo input file to be specified.
31
32%prep
33%setup -q
34
35%build
36%configure
37make %{?_smp_mflags}
38
39%install
40rm -rf $RPM_BUILD_ROOT
41make install DESTDIR=$RPM_BUILD_ROOT
42rm -f $RPM_BUILD_ROOT%{_infodir}/dir
43
44ln -s texi2any $RPM_BUILD_ROOT%{_bindir}/texi2html
45
46rm -rf __dist_examples
47mkdir -p __dist_examples
48cp -a examples __dist_examples
49rm -f __dist_examples/examples/Makefile*
50
51# directories shared by all the texinfo implementations for common
52# config files, like htmlxref.cnf
53mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/texinfo
54
55
56%clean
57rm -rf $RPM_BUILD_ROOT
58
59%post
60/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
61
62%preun
63if [ $1 = 0 ]; then
64  /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
65fi
66
67%files
68%defattr(-,root,root,-)
69%doc AUTHORS COPYING ChangeLog NEWS README TODO %{name}.init
70%doc __dist_examples/examples/
71%{_bindir}/%{name}
72%{_bindir}/texi2any
73%{_mandir}/man*/%{name}*
74%{_infodir}/%{name}.info*
75%dir %{_datadir}/texinfo/
76%dir %{_datadir}/texinfo/init
77%{_datadir}/texinfo/init/*.init
78%{_datadir}/texinfo/html/%{name}.html
79%dir %{_datadir}/%{name}/i18n/
80%{_datadir}/%{name}/i18n/*
81%dir %{_datadir}/%{name}/images/
82%{_datadir}/%{name}/images/*
83%dir %{_sysconfdir}/texinfo
84
85%changelog
86* Sun Sep  9 2007 Patrice Dumas <pertusus@free.fr> 5.0-1
87- update to 5.0
88
89* Mon Nov 14 2005 Patrice Dumas <pertusus@free.fr> 1.77-1
90- cleanups
91
92* Mon Mar 23 2004 Patrice Dumas <pertusus@free.fr> 0:1.69-0.fdr.1
93- Initial build.
94