Name: latex2rtf
Version: 1.9.19
Release: 7%{?dist}
Summary: LaTeX to RTF converter that handles equations, figures, and cross-references
Group: Applications/File
License: GPLv2+
URL: http://latex2rtf.sourceforge.net/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
# Patch to makefile changing man and info file locations and compiler flags
Patch0: latex2rtf.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# For running the tests
BuildRequires: ImageMagick
BuildRequires: latex2html
%if 0%{?rhel} == 5
BuildRequires: tetex-latex
%else
BuildRequires: tex(latex)
%endif
# For converting images
Requires: ImageMagick
# Info file requirement
Requires(post): info
Requires(preun): info
%description
LaTeX2rtf is a translator program which is intended to translate a LaTeX
document (precisely: the text and a limited subset of LaTeX tags) into the RTF
format which can be imported by several textprocessors (including Microsoft
Word for Windows and Word for Macintosh).
%prep
%setup -q
%patch0 -p1
chmod a-x cfg/*.cfg
%build
sed -i 's#@OPTFLAGS@#%{optflags}#g;s#@PREFIX@#%{buildroot}#g;s#@BINDIR@#%{_bindir}#g;s#@MANDIR@#%{_mandir}#g;s#@INFODIR@#%{_infodir}#g;s#@DATADIR@#%{_datadir}#g' Makefile
make %{?_smp_mflags}
# Change encoding of documentation
for txtfile in ChangeLog Copyright; do
iconv -f ASCII -t UTF-8 $txtfile >$txtfile.new && \
touch -r $txtfile $txtfile.new && \
mv $txtfile{.new,}
done
%install
rm -rf $RPM_BUILD_ROOT
make install
make install-info
%check
%if 0%{?rhel} != 0
# Don't do anything since make check fails in a segfault at least on ppc
%else
# Otherwise perform check
make check
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/install-info --quiet %{_infodir}/%{name}.info %{_infodir}/dir || :
%preun
if [ $1 = 0 ] ; then
/sbin/install-info --quiet --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
fi
%files
%defattr(-,root,root,-)
%doc ChangeLog Copyright doc/latex2rtf.html doc/latex2rtf.pdf doc/copying.txt doc/credits
%{_bindir}/*
%{_mandir}/man1/*
%{_infodir}/*
%{_datadir}/%{name}
%changelog
* Wed Mar 25 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 1.9.19-7
- Retry EPEL fix: disable check phase which doesn't seem to work for some reason on EPEL 5 ppc (segfault in list.tex).
* Sun Mar 22 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 1.9.19-6
- Fix EPEL build.
* Sat Mar 21 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 1.9.19-5
- Keep documentation time stamps when converting encoding.
* Fri Mar 13 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 1.9.19-4
- Added check phase.
* Thu Mar 12 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 1.9.19-3
- Review fixes.
* Sun Dec 21 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 1.9.19-2
- Fix perms on config files.
* Sun Nov 02 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 1.9.19-1
- First release.