rpms/writer2latex/devel writer2latex.spec, NONE, 1.1 writer2latex05.rh.patch, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Caolan McNamara (caolanm)
fedora-extras-commits at redhat.com
Sat Dec 1 20:23:12 UTC 2007
Author: caolanm
Update of /cvs/pkgs/rpms/writer2latex/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14601/devel
Modified Files:
.cvsignore sources
Added Files:
writer2latex.spec writer2latex05.rh.patch
Log Message:
--- NEW FILE writer2latex.spec ---
%define _with_gcj_support 1
%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}
Name: writer2latex
Version: 0.5
Release: 1%{?dist}
Summary: Writer2LateX Document Converter
License: LGPLv2
Url: http://www.hj-gym.dk/~hj/writer2latex/
Source0: http://www.hj-gym.dk/~hj/writer2latex/writer2latex05.zip
Patch0: writer2latex05.rh.patch
BuildRequires: ant, openoffice.org-core
Group: Text Processing/Markup/XML
%if ! %{gcj_support}
Buildarch: noarch
%endif
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: xalan-j2, xerces-j2
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
%endif
%description
Writer2LaTeX is a utility written in java. It converts OpenOffice.org documents
â in particular documents containing formulas â into other formats. It is
actually a collection of four converters, i.e.:
1) Writer2LaTeX converts documents into LaTeX 2e format for high quality
typesetting.
2) Writer2BibTeX extracts bibliographic data from a document and stores it in
BibTeX format (works together with Writer2LaTeX).
3) Writer2xhtml converts documents into XHTML 1.0 or XHTML 1.1+MathML 2.0 with
CSS2.
4) Calc2xhtml is a companion to Writer2xhtml that converts OOo Calc documents
to XHTML 1.0 with CSS2 to display your spreadsheets on the web.
%package javadoc
Summary: Javadoc for %{name}
Group: Development/Documentation
%description javadoc
Javadoc for %{name}.
%package -n openoffice.org-%{name}
Summary: OpenOffice.org Writer2LateX Extension
Group: Applications/Productivity
Requires: openoffice.org-core
Requires(pre): openoffice.org-core
Requires(post): openoffice.org-core
Requires(preun): openoffice.org-core
Requires(postun): openoffice.org-core
%description -n openoffice.org-%{name}
Document Converter Extension for OpenOffice.org to provide
XHTML, LaTeX and BibTeX export filters.
%prep
%setup -q -n writer2latex05
%patch0 -p1 -b .rh.patch
sed -i -e "s#LIBDIR#%{_libdir}#" build.xml
%build
ant jar javadoc package
%install
rm -rf $RPM_BUILD_ROOT
# jar
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 target/lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} ${jar/-%{version}/}; done)
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -r target/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
pushd $RPM_BUILD_ROOT%{_javadocdir}
ln -s %{name}-%{version} %{name}
popd
# OOo extension
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/writer2latex.uno.pkg
unzip target/lib/writer2latex.uno.pkg -d $RPM_BUILD_ROOT%{_datadir}/writer2latex.uno.pkg
%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%post
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%postun
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%pre -n openoffice.org-%{name}
if [ $1 -gt 1 ]; then
# Upgrade => deregister old extension
unopkg remove --shared org.openoffice.legacy.writer2latex.uno.pkg -env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1 > /dev/null 2>&1 || :
fi
%post -n openoffice.org-%{name}
# register extension
unopkg add --shared --link %{_datadir}/writer2latex.uno.pkg -env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1 || :
%preun -n openoffice.org-%{name}
if [ $1 -eq 0 ]; then
# not upgrading => deregister
unopkg remove --shared org.openoffice.legacy.writer2latex.uno.pkg -env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1 || :
fi
%postun -n openoffice.org-%{name}
# clear disk cache
unopkg list --shared -env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1 > /dev/null 2>&1 || :
%files
%defattr(0644,root,root,0755)
%doc COPYING.TXT Readme.txt History.txt
%{_javadir}/*
%if %{gcj_support}
%attr(-,root,root) %{_libdir}/gcj/%{name}
%endif
%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}
%{_javadocdir}/%{name}-%{version}
%files -n openoffice.org-%{name}
%defattr(0644,root,root,0755)
%{_datadir}/writer2latex.uno.pkg
%changelog
* Sun Dec 1 2007 Caolan McNamara <caolanm at redhat.com> 0.5-1
- initial version
writer2latex05.rh.patch:
--- NEW FILE writer2latex05.rh.patch ---
diff -ru writer2latex05.orig/build.xml writer2latex05/build.xml
--- writer2latex05.orig/build.xml 2006-11-02 10:15:42.000000000 +0000
+++ writer2latex05/build.xml 2007-11-16 08:47:53.000000000 +0000
@@ -8,7 +8,7 @@
<project name="w2l" default="help" basedir=".">
<!-- set this property to the location of your SO/OOo installation -->
- <property name="OFFICE_HOME" location=""/>
+ <property name="OFFICE_HOME" location="LIBDIR/openoffice.org"/>
<description>writer2latex - build file</description>
diff -ru writer2latex05.orig/source/writer2latex/office/ImageLoader.java writer2latex05/source/writer2latex/office/ImageLoader.java
--- writer2latex05.orig/source/writer2latex/office/ImageLoader.java 2007-04-17 08:30:42.000000000 +0100
+++ writer2latex05/source/writer2latex/office/ImageLoader.java 2007-11-16 09:01:16.000000000 +0000
@@ -107,8 +107,8 @@
}
// TODO: Use another base64 decoder. This one is "nonstandard"
try {
- blob = new sun.misc.BASE64Decoder().decodeBuffer(buf.toString());
- } catch (IOException e) {
+ blob = org.apache.xerces.impl.dv.util.Base64.decode(buf.toString());
+ } catch (Exception e) {
System.err.println("Oops - error converting base64");
}
sMIME = MIMETypes.getMagicMIMEType(blob);
--- writer2latex05.orig/build.xml 2007-11-16 11:19:54.000000000 +0000
+++ writer2latex05/build.xml 2007-11-16 11:30:50.000000000 +0000
@@ -85,7 +85,7 @@
<attribute name="Main-Class" value="writer2latex.Application"/>
<!-- OOo needs this to register the filter: -->
<attribute name="RegistrationClassName" value="writer2latex.filter.W2LExportFilter" />
- <attribute name="Class-Path" value="jaxp.jar parser.jar"/>
+ <attribute name="Class-Path" value="jaxp.jar jaxp_parser_impl.jar"/>
</manifest>
</jar>
</target>
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/writer2latex/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 1 Dec 2007 17:54:22 -0000 1.1
+++ .cvsignore 1 Dec 2007 20:22:38 -0000 1.2
@@ -0,0 +1 @@
+writer2latex05.zip
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/writer2latex/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 1 Dec 2007 17:54:22 -0000 1.1
+++ sources 1 Dec 2007 20:22:38 -0000 1.2
@@ -0,0 +1 @@
+aaff584834819cf8de9cf85d1f5280c1 writer2latex05.zip
More information about the fedora-extras-commits
mailing list