Blob Blame History Raw
Name:		latex2rtf
Version:	2.3.5
Release:	1%{?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)

# Skip broken docs
Patch0:		latex2rtf-2.3.4-docs.patch

# For running the tests
BuildRequires:		ImageMagick
BuildRequires:		texinfo
BuildRequires:		texinfo-tex
%if 0%{?rhel} == 5
BuildRequires:		tetex-latex
%else
BuildRequires:		tex(latex)
%endif

%if 0%{?fedora} >= 18
BuildRequires:		texlive-a4wide
BuildRequires:		texlive-courier
BuildRequires:		texlive-helvetic
BuildRequires:		texlive-psfrag
BuildRequires:		texlive-times
%endif

%if 0%{?rhel} > 0
BuildRequires:		man
%else
BuildRequires:		man2html-core
%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
%patch0 -p1 -b .doc
chmod a-x cfg/*.cfg
find -name "*.o" -delete
# Fix permissions
find . -type f -exec chmod 644 {} \;
chmod 755 test/bracecheck
chmod 755 scripts/latex2png

# 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

%build
# Set the necessary config options, including location of config files
make CFLAGS="%{optflags} -DUNIX -fsigned-char" DESTDIR=%{_usr} CFGDIR=/share/%{name}/cfg %{?_smp_mflags}

%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}%{_usr}
make install-info DESTDIR=%{buildroot}%{_usr}
# 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.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 17 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.3.5-1
- Update to 2.3.5.

* Sun Nov 17 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.3.4-1
- Update to 2.3.4.

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Wed Mar 06 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.3.3-1
- Update to 2.3.3.

* Wed Feb 27 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.3.2a-1
- Update to 2.3.2a.

* Fri Feb 15 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.3.2-1
- Update to 2.3.2.

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Tue Oct 16 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 2.3.1-1
- Update to 2.3.1.

* Tue Oct 16 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 2.3.0-2
- Fixed build in EPEL.

* Tue Oct 16 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 2.3.0-1
- Update to 2.3.0.

* Wed Sep 26 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 2.2.1c-1
- Update to 2.2.1c.

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Thu Jun 07 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 2.2.0-2
- Fix configuration directory location.

* Mon Jun 04 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 2.2.0-1
- Update to 2.2.0.

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* 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.