From f313910fefa12aacd64f5c85b8bf84885c23a0a6 Mon Sep 17 00:00:00 2001 From: Jussi Lehtola Date: Mar 22 2009 09:04:44 +0000 Subject: Sun Mar 22 Jussi Lehtola - 1.9.19-5 - Import to Fedora. --- diff --git a/latex2rtf.patch b/latex2rtf.patch new file mode 100644 index 0000000..0ff1c33 --- /dev/null +++ b/latex2rtf.patch @@ -0,0 +1,89 @@ +diff -up latex2rtf-1.9.19/doc/latex2rtf.info.orig latex2rtf-1.9.19/doc/latex2rtf.info +--- latex2rtf-1.9.19/doc/latex2rtf.info.orig 2007-11-20 17:36:11.000000000 +0200 ++++ latex2rtf-1.9.19/doc/latex2rtf.info 2008-11-02 19:45:44.000000000 +0200 +@@ -3,6 +3,11 @@ latex2rtf.texi. + + + ++INFO-DIR-SECTION LaTeX2RTF ++START-INFO-DIR-ENTRY ++* latex2rtf: (latex2rtf). LaTeX2RTF reference. ++END-INFO-DIR-ENTRY ++ +  + File: latex2rtf.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) + +diff -up latex2rtf-1.9.19/Makefile.orig latex2rtf-1.9.19/Makefile +--- latex2rtf-1.9.19/Makefile.orig 2007-11-18 08:10:57.000000000 +0200 ++++ latex2rtf-1.9.19/Makefile 2008-11-02 19:48:42.000000000 +0200 +@@ -23,21 +23,21 @@ LINK_FLAGS = -lm + #CFLAGS:=$(CFLAGS) -Zwin32 + + #Base directory - adapt as needed +-PREFIX=$(PREFIX_DRIVE)/usr/local ++PREFIX=@PREFIX@ + + #Name of executable binary --- beware of 8.3 restriction under DOS + BINARY_NAME=latex2rtf$(EXE_SUFFIX) + + # Location of binary, man, info, and support files - adapt as needed +-BIN_INSTALL=$(PREFIX)/bin +-MAN_INSTALL=$(PREFIX)/man/man1 +-INFO_INSTALL=$(PREFIX)/info +-SUPPORT_INSTALL=$(PREFIX)/share/latex2rtf +-CFG_INSTALL=$(PREFIX)/share/latex2rtf/cfg ++BIN_INSTALL=$(PREFIX)/@BINDIR@ ++MAN_INSTALL=$(PREFIX)/@MANDIR@/man1 ++INFO_INSTALL=$(PREFIX)/@INFODIR@ ++SUPPORT_INSTALL=$(PREFIX)/@DATADIR@/latex2rtf ++CFG_INSTALL=@DATADIR@/latex2rtf/cfg + + # Nothing to change below this line + +-CFLAGS:=$(CFLAGS) -g -Wall -fsigned-char ++CFLAGS:=@OPTFLAGS@ -DUNIX -fsigned-char + + LIBS= + #LIBS=-lMallocDebug -force_flat_namespace +@@ -205,12 +205,12 @@ install: latex2rtf doc/latex2rtf.1 $(CFG + cd doc && $(MAKE) + $(MKDIR) $(BIN_INSTALL) + $(MKDIR) $(MAN_INSTALL) +- $(MKDIR) $(CFG_INSTALL) ++ $(MKDIR) $(PREFIX)/$(CFG_INSTALL) + cp $(BINARY_NAME) $(BIN_INSTALL) + cp scripts/latex2png $(BIN_INSTALL) + cp doc/latex2rtf.1 $(MAN_INSTALL) + cp doc/latex2png.1 $(MAN_INSTALL) +- cp $(CFGS) $(CFG_INSTALL) ++ cp $(CFGS) $(PREFIX)/$(CFG_INSTALL) + cp doc/latex2rtf.html $(SUPPORT_INSTALL) + cp doc/latex2rtf.pdf $(SUPPORT_INSTALL) + cp doc/latex2rtf.txt $(SUPPORT_INSTALL) +@@ -232,7 +232,7 @@ install: latex2rtf doc/latex2rtf.1 $(CFG + install-info: doc/latex2rtf.info + $(MKDIR) $(INFO_INSTALL) + cp doc/latex2rtf.info $(INFO_INSTALL) +- install-info --info-dir=$(INFO_INSTALL) doc/latex2rtf.info ++# install-info --info-dir=$(INFO_INSTALL) doc/latex2rtf.info + + realclean: checkdir clean + $(RM) -f makefile.depend latex2rtf-$(VERSION).tar.gz +@@ -245,7 +245,7 @@ splint: + pkg: + $(MKDIR) $(PKG_CONTENTS)/$(BIN_INSTALL) + $(MKDIR) $(PKG_CONTENTS)/$(MAN_INSTALL) +- $(MKDIR) $(PKG_CONTENTS)/$(CFG_INSTALL) ++ $(MKDIR) $(PKG_CONTENTS)/$(PREFIX)/$(CFG_INSTALL) + $(MKDIR) $(PKG_CONTENTS)/$(SUPPORT_INSTALL) + $(MKDIR) $(PKG_RESOURCES) + $(MKDIR) $(DMG_DIR) +@@ -254,7 +254,7 @@ pkg: + cp scripts/latex2png $(PKG_CONTENTS)/$(BIN_INSTALL) + cp doc/latex2rtf.1 $(PKG_CONTENTS)/$(MAN_INSTALL) + cp doc/latex2png.1 $(PKG_CONTENTS)/$(MAN_INSTALL) +- cp $(CFGS) $(PKG_CONTENTS)/$(CFG_INSTALL) ++ cp $(CFGS) $(PKG_CONTENTS)/$(PREFIX)/$(CFG_INSTALL) + cp doc/latex2rtf.html $(PKG_CONTENTS)/$(SUPPORT_INSTALL) + cp doc/latex2rtf.pdf $(PKG_CONTENTS)/$(SUPPORT_INSTALL) + cp doc/latex2rtf.txt $(PKG_CONTENTS)/$(SUPPORT_INSTALL) diff --git a/latex2rtf.spec b/latex2rtf.spec new file mode 100644 index 0000000..d99dab2 --- /dev/null +++ b/latex2rtf.spec @@ -0,0 +1,87 @@ +Name: latex2rtf +Version: 1.9.19 +Release: 5%{?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: tex(latex) +BuildRequires: ImageMagick +BuildRequires: latex2html + +# 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 +make check + +%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 +* Sat Mar 21 2009 Jussi Lehtola - 1.9.19-5 +- Keep documentation time stamps when converting encoding. + +* Fri Mar 13 2009 Jussi Lehtola - 1.9.19-4 +- Added check phase. + +* Thu Mar 12 2009 Jussi Lehtola - 1.9.19-3 +- Review fixes. + +* Sun Dec 21 2008 Jussi Lehtola - 1.9.19-2 +- Fix perms on config files. + +* Sun Nov 02 2008 Jussi Lehtola - 1.9.19-1 +- First release. diff --git a/sources b/sources index e69de29..8b37dd4 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +8a3b920d59f6b38736aa256c26374472 latex2rtf-1.9.19.tar.gz