rpms/openoffice.org-ooolatex/F-7 ooolatex-fix-path.patch, NONE, 1.1 openoffice.org-ooolatex.spec, NONE, 1.1 sources, 1.1, 1.2

Alex Lancaster (alexlan) fedora-extras-commits at redhat.com
Fri Apr 11 07:48:42 UTC 2008


Author: alexlan

Update of /cvs/extras/rpms/openoffice.org-ooolatex/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28847/F-7

Modified Files:
	sources 
Added Files:
	ooolatex-fix-path.patch openoffice.org-ooolatex.spec 
Log Message:
Importing from devel/ branch.


ooolatex-fix-path.patch:

--- NEW FILE ooolatex-fix-path.patch ---
diff -r -u OOoLatex-4.0.0-beta-2-linux.oxt/AddonRegistry.xcu OOoLatex-4.0.0-beta-2-linux.oxt.mod/AddonRegistry.xcu
--- OOoLatex-4.0.0-beta-2-linux.oxt/AddonRegistry.xcu	2007-11-03 09:05:23.000000000 -0700
+++ OOoLatex-4.0.0-beta-2-linux.oxt.mod/AddonRegistry.xcu	2008-04-05 01:57:26.000000000 -0700
@@ -15,10 +15,10 @@
 			<value></value>
 		</prop>
 		<prop oor:name="GsPath" oor:type="xs:string">
-			<value></value>
+			<value>file:///usr/bin/</value>
 		</prop>
 		<prop oor:name="LatexPath" oor:type="xs:string">
-			<value></value>
+			<value>file:///usr/bin/</value>
 		</prop>
 		<node oor:name="ShortCuts">
 			<node oor:name="EquationWriter" oor:op="replace">
diff -r -u OOoLatex-4.0.0-beta-2-linux.oxt/OOoLatex/OOoLatexAbout.xba OOoLatex-4.0.0-beta-2-linux.oxt.mod/OOoLatex/OOoLatexAbout.xba
--- OOoLatex-4.0.0-beta-2-linux.oxt/OOoLatex/OOoLatexAbout.xba	2007-11-23 15:09:39.000000000 -0700
+++ OOoLatex-4.0.0-beta-2-linux.oxt.mod/OOoLatex/OOoLatexAbout.xba	2008-04-05 01:01:00.000000000 -0700
@@ -57,7 +57,7 @@
 end sub
 
 sub SysLogButton()
-	if not FileExists( sPkgPath &amp; &quot;System.out&quot; ) then
+	if not FileExists( sUserPath &amp; &quot;System.out&quot; ) then
 		sMsg = &quot;You have to use the module Equation once to generate the system logs.&quot; 
 	else
 		sMsg = ReadAboutFile( &quot;System.out&quot;)
diff -r -u OOoLatex-4.0.0-beta-2-linux.oxt/OOoLatex/OOoLatexEquation.xba OOoLatex-4.0.0-beta-2-linux.oxt.mod/OOoLatex/OOoLatexEquation.xba
--- OOoLatex-4.0.0-beta-2-linux.oxt/OOoLatex/OOoLatexEquation.xba	2007-11-23 15:09:39.000000000 -0700
+++ OOoLatex-4.0.0-beta-2-linux.oxt.mod/OOoLatex/OOoLatexEquation.xba	2008-04-05 01:37:39.000000000 -0700
@@ -202,7 +202,7 @@
 	else 					
 	&apos;*** MacOSX/Linux ***
 		sShellCommand = &quot;sh&quot;
-		sShellArg = &quot;&apos;&quot; &amp; ConvertFromURL(sPkgPath) &amp; &quot;OOoLatex.sh&apos; &quot; &amp; sFormat &amp;_
+		sShellArg = &quot;&apos;&quot; &amp; ConvertFromURL(sUserPath) &amp; &quot;OOoLatex.sh&apos; &quot; &amp; sFormat &amp;_
 					TranspOpt &amp; iGraphicDPI &amp; &quot; &apos;&quot;  &amp; ConvertFromURL(sTmpPath) &amp; &quot;&apos;&quot; 
 	End if
 	
diff -r -u OOoLatex-4.0.0-beta-2-linux.oxt/OOoLatex/OOoLatexSysConfig.xba OOoLatex-4.0.0-beta-2-linux.oxt.mod/OOoLatex/OOoLatexSysConfig.xba
--- OOoLatex-4.0.0-beta-2-linux.oxt/OOoLatex/OOoLatexSysConfig.xba	2007-11-23 15:09:39.000000000 -0700
+++ OOoLatex-4.0.0-beta-2-linux.oxt.mod/OOoLatex/OOoLatexSysConfig.xba	2008-04-05 01:21:26.000000000 -0700
@@ -81,7 +81,7 @@
 	end if
 	
 	&apos;Reset button
-	if FileExists(sPkgPath &amp; &quot;OOoLatex.sh&quot;) then
+	if FileExists(sUserPath &amp; &quot;OOoLatex.sh&quot;) then
 		oDlgSysConfig.getControl(&quot;ResetButton&quot;).setEnable(true)
 	else
 		oDlgSysConfig.getControl(&quot;ResetButton&quot;).setEnable(fase)
@@ -100,7 +100,7 @@
 	if getGUIType = 1 then sGS  = &quot;gswin32c&quot; else sGS = &quot;gs&quot;
 	if getGUIType = 1 then sExt = &quot;.exe&quot;     else sExt = &quot;&quot;
 
-	if not FileExists(sPkgPath &amp; &quot;OOoLatex.sh&quot;) then
+	if not FileExists(sUserPath &amp; &quot;OOoLatex.sh&quot;) then
 		ProgramNotFound(&quot;You have to configure your system before using the module Equation&quot;)
 	elseif not FileExists(oSystemInfo.GsPath &amp; sGS &amp; sExt) then
 		ProgramNotFound(&quot;Check the path to your Ghostdcript distribution, I cannot find &quot; &amp; sGS &amp; &quot; !&quot;)
@@ -146,9 +146,9 @@
 	oFileAccess = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
 	&apos;*** Remove the files OOoLatex.sh and Sytem.out
 
-	cURL = ConvertToURL( sPkgPath &amp; &quot;OOoLatex.sh&quot; )
+	cURL = ConvertToURL( sUserPath &amp; &quot;OOoLatex.sh&quot; )
 	If oFileAccess.exists( cURL ) Then oFileAccess.kill( cURL )	
-	cURL = ConvertToURL( sPkgPath &amp; &quot;System.out&quot; )
+	cURL = ConvertToURL( sUserPath &amp; &quot;System.out&quot; )
 	If oFileAccess.exists( cURL ) Then oFileAccess.kill( cURL )	
 	
 	&apos;Disable the reset button
@@ -256,7 +256,7 @@
 
 	&apos; Open sevice file and an output stream...
 	oFileAccess = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)		
-	cURL = ConvertToURL( sPkgPath &amp; &quot;OOoLatex.sh&quot; )
+	cURL = ConvertToURL( sUserPath &amp; &quot;OOoLatex.sh&quot; )
 
 	&apos; Get the path saved in the registry. 
 	oSystemInfo = GetConfigAccess( &quot;/ooo.ext.ooolatex.Registry/SystemInfo&quot;, false)	
@@ -435,7 +435,7 @@
 	oTextStream  = createUnoService(&quot;com.sun.star.io.TextOutputStream&quot;)
 
 	&apos; Generate the OOoLatex script in the root of the package.
-	cURL = ConvertToURL( sPkgPath &amp; &quot;OOoLatex.sh&quot; )
+	cURL = ConvertToURL( sUserPath &amp; &quot;OOoLatex.sh&quot; )
 	If oFileAccess.exists( cURL ) Then oFileAccess.kill( cURL )
 
 	&apos;Generatio of the script on sOOoLatex.
@@ -455,9 +455,8 @@
 				 &quot;sys=$(uname -s)&quot; &amp; chr(10) &amp;_
 				 &quot;[ &quot;&quot;$cpu&quot;&quot; = &quot;&quot;powerpc&quot;&quot; -o &quot;&quot;$mac&quot;&quot; = &quot;&quot;ppc&quot;&quot; ] &amp;&amp; cpuType=ppc || cpuType=i386 &quot; &amp; chr(10) &amp;_
 				 &quot;[ &quot;&quot;$sys&quot;&quot; = &quot;&quot;Darwin&quot;&quot; ] &amp;&amp; osType=MacOSX || osType=Linux &quot; &amp; chr(10) &amp;_
-				 &quot;PkgDir=&quot;&quot;&quot; &amp; ConvertFromURL(sPkgPath) &amp; &quot;&quot;&quot;&quot; &amp; chr(10) &amp;_
+				 &quot;PkgDir=&quot;&quot;&quot; &amp; ConvertFromURL(sUserPath) &amp; &quot;&quot;&quot;&quot; &amp; chr(10) &amp;_
 				 chr(10) &amp;_
-				 &quot;PATH=&quot;&quot;${PkgDir}bin/${osType}${cpuType}:$PATH&quot;&quot;&quot; &amp; chr(10) &amp;_
 				 &quot;PATH=&quot;&quot;&quot; &amp; ConvertFromURL(sLatexPath) &amp; &quot;:$PATH&quot;&quot;&quot; &amp; chr(10) &amp;_
 				 &quot;PATH=&quot;&quot;&quot; &amp; ConvertFromURL(sGSPath)    &amp; &quot;:$PATH&quot;&quot;&quot; &amp; chr(10) &amp;_
 				 &quot;export PATH&quot; &amp; chr(10) &amp;_
@@ -488,7 +487,6 @@
     &quot;}&quot; &amp; chr(10) &amp;_
     chr(10) &amp;_
     &quot;SystemLog(){&quot; &amp; chr(10) &amp;_
-	chmod &amp; chr(10) &amp;_
     &quot;syslog=${PkgDir}System.out&quot; &amp; chr(10) &amp;_
     chr(10) &amp;_
     &quot;uname -a &gt; $syslog&quot; &amp; chr(10) &amp;_


--- NEW FILE openoffice.org-ooolatex.spec ---
Name:           openoffice.org-ooolatex
Version:        4.0.0
Release:        0.5.beta2%{?dist}
Summary:        Support for embedded LaTeX in Impress/Writer documents

Group:          Applications/Productivity
License:        GPLv2+
URL:            http://ooolatex.sourceforge.net/
Source0:        http://downloads.sourceforge.net/ooolatex/OOoLatex-%{version}-beta-2-linux.oxt
Patch0:         ooolatex-fix-path.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch

%if 0%{?fedora} >= 8 
%define min_ooo 2.3.0-6.13
%else
%define min_ooo 2.3.0-6.7
%endif

BuildRequires: openoffice.org-sdk >= %{min_ooo}
Requires(pre):    openoffice.org-core >= %{min_ooo}
Requires(post):   openoffice.org-core >= %{min_ooo}
Requires(preun):  openoffice.org-core >= %{min_ooo}
Requires(postun): openoffice.org-core >= %{min_ooo}
# needs draw component to work
Requires: openoffice.org-draw >= %{min_ooo} 
# also needs at least writer or impress to be useful
Requires: openoffice.org-writer >= %{min_ooo} 
Requires: latex2emf
Requires: ghostscript
Requires: /usr/bin/latex, /usr/bin/dvips

# The location of the installed extension. Apparently the directory name must
# end with .uno.pkg or unopkg will fail.
%define ooolatexext %{_datadir}/openoffice.org/extensions/ooolatex.oxt

%description 
This program allows the editing and display of LaTeX equations inside
OpenOffice.org Writer and Impress documents


%prep
%setup -q -c -n OOoLatex-%{version}-beta-2-linux.oxt

# the following patch:
# 1) removes the interactive license confirmation and suppresses updating 
#    outside yum
# 2) extension is somewhat brain-dead when installed system-wide, 
#    so we need to patch it to write per-user info in home dir, not /usr/
%patch0 -p1

# build section empty: no build required, all noarch
%build

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{ooolatexext}
# remove binaries that are already included in latex2emf/libEMF
rm -r bin
rm -r lib
# copy the rest
cp -a * $RPM_BUILD_ROOT%{ooolatexext}
# remove documentation already in doc
rm -r $RPM_BUILD_ROOT%{ooolatexext}/README


%pre
if [ $1 -gt 1 ]; then
    # Upgrade => deregister old extension
    unopkg remove --shared net.sourceforge.ooolatex || :
fi

%post
# register extension and agree to GPL license
echo yes | unopkg add --shared --link %{ooolatexext} > /dev/null 2>&1 || :

%preun
if [ $1 -eq 0 ]; then
    # not upgrading => deregister
    unopkg remove --shared net.sourceforge.ooolatex || :
fi

%postun
# clear disk cache
unopkg list --shared > /dev/null 2>&1 || :


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%{ooolatexext}
%doc README pkg-licence/gpl_GB.txt

%changelog
* Fri Apr 11 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 4.0.0-0.5.beta2
- Bump up Requires and BR to ensure unopkg works.

* Thu Apr 10 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 4.0.0-0.4.beta2
- Buildsystem fix.

* Wed Apr  9 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 4.0.0-0.3.beta2
- Fix Release
- Include license in %doc

* Sun Apr  6 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 4.0.0-0.beta2.2
- Requires -draw component to work and -writer or -impress to be useful.  
- Apply patch and install in more conventional way.  
- Supply "yes" to license script to avoid needing to patch description.xml

* Fri Apr  4 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 4.0.0-0.beta2.1
- Initial Fedora package.



Index: sources
===================================================================
RCS file: /cvs/extras/rpms/openoffice.org-ooolatex/F-7/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	10 Apr 2008 17:36:51 -0000	1.1
+++ sources	11 Apr 2008 07:48:05 -0000	1.2
@@ -0,0 +1 @@
+4774cf1f1c0778aeef0c647c7e1aa3e3  OOoLatex-4.0.0-beta-2-linux.oxt




More information about the scm-commits mailing list