rpms/openoffice.org-ooolatex/F-8 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:49 UTC 2008


Author: alexlan

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

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 & "System.out" ) then
+	if not FileExists( sUserPath & "System.out" ) then
 		sMsg = "You have to use the module Equation once to generate the system logs." 
 	else
 		sMsg = ReadAboutFile( "System.out")
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 					
 	'*** MacOSX/Linux ***
 		sShellCommand = "sh"
-		sShellArg = "'" & ConvertFromURL(sPkgPath) & "OOoLatex.sh' " & sFormat &_
+		sShellArg = "'" & ConvertFromURL(sUserPath) & "OOoLatex.sh' " & sFormat &_
 					TranspOpt & iGraphicDPI & " '"  & ConvertFromURL(sTmpPath) & "'" 
 	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
 	
 	'Reset button
-	if FileExists(sPkgPath & "OOoLatex.sh") then
+	if FileExists(sUserPath & "OOoLatex.sh") then
 		oDlgSysConfig.getControl("ResetButton").setEnable(true)
 	else
 		oDlgSysConfig.getControl("ResetButton").setEnable(fase)
@@ -100,7 +100,7 @@
 	if getGUIType = 1 then sGS  = "gswin32c" else sGS = "gs"
 	if getGUIType = 1 then sExt = ".exe"     else sExt = ""
 
-	if not FileExists(sPkgPath & "OOoLatex.sh") then
+	if not FileExists(sUserPath & "OOoLatex.sh") then
 		ProgramNotFound("You have to configure your system before using the module Equation")
 	elseif not FileExists(oSystemInfo.GsPath & sGS & sExt) then
 		ProgramNotFound("Check the path to your Ghostdcript distribution, I cannot find " & sGS & " !")
@@ -146,9 +146,9 @@
 	oFileAccess = createUnoService("com.sun.star.ucb.SimpleFileAccess")
 	'*** Remove the files OOoLatex.sh and Sytem.out
 
-	cURL = ConvertToURL( sPkgPath & "OOoLatex.sh" )
+	cURL = ConvertToURL( sUserPath & "OOoLatex.sh" )
 	If oFileAccess.exists( cURL ) Then oFileAccess.kill( cURL )	
-	cURL = ConvertToURL( sPkgPath & "System.out" )
+	cURL = ConvertToURL( sUserPath & "System.out" )
 	If oFileAccess.exists( cURL ) Then oFileAccess.kill( cURL )	
 	
 	'Disable the reset button
@@ -256,7 +256,7 @@
 
 	' Open sevice file and an output stream...
 	oFileAccess = createUnoService("com.sun.star.ucb.SimpleFileAccess")		
-	cURL = ConvertToURL( sPkgPath & "OOoLatex.sh" )
+	cURL = ConvertToURL( sUserPath & "OOoLatex.sh" )
 
 	' Get the path saved in the registry. 
 	oSystemInfo = GetConfigAccess( "/ooo.ext.ooolatex.Registry/SystemInfo", false)	
@@ -435,7 +435,7 @@
 	oTextStream  = createUnoService("com.sun.star.io.TextOutputStream")
 
 	' Generate the OOoLatex script in the root of the package.
-	cURL = ConvertToURL( sPkgPath & "OOoLatex.sh" )
+	cURL = ConvertToURL( sUserPath & "OOoLatex.sh" )
 	If oFileAccess.exists( cURL ) Then oFileAccess.kill( cURL )
 
 	'Generatio of the script on sOOoLatex.
@@ -455,9 +455,8 @@
 				 "sys=$(uname -s)" & chr(10) &_
 				 "[ ""$cpu"" = ""powerpc"" -o ""$mac"" = ""ppc"" ] && cpuType=ppc || cpuType=i386 " & chr(10) &_
 				 "[ ""$sys"" = ""Darwin"" ] && osType=MacOSX || osType=Linux " & chr(10) &_
-				 "PkgDir=""" & ConvertFromURL(sPkgPath) & """" & chr(10) &_
+				 "PkgDir=""" & ConvertFromURL(sUserPath) & """" & chr(10) &_
 				 chr(10) &_
-				 "PATH=""${PkgDir}bin/${osType}${cpuType}:$PATH""" & chr(10) &_
 				 "PATH=""" & ConvertFromURL(sLatexPath) & ":$PATH""" & chr(10) &_
 				 "PATH=""" & ConvertFromURL(sGSPath)    & ":$PATH""" & chr(10) &_
 				 "export PATH" & chr(10) &_
@@ -488,7 +487,6 @@
     "}" & chr(10) &_
     chr(10) &_
     "SystemLog(){" & chr(10) &_
-	chmod & chr(10) &_
     "syslog=${PkgDir}System.out" & chr(10) &_
     chr(10) &_
     "uname -a > $syslog" & chr(10) &_


--- 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-8/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:12 -0000	1.2
@@ -0,0 +1 @@
+4774cf1f1c0778aeef0c647c7e1aa3e3  OOoLatex-4.0.0-beta-2-linux.oxt




More information about the fedora-extras-commits mailing list