Name: openoffice.org-ooolatex Version: 4.0.0 Release: 0.3.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.12 %else %define min_ooo 2.3.0-6.6 %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, unzipping in install section %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 * Wed Apr 9 2008 Alex Lancaster - 4.0.0-0.3.beta2 - Fix Release - Include license in %doc * Sun Apr 6 2008 Alex Lancaster - 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 - 4.0.0-0.beta2.1 - Initial Fedora package.