Blob Blame History Raw
Name:		latex2rtf
Version:	2.1.0
Release:	2%{?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
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

# For running the tests
BuildRequires:		ImageMagick
BuildRequires:		texinfo
BuildRequires:		texinfo-tex
%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 text processors (including Microsoft
Word for Windows and Word for Macintosh). 

%prep
%setup -q
chmod a-x cfg/*.cfg
find -name "*.o" -delete

%build
# Set the necessary config options, including location of config files
make CFLAGS="%{optflags} -DUNIX -fsigned-char" CFG_INSTALL=%{_datadir}/%{name}/cfg %{?_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 %{buildroot}
make install PREFIX=%{buildroot}%{_prefix} MAN_INSTALL=%{buildroot}%{_mandir}/man1
make install-info PREFIX=%{buildroot}%{_prefix} INFO_INSTALL=%{buildroot}%{_infodir}
# Remove unnecessary file from infodir
rm -f %{buildroot}%{_infodir}/dir

%check
make check

%clean
rm -rf %{buildroot}

%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}/latex2rtf
%{_bindir}/latex2png
%{_mandir}/man1/latex2rtf.1.*
%{_mandir}/man1/latex2png.1.*
%{_infodir}/latex2rtf.info.*
%{_datadir}/latex2rtf/


%changelog
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Fri Mar 05 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 2.1.0-1
- Update to 2.1.0.

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.19-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon Apr 27 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.9.19-8
- Added patch to fix image height on 64-bit architectures.
  https://bugzilla.redhat.com/show_bug.cgi?id=497752

* Wed Mar 25 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 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 <jussilehtola@fedoraproject.org> - 1.9.19-6
- Fix EPEL build.

* Sat Mar 21 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.9.19-5
- Keep documentation time stamps when converting encoding.

* Fri Mar 13 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.9.19-4
- Added check phase.

* Thu Mar 12 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.9.19-3
- Review fixes.

* Sun Dec 21 2008 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.9.19-2
- Fix perms on config files.

* Sun Nov 02 2008 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.9.19-1
- First release.