Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > 302a64bf4069532a17c82e8442aeb0fb > files > 60

libreoffice-3.4.6.2-0.1.mga1.src.rpm

# rhbz#465664 jar-repacking breaks help by reordering META-INF/MANIFEST.MF
%define __jar_repack %{nil}
# don't worry about whitespace for now
%define _default_patch_flags -s -l
%define _default_patch_fuzz 2
%define Werror_cflags %nil
%define vendoroption --with-vendor="Mageia"
# undef to get english only and no-langpacks for a faster smoketest build
%define langpacks 1
# make it easier to download sources from pre-release site
# http://dev-builds.libreoffice.org/pre-releases/src
%define source_url http://download.documentfoundation.org/libreoffice/src
# whether to use stlport or gcc's stl, we're basically locked to stlport for
# i386 to support third party uno components and add-ons designed to work with
# vanilla OOo.
%ifarch %{ix86}
%define stlport_abi_lockin 1
%else
%define stlport_abi_lockin 0
%endif

%if %{stlport_abi_lockin}
%define stlflags --with-stlport
%else
%define stlflags --without-stlport
%endif

%if %{langpacks}
%define langpack_langs en-US af ar as bg bn ca cs cy da de dz el es et eu fi fr ga gl gu he hi hr hu it ja ko kn lt mai ml mr nb nl nn nr nso or pa-IN pl pt pt-BR ro ru sh si sk sl sr ss st sv ta te th tn tr ts uk ve xh zh-CN zh-TW zu
%define with_lang --with-lang="%{langpack_langs}"
%else
%define langpack_langs en-US
%endif

%define _requires_exceptions libjawt.so\\|libmyspell.so\\|libstlport_gcc.so\\|libmono.so\\|mono\\|devel(libstlport_gcc)\\|libxmlreader.so\\|libcomphelp4gcc3.so
%define _provides_exceptions libsndfile.so\\|libportaudio.so\\|libdb-4.2.so\\|libdb_java-4.2.so\\|libmyspell.so\\|libstlport_gcc.so\\|librdf.so.0\\|libraptor.so.1\\|libxmlsec1-nss.so.1\\|libxmlsec1.so.1

%define subrel  1

Summary:        Free Software Productivity Suite
Name:           libreoffice
Version:        3.4.6.2
Release:        %mkrel 0
License:        LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and (CDDL or GPLv2) and Public Domain
Group:          Office
URL:            http://www.documentfoundation.org/develop
Source0:        %{source_url}/libreoffice-artwork-%{version}.tar.bz2
Source1:        %{source_url}/libreoffice-base-%{version}.tar.bz2
Source2:        %{source_url}/libreoffice-bootstrap-%{version}.tar.bz2
Source3:        %{source_url}/libreoffice-calc-%{version}.tar.bz2
Source4:        %{source_url}/libreoffice-components-%{version}.tar.bz2
Source5:        %{source_url}/libreoffice-extensions-%{version}.tar.bz2
Source6:        %{source_url}/libreoffice-extras-%{version}.tar.bz2
Source7:        %{source_url}/libreoffice-filters-%{version}.tar.bz2
Source8:        %{source_url}/libreoffice-help-%{version}.tar.bz2
Source9:        %{source_url}/libreoffice-impress-%{version}.tar.bz2
Source10:       %{source_url}/libreoffice-libs-core-%{version}.tar.bz2
Source11:       %{source_url}/libreoffice-libs-extern-%{version}.tar.bz2
Source12:       %{source_url}/libreoffice-libs-extern-sys-%{version}.tar.bz2
Source13:       %{source_url}/libreoffice-libs-gui-%{version}.tar.bz2
Source14:       %{source_url}/libreoffice-postprocess-%{version}.tar.bz2
Source15:       %{source_url}/libreoffice-sdk-%{version}.tar.bz2
Source16:       %{source_url}/libreoffice-testing-%{version}.tar.bz2
Source17:       %{source_url}/libreoffice-ure-%{version}.tar.bz2
Source18:       %{source_url}/libreoffice-writer-%{version}.tar.bz2
Source19:       %{source_url}/libreoffice-translations-%{version}.tar.bz2
Source20:       http://dev-www.libreoffice.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll
Source21:       redhat-langpacks.tar.gz
Source22:       libreoffice-multiliblauncher.sh
Source23:       http://hg.services.openoffice.org/binaries/fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz
Source24:       http://hg.services.openoffice.org/binaries/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
Source25:       http://hg.services.openoffice.org/binaries/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
Source26:       http://hg.services.openoffice.org/binaries/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
Source27:       http://hg.services.openoffice.org/binaries/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
Source28:       http://hg.services.openoffice.org/binaries/ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip
Source29:       http://hg.services.openoffice.org/binaries/18f577b374d60b3c760a3a3350407632-STLport-4.5.tar.gz
#Unfortunately later versions of hsqldb changed the file format, so if we use a later version we loose
#backwards compatability.
Source30:       http://hg.services.openoffice.org/binaries/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip
Source31:       http://dev-www.libreoffice.org/extern/b4cae0700aa1c2aef7eb7f345365e6f1-translate-toolkit-1.8.1.tar.bz2
BuildRequires:  zip
BuildRequires:  findutils
BuildRequires:  autoconf
BuildRequires:  flex
BuildRequires:  bison
BuildRequires:  icu
BuildRequires:  gperf
BuildRequires:  gcc-c++
BuildRequires:  binutils
BuildRequires:  java-1.6.0-devel
BuildRequires:  boost-devel
BuildRequires:  zlib-devel
BuildRequires:  python-devel
BuildRequires:  expat-devel
BuildRequires:  libxml2-devel
BuildRequires:  libxslt-devel
BuildRequires:  bc
BuildRequires:  neon-devel
BuildRequires:  libcurl-devel
BuildRequires:  libidn-devel
BuildRequires:  pam-devel
BuildRequires:  cups-devel
BuildRequires:  libxext-devel
BuildRequires:  libxt-devel
BuildRequires:  libice-devel
BuildRequires:  libjpeg-devel
BuildRequires:  make
BuildRequires:  libwpd-devel >= 0.9.0
BuildRequires:  hunspell-devel
BuildRequires:  unixODBC-devel
BuildRequires:  db4-devel
BuildRequires:  sane-devel
BuildRequires:  libicu-devel
BuildRequires:  perl(Archive::Zip)
BuildRequires:  freetype-devel
BuildRequires:  gtk2-devel
BuildRequires:  pkgconfig(ORBit-2.0)
BuildRequires:  pkgconfig(dbus-glib-1) >= 0.70
BuildRequires:  desktop-file-utils
BuildRequires:  hyphen-devel
BuildRequires:  evolution-data-server-devel
BuildRequires:  xulrunner-devel
BuildRequires:  libtextcat-devel
BuildRequires:  nss-devel
BuildRequires:  gstreamer0.10-devel
BuildRequires:  libgstreamer0.10-plugins-base-devel
BuildRequires:  openssl-devel
BuildRequires:  mdds-devel
BuildRequires:  lpsolve-devel
BuildRequires:  bsh
BuildRequires:  lucene >= 0:2.4.1
BuildRequires:  redland-devel
BuildRequires:  ant
BuildRequires:  ant-apache-regexp
BuildRequires:  rsync
BuildRequires:  jakarta-commons-codec
BuildRequires:  jakarta-commons-httpclient
BuildRequires:  cppunit-devel
BuildRequires:  jakarta-commons-lang
BuildRequires:  pkgconfig(poppler)
BuildRequires:  pkgconfig(poppler-glib)
BuildRequires:  pkgconfig(poppler-cpp)
BuildRequires:  junit4
BuildRequires:  pentaho-reporting-flow-engine
BuildRequires:  mythes-devel
BuildRequires:  graphite2-devel
BuildRequires:  lucene-contrib >= 0:2.4.1
BuildRequires:  libwpg-devel >= 1:0.2.0
BuildRequires:  libwps-devel >= 1:0.2.0
BuildRequires:  vigra-devel
BuildRequires:  fontpackages-devel
# for the KDE subpackage
BuildRequires:  kdelibs4-devel
BuildRequires:  font(:lang=en)
BuildRequires:  perl(Archive::Zip)
BuildRequires:  perl(Digest::MD5)
BuildRequires:  libtextcat-devel

# Fedora patches
Patch1:  openoffice.org-2.0.2.rh188467.printingdefaults.patch
Patch2:  openoffice.org-2.4.0.ooo86080.unopkg.bodge.patch
Patch3:  openoffice.org-3.0.0.ooo88341.sc.verticalboxes.patch
Patch4:  openoffice.org-3.1.0.oooXXXXX.solenv.allowmissing.patch
Patch5:  openoffice.org-3.1.0.ooo101274.opening-a-directory.patch
Patch6:  openoffice.org-3.1.1.ooo105784.vcl.sniffscriptforsubs.patch
Patch7:  openoffice.org-3.3.0.ooo108637.sfx2.uisavedir.patch
Patch8:  openoffice.org-3.3.0.ooo113273.desktop.resolvelinks.patch
Patch9:  libreoffice-installfix.patch
Patch10: 0001-helgrind-Related-rhbz-655686-get-order-of-shutdown-c.patch
Patch11: kde4configure.patch
Patch12: 0001-Resolves-rhbz-695509-crash-in-RefreshDocumentLB.patch
Patch13: 0001-bubble-down-configure-test-findings-on-visibility.patch
Patch14: vbahelper.visibility.patch
Patch15: 0001-rhbz-702635-set-correct-page-number-when-exporting-s.patch
Patch16: 0001-Related-rhbz-652604-better-survive-exceptions-thrown.patch
Patch17: 0001-Resolves-rhbz-713154-pdf-export-dialog-too-tall-to-f.patch
Patch18: 0001-Related-rhbz-702833-addEventListener-without-removeE.patch
Patch19: 0001-Related-rhbz-711087-band-aid.patch
Patch20: 0001-rhbz-667082-do-not-crash-importing-section-containin.patch
Patch21: 0001-Related-rhbz-718976-crash-in-SwTxtSizeInfo-GetMultiC.patch
Patch22: 0001-Resolves-rhbz-715549-use-fontconfig-s-detected-forma.patch
Patch23: 0001-Resolves-rhbz-693265-fix-crash-from-unhandled-except.patch
Patch24: 0001-Related-rhbz-730225-avoid-segv-in-ld-this-was-set-to.patch
Patch25: gdb-pretty-printers.patch
Patch26: 0001-Related-fdo-37195-migrationoo3-not-registered.patch
Patch27: 0001-Resolves-rhbz-738255-avoid-crash-on-NULL-pointer.patch
Patch28: 0001-Resolves-rhbz-751290-KDE-black-on-dark-tooltips.patch
Patch29: 0001-gtk3-fix-cairo-canvas-crash-for-non-X-or-svp-backend.patch
Patch30: 0001-Resolves-rhbz-759647-dispose-clears-mpPresTimer-befo.patch
Patch31: 0001-Resolves-rhbz-761009-IFSD_Equal-is-asymmetrical.patch
Patch32: 0001-Resolves-rhbz-767708-avoid-SIGBUS-writing-to-overcom.patch
Patch33: 0001-smath-does-not-handle-accents-in-MathML.patch
Patch35: 0001-Confine-JDBC-driver-to-thread-affine-apartment-for-J.patch
Patch42: solenv.fix.mk.inheritance.patch
Patch43: 0001-Related-rhbz-753201-fedora-ant-java-1.5.0-gcj-won-t-.patch
Patch45: libreoffice-ppc64.patch

# Mageia patches
Patch100: libreoffice-fix-string.patch

#Freedesktop patches
# See : https://bugs.freedesktop.org/show_bug.cgi?id=43139
Patch200: libreoffice34-gcc462.patch

# libreoffice metapackage requires all of the programs
Requires: %{name}-base = %{version}
Requires: %{name}-calc = %{version}
Requires: %{name}-draw = %{version}
Requires: %{name}-impress = %{version}
Requires: %{name}-math = %{version}
Suggests: %{name}-pdfimport
Requires: %{name}-writer = %{version}
Obsoletes: openoffice.org < 1:3.3.1
Provides:  openoffice.org = 1:%{version}-%{release}

%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%define instdir %{_libdir}
%define baseinstdir %{instdir}/libreoffice
%define ureinstdir %{baseinstdir}/ure
%define basisinstdir %{baseinstdir}/basis3.4
%define sdkinstdir %{baseinstdir}/basis3.4/sdk
%define fontname opensymbol
%define OFFICEUPD 340
%define SOPOST l*

%description
LibreOffice is an Open Source, community-developed, office productivity suite.
It includes the key desktop applications, such as a word processor,
spreadsheet, presentation manager, formula editor and drawing program, with a
user interface and feature set similar to other office suites.  Sophisticated
and flexible, LibreOffice also works transparently with a variety of file
formats, including Microsoft Office File Formats.

%package core
Summary: Core modules for LibreOffice
Group: Office
Requires: %{name}-%{fontname}-fonts = %{version}-%{release}
Requires: %{name}-ure = %{version}-%{release}
Requires: fonts-ttf-liberation
Requires: fonts-ttf-dejavu
Requires: hunspell
Requires: hyphen >= 2.4
Suggests: hyphen-en
Suggests: autocorr-en
Requires: %{name}-langpack
Requires: lucene >= 0:2.4.1
Requires(pre):    gtk2 >= 2.9.4
Requires(post):   gtk2 >= 2.9.4
Requires(preun):  gtk2 >= 2.9.4
Requires(postun): gtk2 >= 2.9.4
Obsoletes: openoffice.org-core < 1:3.3.1
Provides:  openoffice.org-core =   1:%version-%release
Obsoletes: openoffice.org-common < 1:3.3.1
Provides:  openoffice.org-common =   1:%version-%release
Obsoletes: openoffice.org-brand < 1:3.3.1, broffice.org-brand < 1:3.3.1
Obsoletes: openoffice.org-filter-binfilter < 1:3.3.1
Provides:  openoffice.org-filter-binfilter = 1:%version-%release
Obsoletes: openoffice.org-help-en_US < 1:3.3.1
Provides:  openoffice.org-help-en_US =   1:%version-%release
Obsoletes: openoffice.org-help-en_GB < 1:3.3.1
Provides:  openoffice.org-help-en_GB =   1:%version-%release
Obsoletes: openoffice.org-langpack-ms < 1:3.3.1
Obsoletes: libreoffice-langpack-ms < 1:3.3.99.1
Obsoletes: openoffice.org-langpack-ur < 1:3.3.1
Obsoletes: libreoffice-langpack-ur < 1:3.3.99.1
Obsoletes: openoffice.org-langpack-br < 1:3.3.1
Obsoletes: libreoffice-langpack-br < 1:3.3.99.1
Obsoletes: openoffice.org-help-af < 1:3.3.1
Obsoletes: libreoffice-help-af < 1:3.3.99.1
Obsoletes: openoffice.org-help-ar < 1:3.3.1
Obsoletes: libreoffice-help-ar < 1:3.3.99.1
Obsoletes: openoffice.org-help-br < 1:3.3.1
Obsoletes: libreoffice-help-br < 1:3.3.99.1
Obsoletes: openoffice.org-help-br < 1:3.3.1
Obsoletes: libreoffice-help-br < 1:3.3.99.1
Obsoletes: openoffice.org-help-lt < 1:3.3.1
Obsoletes: libreoffice-help-lt < 1:3.3.99.1
Obsoletes: openoffice.org-help-mai < 1:3.3.1
Obsoletes: libreoffice-help-mai < 1:3.3.99.1
Obsoletes: openoffice.org-help-nr < 1:3.3.1
Obsoletes: libreoffice-help-nr < 1:3.3.99.1
Obsoletes: openoffice.org-help-nso < 1:3.3.1
Obsoletes: libreoffice-help-nso < 1:3.3.99.1
Obsoletes: openoffice.org-help-sh < 1:3.3.1
Obsoletes: libreoffice-help-sh < 1:3.3.99.1
Obsoletes: openoffice.org-help-pa < 1:3.3.1
Obsoletes: libreoffice-help-pa < 1:3.3.99.1
Obsoletes: openoffice.org-help-sr < 1:3.3.1
Obsoletes: libreoffice-help-sr < 1:3.3.99.1
Obsoletes: openoffice.org-help-ss < 1:3.3.1
Obsoletes: libreoffice-help-ss < 1:3.3.99.1
Obsoletes: openoffice.org-help-st < 1:3.3.1
Obsoletes: libreoffice-help-st < 1:3.3.99.1
Obsoletes: openoffice.org-help-th < 1:3.3.1
Obsoletes: libreoffice-help-th < 1:3.3.99.1
Obsoletes: openoffice.org-help-ta < 1:3.3.1
Obsoletes: libreoffice-help-ta < 1:3.3.99.1
Obsoletes: openoffice.org-help-tn < 1:3.3.1
Obsoletes: libreoffice-help-tn < 1:3.3.99.1
Obsoletes: openoffice.org-help-ts < 1:3.3.1
Obsoletes: libreoffice-help-ts < 1:3.3.99.1
Obsoletes: openoffice.org-help-ve < 1:3.3.1
Obsoletes: libreoffice-help-ve < 1:3.3.99.1
Obsoletes: openoffice.org-help-xh < 1:3.3.1
Obsoletes: libreoffice-help-xh < 1:3.3.99.1
Obsoletes: openoffice.org-help-zu < 1:3.3.1
Obsoletes: libreoffice-help-zu < 1:3.3.99.1
Provides:  libreoffice-style-tango = %{version}-%{release}
Provides:  libreoffice-style-oxygen = %{version}-%{release}
Conflicts: %name-ure < 3.3.2.2-7

%description core
The shared core libraries and support files for LibreOffice.

%package pyuno
Summary: Python support for LibreOffice
Group: Development/Other 
Requires: %{name}-core = %{version}-%{release}
Requires: %{name}-ure = %{version}-%{release}
Requires: python
Requires(pre):    %{name}-core
Requires(post):   %{name}-core
Requires(preun):  %{name}-core
Requires(postun): %{name}-core
Obsoletes: openoffice.org-pyuno < 1:3.3.1
Provides: openoffice.org-pyuno = 1:%version-%release

%description pyuno
Python bindings for the LibreOffice UNO component model. Allows scripts both
external to LibreOffice and within the internal LibreOffice scripting framework
to be written in python.

%package base
Summary: Database front-end for LibreOffice
Group: Office
Requires: postgresql-jdbc
Requires: %{name}-ure = %{version}-%{release}
Requires: %{name}-core = %{version}-%{release}
Requires: %{name}-calc = %{version}-%{release}
Requires: hsqldb
Suggests: %{name}-java-common = %{version}-%release
Obsoletes: openoffice.org-base < 1:3.3.1, broffice.org-base < 1:3.3.1
Provides:  openoffice.org-base = 1:%version-%release 
Obsoletes: openoffice.org-style < 1:3.3.1
Provides:  openoffice.org-style = 1:%version-%release
Obsoletes: openoffice.org-style-crystal < 1:3.3.1
Provides:  openoffice.org-style-crystal = 1:%version-%release
Obsoletes: openoffice.org-style-oxygen < 1:3.3.1
Provides:  openoffice.org-style-oxygen = 1:%version-%release

%description base
GUI database front-end for LibreOffice. Allows creation and management of 
databases through a GUI.

%package report-builder
Summary: Create database reports from LibreOffice
Group: Office
Requires: pentaho-reporting-flow-engine
Requires: %{name}-base = %{version}-%{release}
Requires(pre):    %{name}-core
Requires(post):   %{name}-core
Requires(preun):  %{name}-core
Requires(postun): %{name}-core
Obsoletes: openoffice.org-report-builder < 1:3.3.1

%description report-builder
Creates database reports from LibreOffice databases. The report builder can
define group and page headers as well as group, page footers and calculation
fields to accomplish complex database reports.

%package bsh
Summary: BeanShell support for LibreOffice
Group: Development/Other 
Requires: bsh
Requires: %{name}-core = %{version}-%{release}
Requires(pre):    %{name}-core
Requires(post):   %{name}-core
Requires(preun):  %{name}-core
Requires(postun): %{name}-core
Obsoletes: openoffice.org-bsh < 1:3.3.1
Provides:  openoffice.org-bsh < 1:%version-%release

%description bsh
Support BeanShell scripts in LibreOffice.

%package rhino
Summary: JavaScript support for LibreOffice
Group: Development/Other 
Requires: %{name}-core = %{version}-%{release}
Requires(pre):    %{name}-core
Requires(post):   %{name}-core
Requires(preun):  %{name}-core
Requires(postun): %{name}-core
Obsoletes: openoffice.org-rhino < 1:3.3.1


%description rhino
Support JavaScript scripts in LibreOffice.

%package wiki-publisher
Summary: Create Wiki articles on MediaWiki servers with LibreOffice
Group: Office
Requires: jakarta-commons-codec, jakarta-commons-httpclient
Requires: jakarta-commons-lang, jakarta-commons-logging
Requires: %{name}-writer = %{version}-%{release}
Requires(pre):    %{name}-core
Requires(post):   %{name}-core
Requires(preun):  %{name}-core
Requires(postun): %{name}-core
Obsoletes: openoffice.org-wiki-publisher < 1:3.3.1

%description wiki-publisher
The Wiki Publisher enables you to create Wiki articles on MediaWiki servers
without having to know the syntax of the MediaWiki markup language. Publish
your new and existing documents transparently with writer to a wiki page.

%package ogltrans
Summary: 3D OpenGL slide transitions for LibreOffice
Group: Office
Requires: %{name}-impress = %{version}-%{release}
Requires(pre):    %{name}-core
Obsoletes: openoffice.org-ogltrans < 1:3.3.1

%description ogltrans
OpenGL Transitions enable 3D slide transitions to be used in LibreOffice.
Requires good quality 3D support for your graphics card for best experience.

%package presentation-minimizer
Summary: Shrink LibreOffice presentations
Group: Office
Requires: %{name}-impress = %{version}-%{release}
Requires(pre):    %{name}-core
Requires(post):   %{name}-core
Requires(preun):  %{name}-core
Requires(postun): %{name}-core
Obsoletes: openoffice.org-presentation-minimizer < 1:3.3.1

%description presentation-minimizer
The Presentation Minimizer is used to reduce the file size of the current
presentation. Images will be compressed, and data that is no longer needed will
be removed.

%package presenter-screen
Summary: Presenter Screen for LibreOffice Presentations
Group: Office
Requires: %{name}-impress = %{version}-%{release}
Requires(pre):    %{name}-core
Requires(post):   %{name}-core
Requires(preun):  %{name}-core
Requires(postun): %{name}-core
Obsoletes: openoffice.org-presenter-screen < 1:3.3.1

%description presenter-screen
The Presenter Screen is used to provides information on a second screen, that
typically is not visible to the audience when delivering a presentation. e.g.
slide notes.

%package pdfimport
Summary: PDF Importer for LibreOffice Draw
Group: Office
Requires: %{name}-draw = %{version}-%{release}
Requires(pre):    %{name}-core
Requires(post):   %{name}-core
Requires(preun):  %{name}-core
Requires(postun): %{name}-core
Obsoletes: openoffice.org-pdfimport < 1:3.3.1

%description pdfimport
The PDF Importer imports PDF into drawing documents to preserve layout
and enable basic editing of PDF documents.

%package %{fontname}-fonts
Summary: LibreOffice dingbats font
Group:    System/Fonts/True type
Requires: fontpackages-filesystem
Obsoletes: openoffice.org-fonts < 1:3.3.1
Obsoletes: openoffice.org-opensymbol-fonts < 1:3.3.1
BuildArch: noarch

%description %{fontname}-fonts
A dingbats font, OpenSymbol, suitable for use by LibreOffice for bullets and
mathematical symbols. 

%package writer
Summary: LibreOffice Word Processor Application
Group: Office
Requires: %{name}-core = %{version}-%{release}
Requires: %{name}-ure = %{version}-%{release}
Obsoletes: openoffice.org-writer-core < 1:3.3.1
Obsoletes: openoffice.org-writer < 1:3.3.1, broffice.org-writer < 1:3.3.1
Provides:  openoffice.org-writer = 1:%{version}-%{release}
Obsoletes: openoffice.org-writer2latex < 1:3.3.1
Provides:  openoffice.org-writer2latex = 1:%{version}-%{release}
Obsoletes: openoffice.org-writer2xhtml < 1:3.3.1
Provides:  openoffice.org-writer2xhtml = 1:%{version}-%{release}

%description writer
The LibreOffice Word Processor application.

%package emailmerge
Summary: Email mail-merge component for LibreOffice 
Group: Office
Requires: %{name}-writer = %{version}-%{release}
Requires: %{name}-pyuno = %{version}-%{release}
Obsoletes: openoffice.org-emailmerge < 1:3.3.1

%description emailmerge
Enables the LibreOffice writer module to mail-merge to email.

%package calc
Summary: LibreOffice Spreadsheet Application
Group: Office
Requires: %{name}-core = %{version}-%{release}
Requires: %{name}-ure = %{version}-%{release}
Obsoletes: openoffice.org-calc-core < 1:3.3.1
Obsoletes: openoffice.org-calc < 1:3.3.1, broffice.org-calc < 1:3.3.1

%description calc
The LibreOffice Spreadsheet application.

%package draw
Summary: LibreOffice Drawing Application
Group: Office
Requires: %{name}-core = %{version}-%{release}
Requires: %{name}-ure = %{version}-%{release}
Requires: %{name}-pdfimport = %{version}-%{release}
Requires: %{name}-graphicfilter = %{version}-%{release}
Obsoletes: openoffice.org-draw-core < 1:3.3.1
Obsoletes: openoffice.org-draw < 1:3.3.1, broffice.org-draw < 1:3.3.1
provides:  openoffice.org-draw = 1:%{version}-%{release}

%description draw
The LibreOffice Drawing Application.

%package impress
Summary: LibreOffice Presentation Application
Group: Office
Requires: %{name}-core = %{version}-%{release}
Requires: %{name}-ure = %{version}-%{release}
Requires: %{name}-presenter-screen = %{version}-%{release}
Obsoletes: openoffice.org-impress-core < 1:3.3.1
Obsoletes: openoffice.org-impress < 1:3.3.1, broffice.org-impress < 1:3.3.1
Provides:  openoffice.org-impress= 1:%{version}-%{release}
%description impress
The LibreOffice Presentation Application.

%package math
Summary: LibreOffice Equation Editor Application
Group: Office
Requires: %{name}-core = %{version}-%{release}
Requires: %{name}-ure = %{version}-%{release}
Obsoletes: openoffice.org-math-core < 1:3.3.1
Obsoletes: openoffice.org-math < 1:3.3.1, broffice.org-math < 1:3.3.1

%description math 
The LibreOffice Equation Editor Application.

%package graphicfilter
Summary: LibreOffice Extra Graphic filters
Group: Office
Requires: %{name}-ure = %{version}-%{release}
Requires: %{name}-core = %{version}-%{release}
Obsoletes: openoffice.org-graphicfilter < 1:3.3.1

%description graphicfilter
The graphicfilter module for LibreOffice provides graphic filters, e.g. svg and
flash filters.

%package xsltfilter
Summary: Optional xsltfilter module for LibreOffice
Group: Office
Requires: %{name}-core = %{version}-%{release}
Obsoletes: openoffice.org-xsltfilter < 1:3.3.1

%description xsltfilter
The xsltfilter module for LibreOffice, provides additional docbook and
xhtml export transforms. Install this to enable docbook export.

%package javafilter
Summary: Optional javafilter module for LibreOffice
Group: Office
Requires: %{name}-core = %{version}-%{release}
Obsoletes: openoffice.org-javafilter < 1:3.3.1

%description javafilter
The javafilter module for LibreOffice, provides additional AportisDoc,
Pocket Excel and Pocket Word import filters.

%package testtools
Summary: Testtools for LibreOffice
Group: Development/Other 
Requires: %{name}-ure = %{version}-%{release}
Requires: %{name}-core = %{version}-%{release}
Requires: %{name}-writer = %{version}-%{release}
Requires: %{name}-calc = %{version}-%{release}
Requires: %{name}-draw = %{version}-%{release}
Requires: %{name}-impress = %{version}-%{release}
Requires: %{name}-base = %{version}-%{release}
Requires: %{name}-math = %{version}-%{release}
Requires: %{name}-bsh = %{version}-%{release}
Requires: %{name}-rhino = %{version}-%{release}
Obsoletes: openoffice.org-testtools < 1:3.3.1

%description testtools
QA tools for LibreOffice, enables automated testing.

%package ure
Summary: UNO Runtime Environment
Group: Development/Other 
Requires: unzip
Suggests: %name-java-common = %version-%release
Obsoletes: openoffice.org-ure < 1:3.3.1
Conflicts: libreoffice-core <= 3.3.2.2-5

%description ure
UNO is the component model of LibreOffice. UNO offers interoperability between
programming languages, other components models and hardware architectures,
either in process or over process boundaries, in the Intranet as well as in the
Internet. UNO components may be implemented in and accessed from any
programming language for which a UNO implementation (AKA language binding) and
an appropriate bridge or adapter exists

%package java-common
Group: Office
Summary: LibreOffice office suite Java support arch. independent files
Requires: %{name}-core = %{version}-%{release}
#Requires: %{name}-common = %{version}-%{release}
Requires: jre
Conflicts: %name-core < 3.3.2.2-8
Obsoletes: openoffice.org-java-common < 1:3.3.1
Provides:  openoffice.org-java-common = 1:%version-%release

%description java-common
LibreOffice is a full-featured office productivity suite that provides a
near drop-in replacement for Microsoft(R) Office.

This package contains the architecture-independent files of the Java support
for Libreoffice (Java classes, scripts, config snippets).

Also contains the Libreoffice Office Bean for embedding Libreoffice in
custom Java applications.

%package sdk
Summary: Software Development Kit for LibreOffice
Group: Development/Other 
Requires: %{name}-ure = %{version}-%{release}
Requires: %{name}-core = %{version}-%{release}
Requires: unzip, java-devel
Obsoletes: openoffice.org-sdk < 1:3.3.1, openoffice.org-devel < 1:3.3.1

%description sdk
The LibreOffice SDK is an add-on for the LibreOffice office suite. It provides
the necessary tools for programming using the LibreOffice APIs and for creating
extensions (UNO components) for LibreOffice.  To set the build environment for
building against the sdk use %{sdkinstdir}/setsdkenv_unix.sh.

%package sdk-doc
Summary: Software Development Kit documentation for LibreOffice
Group: Development/Other
Requires: %{name}-sdk = %{version}-%{release}
Obsoletes: openoffice.org-sdk-doc < 1:3.3.1

%description sdk-doc
This provides documentation for programming using the LibreOffice APIs
and examples of creating extensions (UNO components) for LibreOffice.

%package headless
Summary: LibreOffice Headless plug-in
Group: Development/Other 
Requires: %{name}-ure = %{version}-%{release}
Requires: %{name}-core = %{version}-%{release}
Obsoletes: openoffice.org-headless < 1:3.3.1

%description headless
A plug-in for LibreOffice that enables it to function without an X server. 
It implements the -headless command line option and allows LibreOffice to be
used as a backend server for e.g. document conversion.

%package kde
Summary: LibreOffice KDE integration plug-in
Group:   Office
Requires: %{name}-core = %{version}-%{release}
Obsoletes: openoffice.org-kde4 < 1:3.3.1
Provides:  openoffice.org-kde4 = 1:%version-%release

%description kde
A plug-in for LibreOffice that enables integration into the KDE desktop environment.

%if 0%{?_enable_debug_packages}

%define debug_package %{nil}
%global __debug_package 1

%package debug
Summary: Debug information for package %{name}
Group: Development/Debug
AutoReqProv: 0
Requires: libreoffice-core = %{version}-%{release}
Requires: libreoffice-gdb-debug-support = %{version}-%{release}

%description debug
This package provides debug information for package %{name}.
Debug information is useful when developing applications that use this
package or when debugging this package.

%files debug -f debugfiles.list

%package gdb-debug-support
Summary: Additional support for debugging with gdb
Group: Development/Other
Requires: gdb
AutoReqProv: 0

%description gdb-debug-support
This package provides gdb pretty printers for package %{name}.

%files gdb-debug-support
%{_datadir}/gdb/auto-load%{baseinstdir}
%{_datadir}/libreoffice/gdb

%endif

# Defines a language pack subpackage.
#
# It's necessary to define language code (-l) and language name (-n).
# Additionally, it's possible
# * to require autocorr, hunspell, hyphen or mythes package or font for
#   given language,
# * to obsolete openoffice.org-langpack package,
# * to provide libreoffice-langpack-loc package, where loc is glibc
#   locale--this is necessary for urpmi to pick it automatically,
# * to require other, unrelated, packages,
# * to specify file serving as file list.
# For these, lower case character argument takes an argument specifying
# language, upper case character argument uses language from -l.
#
# All remaining arguments are considered to be files and added to the file
# list.
#
# Aa: autocorr dependency
# Ff: font language dependency
# Hh: hunspell dependency
# l:  language code, e.g., cs
# Mm: mythes dependency
# n:  language name, e.g., Czech
# Oo: Obsoletes: of openoffice.org-langpack
# r:  comma-separated list of additional requires
# Ss: filelist
# Yy: hyphen dependency
#
# Example:
# libreoffice-langpack-cs: langpack for Czech lang. requiring hyphen-cs,
# autocorr-cs, mythes-cs-CZ and suitable font, obsoleting
# openoffice.org-langpack-cs_CZ, and taking the files from cs.filelist:
# %langpack -l cs -n Czech -H -A -m cs-CZ -o cs_CZ -S
%define langpack(Aa:Ff:Hh:l:Mm:n:Oo:p:r:Ss:Yy:Uu:) \
%define project LibreOffice \
%define lang %{-l:%{-l*}}%{!-l:%{error:Language code not defined}} \
%define pkgname langpack-%{lang} \
%define langname %{-n:%{-n*}}%{!-n:%{error:Language name not defined}} \
\
%package %{pkgname} \
Summary: %{langname} language pack for %{project} \
Group: Office \
Requires: %{name}-core = %{version}-%{release} \
Obsoletes: openoffice.org-l10n-%{lang} < 1:3.3.1 \
Provides:  openoffice.org-l10n-%{lang} = 1:%version-%release \
Provides:  %name-langpack \
%{-a:Requires: autocorr-%{-a*}}%{!-a:%{-A:Requires: autocorr-%{lang}}} \
%{-f:Requires: font(:lang=%{-f*})}%{!-f:%{-F:Requires: font(:lang=%{lang})}} \
%{-h:Requires: hunspell-%{-h*}}%{!-h:%{-H:Requires: hunspell-%{lang}}} \
%{-m:Requires: mythes-%{-m*}}%{!-m:%{-M:Requires: mythes-%{lang}}} \
%{-u:Requires: locales-%{-u*}} \
%{-U:Requires: locales-%{lang}} \
%{-y:Requires: hyphen-%{-y*}}%{!-y:%{-Y:Requires: hyphen-%{lang}}} \
%{-r:Requires: %{-r*}} \
%define obs openoffice.org-langpack \
%define obsv 1:3.3.1 \
%{-o:Obsoletes: %{obs}-%{-o*} < %{obsv}}%{!-o:%{-O:Obsoletes: %{obs}-%{lang} < %{obsv}}} \
%{-p:Provides: %{name}-langpack-%{-p*}} \
\
%description %{pkgname} \
Provides additional %{langname} translations and resources for %{project}. \
\
%define filelist %{-s:-f %{-s*}.filelist}%{!-s:%{-S:-f %{lang}.filelist}} \
%files %{pkgname} %{filelist} \
%defattr(-,root,root,-) \
%*

%define helplangpack(Aa:Ff:Hh:l:Mm:n:Oo:r:Ss:Yy:Uu:) \
%define project LibreOffice \
%define lang %{-l:%{-l*}}%{!-l:%{error:Language code not defined}} \
%define hlppkgname help-%{lang} \
%define hlplangname %{-n:%{-n*}}%{!-n:%{error:Language name not defined}} \
\
%package %{hlppkgname} \
Summary: %{hlplangname} language pack for %{project} \
Group: Office \
Requires: %{name}-core = %{version}-%{release} \
Obsoletes: openoffice.org-help-%{lang} < 1:3.3.1 \
Provides:  openoffice.org-help-%{lang} = 1:%version-%release \
\
%define hlpobs openoffice.org-help \
%define hlpobsv 1:3.3.1 \
%{-o:Obsoletes: %{hlpobs}-%{-o*} < %{hlpobsv}}%{!-o:%{-O:Obsoletes: %{hlpobs}-%{lang} < %{hlpobsv}}} \
\
%description %{hlppkgname} \
Provides additional %{hlplangname} help resources for %{project}. \
\
%define hlpfilelist %{-s:-f %{-s*}.help.filelist}%{!-s:%{-S:-f %{lang}.help.filelist}} \
%files %{hlppkgname} %{hlpfilelist} \
%defattr(-,root,root,-) \
%*

# Defines an auto-correction subpackage.
#
# l: language code
# n: language name
# X  do not use default file match on %{_datadir}/autocorr/acor_%{lang}-*
#    in file list
#
# All remaining arguments are considered to be files and added to the file
# list.
%define autocorr(l:n:X) \
%define lang %{-l:%{-l*}}%{!-l:%{error:Language code not defined}} \
%define pkgname autocorr-%{lang} \
%define langname %{-n:%{-n*}}%{!-n:%{error:Language name not defined}} \
\
%package -n %{pkgname} \
Summary: %{langname} auto-correction rules \
Group: Text tools  \
BuildArch: noarch \
\
%description -n %{pkgname} \
Rules for auto-correcting common %{langname} typing errors. \
\
%files -n %{pkgname} \
%defattr(-,root,root,-) \
%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE \
%dir %{_datadir}/autocorr \
%{!-X:%{_datadir}/autocorr/acor_%{lang}-*} \
%*


%if %{langpacks}
%langpack -l af -n Afrikaans -F -H -Y -A -o af_ZA -S -U
%langpack -l ar -n Arabic -F -H -O -S -U
%langpack -l as -n Assamese -F -H -Y -o as_IN -S -U
%langpack -l bg -n Bulgarian -F -H -Y -M -A -o bg_BG -S -U
%langpack -l bn -n Bengali -F -H -Y -O -S -U
#langpack -l br -n Breton -F -O -S -U -u fr
%langpack -l ca -n Catalan -F -H -Y -M -o ca_ES -S -U
%langpack -l cs -n Czech -F -H -Y -M -A -o cs_CZ -S -U
%langpack -l cy -n Welsh -F -H -Y -o cy_GB -S -U
%langpack -l da -n Danish -F -H -Y -M -A -o da_DK -S -U
%langpack -l de -n German -F -H -Y -M -A -O -S -U
%langpack -l dz -n Dzongkha -F -O -S -U
%langpack -l el -n Greek -F -H -Y -M -o el_GR -S -U
%langpack -l en -n English -M -O -U -A -Y -H
%langpack -l es -n Spanish -F -H -Y -M -A -O -S -U
%langpack -l et -n Estonian -F -H -Y -o et_EE -S -U
%langpack -l eu -n Basque -F -H -Y -A -o eu_ES -S -U
#langpack -l fa -n Farsi -A -H -Y -S
%langpack -l fi -n Finnish -F -r libreoffice-voikko -A -o fi_FI -S -U
%langpack -l fr -n French -F -H -Y -M -A -O -S -U
%langpack -l ga -n Irish -F -H -Y -M -A -o ga_IE -S -U
%langpack -l gl -n Galician -F -H -Y -o gl_ES -S -U
%langpack -l gu -n Gujarati -F -H -Y -o gu_IN -S -U
%langpack -l he -n Hebrew -F -H -o he_IL -S -U
%langpack -l hi -n Hindi -F -H -Y -o hi_IN -S -U
%langpack -l hr -n Croatian -F -H -Y -A -o hr_HR -S -U
%langpack -l hu -n Hungarian -F -H -Y -M -A -o hu_HU -S -U
%langpack -l it -n Italian -F -H -Y -M -A -O -S -U
%langpack -l ja -n Japanese -F -A -o ja_JP -S -U
%langpack -l kn -n Kannada -F -H -Y -o kn_IN -S -U
%langpack -l ko -n Korean -F -H -A -o ko_KR -S -U
%{baseinstdir}/share/registry/korea.xcd

%langpack -l lt -n Lithuanian -F -H -Y -A -o lt_LT -S -U
#langpack -l lv -n Latvian -F -H -Y -M -S
%langpack -l mai -n Maithili -F -o mai_IN -S -U
%langpack -l ml -n Malayalam -F -H -Y -o ml_IN -S -U
%langpack -l mr -n Marathi -F -H -Y -o mr_IN -S -U
%langpack -l nb -n Bokmal -F -H -Y -M -o nb_NO -S -u no
%langpack -l nl -n Dutch -F -H -Y -M -A -O -S -U
%langpack -l nn -n Nynorsk -F -H -Y -M -o nn_NO -S -u no
%define langpack_lang Southern Ndebele
%langpack -l nr -n %{langpack_lang} -F -H -o nr_ZA -S -U
%define langpack_lang Northern Sotho
%langpack -l nso -n %{langpack_lang} -F -H -o nso_ZA -S
%langpack -l or -n Oriya -F -H -Y -o or_IN -S -U
%langpack -l pa -n Punjabi -F -H -Y -O -s pa-IN -U
%langpack -l pl -n Polish -F -H -Y -M -A -o pl_PL -S -U
%define langpack_lang Brazilian Portuguese
%langpack -l pt-BR -n %{langpack_lang} -f pt -h pt -y pt -m pt -a pt -o pt_BR -p pt_BR -S -u pt
%langpack -l pt-PT -n Portuguese -f pt -h pt -y pt -m pt -a pt -o pt_PT -p pt_PT -s pt -u pt
%langpack -l ro -n Romanian -F -H -Y -M -O -S -U
%langpack -l ru -n Russian -F -H -Y -M -A -O -S -U
%langpack -l si -n Sinhalese -F -H -O -S -U
%langpack -l sk -n Slovak -F -H -Y -M -A -o sk_SK -S -U
%langpack -l sl -n Slovenian -F -H -Y -M -A -o sl_SI -S -U
%langpack -l sr -n Serbian -F -H -Y -A -O -S -U
%langpack -l ss -n Swati -F -H -o ss_ZA -S -U
%define langpack_lang Southern Sotho
%langpack -l st -n %{langpack_lang} -F -H -o st_ZA -S -U
%langpack -l sv -n Swedish -F -H -Y -M -A -O -S -U
%langpack -l ta -n Tamil -F -H -Y -o ta_IN -S -U
%langpack -l te -n Telugu -F -H -Y -o te_IN -S -U
%langpack -l th -n Thai -F -H -o th_TH -S -U
%langpack -l tn -n Tswana -F -H -o tn_ZA -S -U
%langpack -l tr -n Turkish -F -A -o tr_TR -S -U
%langpack -l ts -n Tsonga -F -H -o ts_ZA -S -U
%langpack -l uk -n Ukrainian -F -H -Y -M -O -S -U
%langpack -l ve -n Venda -F -H -o ve_ZA -S -U
%langpack -l xh -n Xhosa -F -H -o xh_ZA -S -U
%define langpack_lang Simplified Chinese
%langpack -l zh_CN -n %{langpack_lang} -f zh-cn -a zh -o zh_CN -s zh-CN -u zh
%define langpack_lang Traditional Chinese
%langpack -l zh_TW -n %{langpack_lang} -f zh-tw -a zh -o zh_TW -s zh-TW -u zh
%langpack -l zu -n Zulu -F -H -Y -o zu_ZA -S -U
%undefine langpack_lang
%endif

%autocorr -l en -n English

%if %{langpacks}
%autocorr -l af -n Afrikaans
%autocorr -l bg -n Bulgarian
%autocorr -l cs -n Czech
%autocorr -l da -n Danish
%autocorr -l de -n German
%autocorr -l es -n Spanish
%autocorr -l eu -n Basque -X
%{_datadir}/autocorr/acor_eu.dat

%autocorr -l fa -n Farsi
%autocorr -l fi -n Finnish
%autocorr -l fr -n French
%autocorr -l ga -n Irish
%autocorr -l hr -n Croatian
%autocorr -l hu -n Hungarian
%autocorr -l it -n Italian
%autocorr -l ja -n Japanese
%autocorr -l ko -n Korean
%autocorr -l lb -n Luxembourgish
%autocorr -l lt -n Lithuanian
%autocorr -l mn -n Mongolian
%autocorr -l nl -n Dutch
%autocorr -l pl -n Polish
%autocorr -l pt -n Portuguese
%autocorr -l ru -n Russian
%autocorr -l sk -n Slovak
%autocorr -l sl -n Slovenian
%autocorr -l sr -n Serbian
%{_datadir}/autocorr/acor_sh-*

%autocorr -l sv -n Swedish
%autocorr -l tr -n Turkish
%autocorr -l vi -n Vietnamese
%autocorr -l zh -n Chinese
%endif

%helplangpack -l en -n English

%if %{langpacks}
#helplangpack -l ar -n Arabic -S
%helplangpack -l bg -n Bulgarian -S
%helplangpack -l bn -n Bengali -S
#helplangpack -l br -n Breton -S
%helplangpack -l ca -n Catala -S
%helplangpack -l cs -n Czech -S
%helplangpack -l da -n Danish -S
%helplangpack -l de -n German -S
%helplangpack -l dz -n Dzongkha -S
%helplangpack -l el -n Greek -S
%helplangpack -l es -n Spanish -S
%helplangpack -l et -n Estonian -S
%helplangpack -l eu -n Basque -S
%helplangpack -l fi -n Finnish -S
%helplangpack -l fr -n French -S
%helplangpack -l gl -n Galician -S
%helplangpack -l hi -n Hindi -S
%helplangpack -l hu -n Hungarian -S
%helplangpack -l it -n Italian -S
%helplangpack -l ja -n Japanese -S
%helplangpack -l ko -n Korean -S
#helplangpack -l mai -n Maithili -S
%helplangpack -l nb -n Bokmal -S
%helplangpack -l nl -n Dutch -S
%helplangpack -l nn -n Nynorsk -S
%define langpack_lang Southern Ndebele
#helplangpack -l nr -n %{langpack_lang} -S
%define langpack_lang Northern Sotho
#helplangpack -l nso -n %{langpack_lang} -S
#helplangpack -l pa -n Punjabi -s pa-IN
%helplangpack -l pl -n Polish -S
%define langpack_lang Brazilian Portuguese
%helplangpack -l pt_BR -n %{langpack_lang} -s pt-BR
%helplangpack -l pt -n Portuguese -s pt
%helplangpack -l ru -n Russian -S
#helplangpack -l sh -n Secwepemctsin -S
%helplangpack -l si -n Sinhalese -S
%helplangpack -l sk -n Slovak -S
%helplangpack -l sl -n Slovenian -S
#helplangpack -l sr -n Serbian -S
%define langpack_lang Southern Sotho
#helplangpack -l st -n %{langpack_lang} -S
#helplangpack -l ss -n Swati -S
%helplangpack -l sv -n Swedish -S
#helplangpack -l ta -n Tamil -S 
#helplangpack -l tn -n Tswana -S
#helplangpack -l th -n Thai -S
%helplangpack -l tr -n Turkish -S
#helplangpack -l ts -n Tsonga -S
%helplangpack -l uk -n Ukrainian -S
#helplangpack -l ve -n Venda -S
#helplangpack -l xh -n Xhosa -S
%define langpack_lang Simplified Chinese
%helplangpack -l zh_CN -n %{langpack_lang} -s zh-CN
%define langpack_lang Traditional Chinese
%helplangpack -l zh_TW -n %{langpack_lang} -s zh-TW
#helplangpack -l zu -n Zulu -S
%endif

%prep
%setup -q -c -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 9 -a 10 -a 11 -a 12 -a 13 -a 14 -a 15 -a 16 -a 17 -a 18 -a 19
for a in */*; do mv `pwd`/$a .; done
#Customize Palette to remove Sun colours and add Red Hat colours
#TODO: have and add mageia colours
(head -n -1 extras/source/palettes/standard.soc && \
 echo -e ' <draw:color draw:name="Mageia 1" draw:color="#cc0000"/>
 <draw:color draw:name="Mageia 2" draw:color="#0093d9"/> 
 <draw:color draw:name="Mageia 3" draw:color="#ff8d00"/>
 <draw:color draw:name="Mageia 4" draw:color="#abb400"/>
 <draw:color draw:name="Mageia 5" draw:color="#4e376b"/>' && \
 tail -n 1 extras/source/palettes/standard.soc) > mageia.soc
mv -f mageia.soc extras/source/palettes/standard.soc

%patch1  -p1
%patch2  -p1 -b .ooo86080.unopkg.bodge.patch
%patch3  -p1 -b .ooo88341.sc.verticalboxes.patch
%patch4  -p1 -b .oooXXXXX.solenv.allowmissing.patch
%patch5  -p0 -b .ooo101274.opening-a-directory.patch
%patch6  -p0 -b .ooo105784.vcl.sniffscriptforsubs.patch
%patch7  -p1 -b .ooo108637.sfx2.uisavedir.patch
%patch8  -p0 -b .ooo113273.desktop.resolvelinks.patch
%patch9  -p1 -b .libreoffice-installfix.patch
%patch10 -p1 -b .rhbz655686-get-order-of-shutdown-c.patch
%patch11 -p0 -b .kde4configure.patch
%patch12 -p1 -b .rhbz695509-crash-in-RefreshDocumentLB.patch
%patch13 -p1 -b .bubble-down-configure-test-findings-on-visibility.patch
%patch14 -p0 -b .vbahelper.visibility.patch
%patch15 -p1 -b .rhbz702635-set-correct-page-number-when-exporting-s.patch
%patch16 -p1 -b .rhbz652604-better-survive-exceptions-thrown.patch
%patch17 -p1 -b .rhbz713154-pdf-export-dialog-too-tall-to-f.patch
%patch18 -p1 -b .rhbz702833-addEventListener-without-removeE.patch
%patch19 -p1 -b .rhbz711087-band-aid.patch
%patch20 -p1 -b .rhbz667082-do-not-crash-importing-section-containin.patch
%patch21 -p1 -b .rhbz718976-crash-in-SwTxtSizeInfo-GetMultiC.patch
%patch22 -p1 -b .rhbz715549-use-fontconfig-s-detected-forma.patch
%patch23 -p1 -b .rhbz693265-fix-crash-from-unhandled-except.patch
%patch24 -p1 -b .rhbz730225-avoid-segv-in-ld-this-was-set-to.patch
%patch25 -p1
%patch26 -p1 -b .fdo37195-migrationoo3-not-registered.patch
%patch27 -p1 -b .rhbz738255-avoid-crash-on-NULL-pointer.patch
%patch28 -p1 -b .rhbz751290-KDE-black-on-dark-tooltips.patch
%patch29 -p1 -b .gtk3-fix-cairo-canvas-crash-for-non-X-or-svp-backend.patch
%patch30 -p1 -b .rhbz759647-dispose-clears-mpPresTimer-befo.patch
%patch31 -p1 -b .rhbz761009-IFSD_Equal-is-asymmetrical.patch
%patch32 -p1 -b .rhbz-767708-avoid-SIGBUS-writing-to-overcom.patch
%patch33 -p1 -b .smath-does-not-handle-accents-in-MathML.patch
%patch35 -p1 -b .Confine-JDBC-driver-to-thread-affine-apartment-for-J.patch
%patch42 -p1 -b .solenv.fix.mk.inheritance.patch
%patch43 -p1 -b .rhbz-753201-fedora-ant-java-1.5.0-gcj-won-t-.patch
%patch45 -p1 -b .libreoffice-ppc64.patch

%patch200 -p0 -b .gcc62
# these are horribly incomplete--empty translations and copied english
# strings with spattering of translated strings
rm -rf translations/source/{gu,he,hr}/helpcontent2
chmod +x solenv/bin/install-gdb-printers

#patch100 -p0
touch scripting/source/pyprov/delzip
touch scripting/util/provider/beanshell/delzip
touch scripting/util/provider/javascript/delzip

%build
echo build start time is `date`, diskspace: `df -h . | tail -n 1`
#don't build localized helps which aren't translated
POORHELPS=`ls -d translations/source/*/helpcontent2 translations/source/*|cut -f 3 -d /|sort|uniq -u|xargs`
#don't build localized helps which are poorly translated
POORHELPS="$POORHELPS `grep 'msgstr .Working with Documents' translations/source/*/helpcontent2/source/text/swriter/guide.po| cut -f 3 -d / | xargs`"
#convert _smp_mflags to dmake equivalent
SMP_MFLAGS=%{?_smp_mflags}
SMP_MFLAGS=$[${SMP_MFLAGS/-j/}]
if [ $SMP_MFLAGS -lt 2 ]; then SMP_MFLAGS=2; fi
NDMAKES=`dc -e "$SMP_MFLAGS v p"`
NBUILDS=`dc -e "$SMP_MFLAGS $NDMAKES / p"`

# KDE bits
export QT4DIR=%{qt4dir}
export KDE4DIR=%{_kde_prefix}
export PATH=$QT4DIR/bin:$PATH

#use the RPM_OPT_FLAGS but remove the OOo overridden ones
for i in $RPM_OPT_FLAGS; do
        case "$i" in
                -O?|-pipe|-Wall|-g|-fexceptions) continue;;
        esac
        ARCH_FLAGS="$ARCH_FLAGS $i"
done
export ARCH_FLAGS
export CFLAGS=$ARCH_FLAGS
export CXXFLAGS=$ARCH_FLAGS

autoconf

%configure \
 %vendoroption --with-num-cpus=$NBUILDS --with-max-jobs=$NDMAKES \
 --with-build-version="Ver: %{version}-%{release}" --with-unix-wrapper=%{name} \
 --disable-ldap --disable-epm --disable-mathmldtd --disable-Xaw \
 --disable-gnome-vfs --enable-gio --enable-symbols --enable-lockdown \
 --enable-evolution2 --enable-cairo --enable-dbus --enable-opengl --enable-vba \
 --enable-binfilter --enable-ext-presenter-minimizer \
 --enable-ext-presenter-console --enable-ext-pdfimport \
 --enable-ext-wiki-publisher --enable-ext-report-builder \
 --enable-ext-scripting-beanshell --enable-ext-scripting-javascript \
 --enable-ext-scripting-python --enable-kde4 --with-system-libtextcat \
 --with-system-jfreereport --with-vba-package-format="builtin" \
 --with-system-libs --with-system-headers --with-system-mozilla \
 --with-system-mythes --with-system-dicts --with-system-apache-commons \
 --without-system-saxon --with-external-dict-dir=/usr/share/myspell \
 --without-myspell-dicts --without-fonts --without-ppds --without-afms \
 %{with_lang} --with-poor-help-localizations="$POORHELPS" \
 --with-external-tar=`pwd`/ext_sources --with-java-target-version=1.5 \
 --with-external-libtextcat-data \
 --without-system-translate-toolkit --without-system-hsqldb 

mkdir -p ext_sources
cp %{SOURCE20} ext_sources
cp %{SOURCE23} ext_sources
cp %{SOURCE24} ext_sources
cp %{SOURCE25} ext_sources
cp %{SOURCE26} ext_sources
cp %{SOURCE27} ext_sources
cp %{SOURCE28} ext_sources
cp %{SOURCE29} ext_sources
cp %{SOURCE30} ext_sources
cp %{SOURCE31} ext_sources
touch src.downloaded

. ./*[Ee]nv.[Ss]et.sh
./bootstrap

cd instsetoo_native
if ! VERBOSE=true build --dlv_switch -link -P$NBUILDS --all -- -P$NDMAKES -s; then
    build --dlv_switch -link --all
fi

#generate the icons and mime type stuff
export DESTDIR=../../../output
export KDEMAINDIR=/usr
export GNOMEDIR=/usr
export GNOME_MIME_THEME=hicolor
cd ../sysui
cd unxlng*/misc/libreoffice
./create_tree.sh

echo build end time is `date`, diskspace: `df -h . | tail -n 1`

%define install_bundled_extension(f:n:) \
%define extname_ %{-n:%{-n*}}%{!-n:%{error:No extension name given}} \
%define filename_ %{-f:%{-f*}}%{!-f:%{extname_}.oxt} \
%define extdir_ $RPM_BUILD_ROOT/%{baseinstdir}/share/extensions \
install -d -m 755 %{extdir_}/%{extname_} \
unzip -d %{extdir_}/%{extname_} $SOLARVER/$INPATH/bin/%{filename_} \
find %{extdir_}/%{extname_} -type f -name '*.txt' -exec chmod -x '{}' \\;

%install
rm -rf $RPM_BUILD_ROOT
source ./Linux*Env.Set.sh
#figure out the icon version
export `grep "^PRODUCTVERSIONSHORT =" solenv/inc/productversion.mk | sed -e "s/ //g"`
export `grep "PRODUCTVERSION[ ]*=[ ]*" solenv/inc/productversion.mk | sed -e "s/ //g"`
#install
cd instsetoo_native/util
#direct install
mkdir -p $RPM_BUILD_ROOT/%{instdir}
export PKGFORMAT=installed
#don't duplicate english helpcontent about the place
unset DEFAULT_TO_ENGLISH_FOR_PACKING
if dmake openoffice_en-US; then
    ok=true
    break
else
    echo - ---dump log start---
    cat ../unx*.pro/LibreOffice/installed/logging/en-US/log_*_en-US.log
    echo - ---dump log end---
    ok=false
fi
if [ $ok == "false" ]; then
    exit 1
fi
mkdir -p $RPM_BUILD_ROOT/%{baseinstdir}
mv ../unxlng*.pro/LibreOffice/installed/install/en-US/* $RPM_BUILD_ROOT/%{baseinstdir}
chmod -R +w $RPM_BUILD_ROOT/%{baseinstdir}
%if %{langpacks}
dmake ooolanguagepack
rm -rf ../unxlng*.pro/LibreOffice_languagepack/installed/install/log
for langpack in ../unxlng*.pro/LibreOffice_languagepack/installed/install/*; do
  cp -rp $langpack/* $RPM_BUILD_ROOT/%{baseinstdir}
  rm -rf $langpack
done
%endif
rm -rf $RPM_BUILD_ROOT/%{baseinstdir}/share/prereg
#give a consistent javasettingsunopkginstall.xml
$RPM_BUILD_ROOT/%{baseinstdir}/program/unopkg list --bundled || :
export WITH_LANG="en-US"
dmake sdkoo
mv ../unxlng*.pro/LibreOffice_SDK/installed/install/en-US/*/sdk $RPM_BUILD_ROOT/%{sdkinstdir}
cd ../../

# unpack extensions
%install_bundled_extension -n pdfimport -f pdfimport/pdfimport.oxt
%install_bundled_extension -n presentation-minimizer -f minimizer/presentation-minimizer.oxt
%install_bundled_extension -n presenter-screen -f presenter/presenter-screen.oxt
%install_bundled_extension -n report-builder
%install_bundled_extension -n script-provider-for-beanshell
%install_bundled_extension -n script-provider-for-javascript
%install_bundled_extension -n script-provider-for-python
%install_bundled_extension -n wiki-publisher -f swext/wiki-publisher.oxt

#configure sdk
pushd $RPM_BUILD_ROOT/%{sdkinstdir}
    for file in setsdkenv_unix.csh setsdkenv_unix.sh ; do
        sed -e "s,@OO_SDK_NAME@,sdk," \
            -e "s,@OO_SDK_HOME@,%{sdkinstdir}," \
            -e "s,@OFFICE_HOME@,%{baseinstdir}," \
            -e "s,@OFFICE_BASE_HOME@,%{basisinstdir}," \
            -e "s,@OO_SDK_URE_HOME@,%{ureinstdir}," \
            -e "s,@OO_SDK_MAKE_HOME@,/usr/bin," \
            -e "s,@OO_SDK_ZIP_HOME@,/usr/bin," \
            -e "s,@OO_SDK_CPP_HOME@,/usr/bin," \
            -e "s,@OO_SDK_CC_55_OR_HIGHER@,," \
            -e "s,@OO_SDK_JAVA_HOME@,$JAVA_HOME," \
            -e "s,@OO_SDK_OUTPUT_DIR@,\$HOME," \
            -e "s,@SDK_AUTO_DEPLOYMENT@,NO," \
            $file.in > $file
        chmod 755 $file
    done
#fix permissions
    find examples -type f -exec chmod -x {} \;
popd

chmod -x $RPM_BUILD_ROOT/%{basisinstdir}/program/testtoolrc

#ensure a template dir for each lang
pushd $RPM_BUILD_ROOT/%{basisinstdir}/share/template
for I in %{langpack_langs}; do
    mkdir -p $I
done
popd

#Set some aliases to canonical autocorrect language files for locales with matching languages
pushd $RPM_BUILD_ROOT/%{basisinstdir}/share/autocorr

en_GB_aliases="en-AG en-AU en-BS en-BW en-BZ en-CA en-DK en-GH en-HK en-IE en-IN en-JM en-NG en-NZ en-SG en-TT"
for lang in $en_GB_aliases; do
        ln -sf acor_en-GB.dat acor_$lang.dat
done
en_US_aliases="en-PH"
for lang in $en_US_aliases; do
        ln -sf acor_en-US.dat acor_$lang.dat
done
#en-ZA exists and has a good autocorrect file with two or three extras that make sense for 
#neighbouring english speaking territories
en_ZA_aliases="en-NA en-ZW"
for lang in $en_ZA_aliases; do
        ln -sf acor_en-ZA.dat acor_$lang.dat
done
%if %{langpacks}
af_ZA_aliases="af-NA"
for lang in $af_ZA_aliases; do
        ln -sf acor_af-ZA.dat acor_$lang.dat
done
de_DE_aliases="de-AT de-BE de-CH de-LI de-LU"
for lang in $de_DE_aliases; do
        ln -sf acor_de-DE.dat acor_$lang.dat
done
es_ES_aliases="es-AR es-BO es-CL es-CO es-CR es-CU es-DO es-EC es-GT es-HN es-MX es-NI es-PA es-PE es-PR es-PY es-SV es-US es-UY es-VE"
for lang in $es_ES_aliases; do
        ln -sf acor_es-ES.dat acor_$lang.dat
done
fr_FR_aliases="fr-BE fr-CA fr-CH fr-LU fr-MC"
for lang in $fr_FR_aliases; do
        ln -sf acor_fr-FR.dat acor_$lang.dat
done
it_IT_aliases="it-CH"
for lang in $it_IT_aliases; do
        ln -sf acor_it-IT.dat acor_$lang.dat
done
nl_NL_aliases="nl-AW nl-BE"
for lang in $nl_NL_aliases; do
        ln -s acor_nl-NL.dat acor_$lang.dat
done
sv_SE_aliases="sv-FI"
for lang in $sv_SE_aliases; do
        ln -s acor_sv-SE.dat acor_$lang.dat
done
%else
rm -f acor_[a-df-z]*.dat acor_e[su]*.dat
%endif
popd
#rhbz#484055 make these shared across multiple applications
mkdir -p $RPM_BUILD_ROOT/%{_datadir}
mv -f $RPM_BUILD_ROOT/%{basisinstdir}/share/autocorr $RPM_BUILD_ROOT/%{_datadir}/autocorr
chmod 755 $RPM_BUILD_ROOT/%{_datadir}/autocorr

%if %{langpacks}

#auto generate the langpack file lists, format is...
#langpack id, has help or not, autocorrection glob, script classification
langpackdetails=\
(\
af      nohelp  western         ar      nohelp  ctl     \
as      nohelp  western         bg      help    western \
bn      help    western         ca      help    western \
cs      help    western         cy      nohelp  western \
da      help    western         de      help    western \
dz      help    ctl             el      help    western \
es      help    western         et      help    western \
eu      help    western         fi      help    western \
fr      help    western         ga      nohelp  western \
gl      help    western         gu      nohelp  ctl     \
he      nohelp  ctl             hi      help    ctl     \
hr      nohelp  western         hu      help    western \
it      help    western         ja      help    cjk     \
ko      help    cjk             kn      nohelp  western \
lt      nohelp    western       mai     nohelp  western \
ml      nohelp  western         mr      nohelp  western \
nb      help    western         nl      help    western \
nn      help    western         nr      nohelp  western \
nso     nohelp  western         or      nohelp  ctl     \
pa-IN   nohelp  ctl             pl      help    western \
pt      help    western         pt-BR   help    western \
ro      nohelp  western         ru      help    western \
sh      nohelp  western         si      help    ctl     \
sk      help    western         sl      help    western \
sr      nohelp  western         ss      nohelp  western \
st      nohelp  western         sv      help    western \
ta      nohelp  ctl             te      nohelp  western \
th      nohelp  ctlseqcheck     tn      nohelp  western \
tr      help    western         ts      nohelp  western \
uk      help    western         ve      nohelp  western \
xh      nohelp  western         zh-CN   help    cjk     \
zh-TW   help    cjk             zu  i   nohelp  western \
fa      nohelp  ctl             br      help    western \
lv      nohelp    western \
)

tar xzf %{SOURCE21}

i=0
while [ $i -lt ${#langpackdetails[@]} ]; do
   lang=${langpackdetails[$i]}
   sed -e "s/LANG/$lang/g" langpacks/libreoffice.langpack-common.template > $lang.filelist
   echo "$lang.filelist"
   i=$[i+1]
   help=${langpackdetails[$i]}
   if [ "$help" = "help" ]; then
     sed -e "s/LANG/$lang/g" langpacks/libreoffice.langpack-help.template >> $lang.help.filelist
     echo "$lang.help.filelist"
     cat $lang.help.filelist
   fi
   i=$[i+1]
   type=${langpackdetails[$i]}
   if [ "$type" = "cjk" ]; then
     sed -e "s/LANG/$lang/g" langpacks/libreoffice.langpack-cjk.template >> $lang.filelist
   fi
   #rh217269 upstream made a decision to sequence check all ctl languages
   #I think this is wrong, and only Thai should be sequence checked
   if [ "$type" = "ctlseqcheck" ]; then
     sed -e "s/LANG/$lang/g" langpacks/libreoffice.langpack-ctl.template >> $lang.filelist
   fi
   if [ "$type" = "ctl" ]; then
     rm -f $RPM_BUILD_ROOT/%{basisinstdir}/share/registry/ctl_$lang.xcd
   fi
   i=$[i+1]
done

#rhbz#452379 clump serbian translations together
cat sh.filelist >> sr.filelist

%endif

#remove it in case we didn't build with gcj
rm -f $RPM_BUILD_ROOT/%{basisinstdir}/program/classes/sandbox.jar

#remove dummy .dat files
rm -f $RPM_BUILD_ROOT/%{basisinstdir}/program/root?.dat

#set standard permissions for rpmlint
find $RPM_BUILD_ROOT/%{baseinstdir} -exec chmod +w {} \;
find $RPM_BUILD_ROOT/%{baseinstdir} -type d -exec chmod 0755 {} \;

# move python bits into site-packages
mkdir -p $RPM_BUILD_ROOT/%{python_sitearch}
pushd $RPM_BUILD_ROOT/%{python_sitearch}
echo "import sys, os" > uno.py
echo "sys.path.append('%{basisinstdir}/program')" >> uno.py
echo "os.putenv('URE_BOOTSTRAP', 'vnd.sun.star.pathname:%{baseinstdir}/program/fundamentalrc')" >> uno.py
cat $RPM_BUILD_ROOT/%{basisinstdir}/program/uno.py >> uno.py
rm -f $RPM_BUILD_ROOT/%{basisinstdir}/program/uno.py*
mv -f $RPM_BUILD_ROOT/%{basisinstdir}/program/unohelper.py* .
popd

# rhbz#477435 package opensymbol separately
pushd $RPM_BUILD_ROOT/%{basisinstdir}/share/fonts/truetype
install -d -m 0755 %{buildroot}%{_fontdir}
install -p -m 0644 *.ttf %{buildroot}%{_fontdir}
popd
rm -rf $RPM_BUILD_ROOT/%{basisinstdir}/share/fonts

#ensure that no sneaky un-prelinkable, un-fpic or non executable shared libs 
#have snuck through
pic=0
executable=0
for foo in `find $RPM_BUILD_ROOT/%{instdir} -name "*" -exec file {} \;| grep ": ELF" | cut -d: -f 1` ; do
    chmod +wx $foo
    ls -asl $foo
    result=`readelf -d $foo | grep TEXTREL` || true
    if [ "$result" != "" ]; then
        echo "TEXTREL Warning: $foo is b0rked (-fpic missing)"
        pic=1
    fi
    result=`readelf -l $foo | grep GNU_STACK | grep RWE` || true
    if [ "$result" != "" ]; then
        echo "GNU_STACK Warning: $foo is b0rked (-noexecstack missing)"
        executable=1
    fi
done
if [ $pic == 1 ]; then false; fi
if [ $executable == 1 ]; then false; fi

#make up some /usr/bin scripts
mkdir -p $RPM_BUILD_ROOT/%{_bindir}

echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/ooffice
echo exec libreoffice \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/ooffice
chmod a+x $RPM_BUILD_ROOT/%{_bindir}/ooffice

echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/ooviewdoc
echo exec libreoffice --view \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/ooviewdoc
chmod a+x $RPM_BUILD_ROOT/%{_bindir}/ooviewdoc

echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/oowriter
echo exec libreoffice --writer \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/oowriter
chmod a+x $RPM_BUILD_ROOT/%{_bindir}/oowriter

echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/oocalc
echo exec libreoffice --calc \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/oocalc
chmod a+x $RPM_BUILD_ROOT/%{_bindir}/oocalc

echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/ooimpress
echo exec libreoffice --impress \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/ooimpress
chmod a+x $RPM_BUILD_ROOT/%{_bindir}/ooimpress

echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/oodraw
echo exec libreoffice --draw \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/oodraw
chmod a+x $RPM_BUILD_ROOT/%{_bindir}/oodraw

echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/oomath
echo exec libreoffice --math \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/oomath
chmod a+x $RPM_BUILD_ROOT/%{_bindir}/oomath

echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/oobase
echo exec libreoffice --base \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/oobase
chmod a+x $RPM_BUILD_ROOT/%{_bindir}/oobase

cp -f %{SOURCE22} $RPM_BUILD_ROOT/%{_bindir}/unopkg
sed -i -e "s/LAUNCHER/unopkg/g" $RPM_BUILD_ROOT/%{_bindir}/unopkg
sed -i -e "s/BRAND/libreoffice/g" $RPM_BUILD_ROOT/%{_bindir}/unopkg
chmod a+x $RPM_BUILD_ROOT/%{_bindir}/unopkg

cp -f %{SOURCE22} $RPM_BUILD_ROOT/%{_bindir}/libreoffice
sed -i -e "s/LAUNCHER/soffice/g" $RPM_BUILD_ROOT/%{_bindir}/libreoffice
sed -i -e "s/BRAND/libreoffice/g" $RPM_BUILD_ROOT/%{_bindir}/libreoffice
chmod a+x $RPM_BUILD_ROOT/%{_bindir}/libreoffice

pushd $RPM_BUILD_ROOT/%{_bindir}
# rhbz#499474 provide a /usr/bin/soffice for .recently-used.xbel
ln -s %{baseinstdir}/program/soffice soffice
# rhbz#499474 provide a /usr/bin/openoffice.org for backwards compat
ln -s libreoffice openoffice.org
popd

pushd $RPM_BUILD_ROOT/%{baseinstdir}/share/xdg/
chmod u+w *.desktop
rm -rf printeradmin.desktop
ICONVERSION=`echo $PRODUCTVERSION | sed -e 's/\.//'`
for file in *.desktop; do
    # rhbz#156677 remove the version from Name=
    # rhbz#156067 don't version the icons
    sed -i -e "s/ *$PRODUCTVERSION//g" \
	-e "s/$ICONVERSION//g" \
        -e "s/$PRODUCTVERSIONSHORT//g" \
        $file
    # add X-GIO-NoFuse so we get url:// instead of file://~.gvfs/
    echo X-GIO-NoFuse=true >> $file
done
for app in base calc draw impress math writer; do
    echo "StartupNotify=true" >> $app.desktop
    echo "TryExec=oo$app" >> $app.desktop
done
# rhbz#156677# / rhbz#186515#
echo "NoDisplay=true" >> startcenter.desktop
# rhbz#491159 temporarily remove NoDisplay=true from qstart.desktop
sed -i -e "/NoDisplay=true/d" qstart.desktop
# relocate the .desktop and icon files
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/applications
for app in base calc draw impress javafilter math startcenter writer; do
    desktop-file-validate $app.desktop
    cp -p $app.desktop $RPM_BUILD_ROOT/%{_datadir}/applications/libreoffice-$app.desktop
done
popd

# desktop files
%if 0
desktop-file-install --vendor="" \
  --remove-category="Application" \
  --add-category="Office" \
  --add-category="X-MandrivaLinux-CrossDesktop" \
  --add-mime-type="application/vnd.ms-works;application/x-msworks-wp;zz-application/zz-winassoc-wps" \
  --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/writer*desktop

desktop-file-install --vendor="" \
  --remove-category="Application" \
  --add-category="Office" \
  --add-category="X-MandrivaLinux-CrossDesktop" \
  --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/calc*desktop

desktop-file-install --vendor="" \
  --remove-category="Application" \
  --remove-category="Graphics" \
  --remove-category="VectorGraphics" \
  --add-category="Office" \
  --add-category="X-MandrivaLinux-CrossDesktop" \
  --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/draw*desktop

desktop-file-install --vendor="" \
  --remove-category="Application" \
  --add-category="Office" \
  --add-category="X-MandrivaLinux-CrossDesktop" \
  --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/impress*desktop

desktop-file-install --vendor="" \
  --remove-category="Application" \
  --add-category="Office" \
  --add-category="X-MandrivaLinux-CrossDesktop" \
  --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/math*desktop

desktop-file-install --vendor="" \
  --remove-category="Application" \
  --remove-category="Network" \
  --remove-category="WebDevelopment" \
  --add-category="Office" \
  --add-category="X-MandrivaLinux-CrossDesktop" \
  --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/web*desktop

desktop-file-install --vendor="" \
  --remove-category="Application" \
  --add-category="Office" \
  --add-category="X-MandrivaLinux-CrossDesktop" \
  --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/template*desktop
%endif

desktop-file-install --vendor="" \
  --remove-category="X-MandrivaLinux-MoreApplications-Databases" \
  --add-category="X-MandrivaLinux-CrossDesktop" \
  --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/libreoffice-base.desktop

%if 0
## MS OOXML (#36465)
desktop-file-install \
  --add-mime-type="application/vnd.openxmlformats-officedocument.wordprocessingml.document" \
  --add-mime-type="application/vnd.ms-word.document.macroEnabled.12" \
  --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/writer*desktop

desktop-file-install \
  --add-mime-type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" \
  --add-mime-type="application/vnd.ms-excel.sheet.macroEnabled.12" \
  --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/calc*desktop

desktop-file-install \
  --add-mime-type="application/vnd.openxmlformats-officedocument.presentationml.presentation" \
  --add-mime-type="application/vnd.ms-powerpoint.presentation.macroEnabled.12" \
  --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/impress*desktop
%endif

pushd sysui/output/usr/share/
#get rid of the gnome icons and other unneeded files
rm -rf icons/gnome applications application-registry

#relocate the rest of them
for icon in `find icons -type f`; do
    mkdir -p $RPM_BUILD_ROOT/%{_datadir}/`dirname $icon`
    cp -p $icon $RPM_BUILD_ROOT/%{_datadir}/`echo $icon | sed -e s@office$ICONVERSION@office@`
done

mkdir -p $RPM_BUILD_ROOT/%{_datadir}/mime-info
cp -p mime-info/libreoffice$PRODUCTVERSION.keys $RPM_BUILD_ROOT/%{_datadir}/mime-info/libreoffice.keys
cp -p mime-info/libreoffice$PRODUCTVERSION.mime $RPM_BUILD_ROOT/%{_datadir}/mime-info/libreoffice.mime
#add our mime-types, e.g. for .oxt extensions
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/mime/packages
cp -p mime/packages/libreoffice$PRODUCTVERSION.xml $RPM_BUILD_ROOT/%{_datadir}/mime/packages/libreoffice.xml
popd

rm -rf $RPM_BUILD_ROOT/%{baseinstdir}/readmes
rm -rf $RPM_BUILD_ROOT/%{baseinstdir}/licenses

mkdir -p $RPM_BUILD_ROOT/%{basisinstdir}/share/psprint/driver
cp -p psprint_config/configuration/ppds/SGENPRT.PS $RPM_BUILD_ROOT/%{basisinstdir}/share/psprint/driver/SGENPRT.PS

# rhbz#452385 to auto have postgres in classpath if subsequently installed
# rhbz#465664 to get lucene working for functional help
sed -i -e "s#URE_MORE_JAVA_CLASSPATH_URLS.*#& file:///usr/share/java/lucene.jar file:///usr/share/java/lucene-contrib/lucene-analyzers.jar file:///usr/share/java/postgresql-jdbc.jar#" $RPM_BUILD_ROOT/%{basisinstdir}/program/fundamentalbasisrc

# Br translation doesn't have any template so this lead to a crash.
# Better use fr ones for now ( and check if this is still valid for next update )
# FIXME: Re enable when we will add back br translations
#pushd %buildroot%basisinstdir/share/template/
#rm -fr br
#ln -s fr br
#popd

export DESTDIR=$RPM_BUILD_ROOT
install-gdb-printers -a %{_datadir}/gdb/auto-load%{baseinstdir} -c -p %{_datadir}/libreoffice/gdb
# fix arch-dependent library suffix
cd solenv/gdb
cat <<EOF > dllpostfix.mk
PRJ=..
.INCLUDE : settings.mk
print-DLLPOSTFIX :
    @echo \$(DLLPOSTFIX)
EOF
libsuffix=`dmake -f dllpostfix.mk print-DLLPOSTFIX`
for f in `find $RPM_BUILD_ROOT/%{_datadir}/gdb/auto-load%{baseinstdir} -type f -name '*lo-gdb.py'`; do
	mv "$f" "${f%lo-gdb.py}${libsuffix}-gdb.py"
done

%check
source ./Linux*Env.Set.sh
cd test
build && deliver -link
cd ../smoketestdoc
build && deliver -link
cd ../smoketestoo_native
unset WITH_LANG
#JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY="1" works around flawed accessibility check
#SAL_USE_VCLPLUGIN="svp" uses the headless plugin for these tests
JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY="1" SAL_USE_VCLPLUGIN="svp" timeout -k 2m 2h build.pl

%files

%files core
%dir %{basisinstdir}
%dir %{basisinstdir}/help
%docdir %{basisinstdir}/help/en
%dir %{basisinstdir}/help/en
%{basisinstdir}/help/en/default.css
%{basisinstdir}/help/en/err.html
%{basisinstdir}/help/en/highcontrast1.css
%{basisinstdir}/help/en/highcontrast2.css
%{basisinstdir}/help/en/highcontrastblack.css
%{basisinstdir}/help/en/highcontrastwhite.css
%{basisinstdir}/help/en/sbasic.*
%{basisinstdir}/help/en/schart.*
%{basisinstdir}/help/en/shared.*
%{basisinstdir}/help/idxcaption.xsl
%{basisinstdir}/help/idxcontent.xsl
%{basisinstdir}/help/main_transform.xsl
%{basisinstdir}/presets
%dir %{basisinstdir}/program
%{basisinstdir}/program/addin
%{basisinstdir}/program/basprov%{SOPOST}.uno.so
%{basisinstdir}/program/canvasfactory.uno.so
%{basisinstdir}/program/cde-open-url
%{basisinstdir}/program/cmdmail.uno.so
%{basisinstdir}/program/deployment%{SOPOST}.uno.so
%{basisinstdir}/program/deploymentgui%{SOPOST}.uno.so
%{basisinstdir}/program/dlgprov%{SOPOST}.uno.so
%{basisinstdir}/program/fastsax.uno.so
%{basisinstdir}/program/fpicker.uno.so
%{basisinstdir}/program/fps_gnome.uno.so
%{basisinstdir}/program/fps_office.uno.so
%{basisinstdir}/program/fundamentalbasisrc
%{basisinstdir}/program/gnome-open-url
%{basisinstdir}/program/gnome-open-url.bin
%{basisinstdir}/program/hatchwindowfactory.uno.so
%{basisinstdir}/program/i18nsearch.uno.so
%{basisinstdir}/program/legacy_binfilters.rdb
%{basisinstdir}/program/libacc%{SOPOST}.so
%{basisinstdir}/program/libadabas%{SOPOST}.so
%{basisinstdir}/program/libavmedia*.so
%{basisinstdir}/program/libbasctl%{SOPOST}.so
%{basisinstdir}/program/libbf_sb%{SOPOST}.so
%{basisinstdir}/program/libbf_frm%{SOPOST}.so
%{basisinstdir}/program/libbf_go%{SOPOST}.so
%{basisinstdir}/program/libbf_migratefilter%{SOPOST}.so
%{basisinstdir}/program/libbf_ofa%{SOPOST}.so
%{basisinstdir}/program/libbf_sch%{SOPOST}.so
%{basisinstdir}/program/libbf_sd%{SOPOST}.so
%{basisinstdir}/program/libbf_so%{SOPOST}.so
%{basisinstdir}/program/libbf_svt%{SOPOST}.so
%{basisinstdir}/program/libbf_svx%{SOPOST}.so
%{basisinstdir}/program/libbf_wrapper%{SOPOST}.so
%{basisinstdir}/program/libbf_xo%{SOPOST}.so
%{basisinstdir}/program/libbib%{SOPOST}.so
%{basisinstdir}/program/libbindet%{SOPOST}.so
%{basisinstdir}/program/libcached1.so
%{basisinstdir}/program/libcanvastools%{SOPOST}.so
%{basisinstdir}/program/libchart*%{SOPOST}.so
%{basisinstdir}/program/libcollator_data.so
%{basisinstdir}/program/libcppcanvas%{SOPOST}.so
%{basisinstdir}/program/libctl%{SOPOST}.so
%{basisinstdir}/program/libcui%{SOPOST}.so
%{basisinstdir}/program/libdba%{SOPOST}.so
%{basisinstdir}/program/libdbase%{SOPOST}.so
%{basisinstdir}/program/libdbaxml%{SOPOST}.so
%{basisinstdir}/program/libdbmm%{SOPOST}.so
%{basisinstdir}/program/libdbpool2.so
%{basisinstdir}/program/libdbtools%{SOPOST}.so
%{basisinstdir}/program/libdbu%{SOPOST}.so
%{basisinstdir}/program/libdeploymentmisc%{SOPOST}.so
%{basisinstdir}/program/libdesktop_detector%{SOPOST}.so
%{basisinstdir}/program/libdict_ja.so
%{basisinstdir}/program/libdict_zh.so
%{basisinstdir}/program/libdrawinglayer%{SOPOST}.so
%{basisinstdir}/program/libediteng%{SOPOST}.so
%{basisinstdir}/program/libembobj.so
%{basisinstdir}/program/libemboleobj.so
%{basisinstdir}/program/libevoab*.so
%{basisinstdir}/program/libevtatt.so
%{basisinstdir}/program/libegi%{SOPOST}.so    
%{basisinstdir}/program/libeme%{SOPOST}.so
%{basisinstdir}/program/libepb%{SOPOST}.so
%{basisinstdir}/program/libepg%{SOPOST}.so    
%{basisinstdir}/program/libepp%{SOPOST}.so
%{basisinstdir}/program/libeps%{SOPOST}.so    
%{basisinstdir}/program/libept%{SOPOST}.so
%{basisinstdir}/program/libera%{SOPOST}.so    
%{basisinstdir}/program/libeti%{SOPOST}.so
%{basisinstdir}/program/libexp%{SOPOST}.so    
%{basisinstdir}/program/libicd%{SOPOST}.so
%{basisinstdir}/program/libicg%{SOPOST}.so
%{basisinstdir}/program/libidx%{SOPOST}.so
%{basisinstdir}/program/libime%{SOPOST}.so
%{basisinstdir}/program/libindex_data.so
%{basisinstdir}/program/libipb%{SOPOST}.so
%{basisinstdir}/program/libipd%{SOPOST}.so
%{basisinstdir}/program/libips%{SOPOST}.so
%{basisinstdir}/program/libipt%{SOPOST}.so
%{basisinstdir}/program/libipx%{SOPOST}.so
%{basisinstdir}/program/libira%{SOPOST}.so
%{basisinstdir}/program/libitg%{SOPOST}.so
%{basisinstdir}/program/libiti%{SOPOST}.so
%{basisinstdir}/program/liboooimprovecore%{SOPOST}.so
%{basisinstdir}/program/libfile%{SOPOST}.so
%{basisinstdir}/program/libfilterconfig1.so
%{basisinstdir}/program/libflat%{SOPOST}.so
%{basisinstdir}/program/libfrm%{SOPOST}.so
%{basisinstdir}/program/libguesslang%{SOPOST}.so
%{basisinstdir}/program/libhelplinker%{SOPOST}.so
%{basisinstdir}/program/libhyphen%{SOPOST}.so
%{basisinstdir}/program/libi18nregexpgcc3.so
%{basisinstdir}/program/libjdbc%{SOPOST}.so
%{basisinstdir}/program/liblegacy_binfilters%{SOPOST}.so
%{basisinstdir}/program/liblng%{SOPOST}.so
%{basisinstdir}/program/liblog%{SOPOST}.so
%{basisinstdir}/program/liblocaledata_en.so
%{basisinstdir}/program/liblocaledata_es.so
%{basisinstdir}/program/liblocaledata_euro.so
%{basisinstdir}/program/liblocaledata_others.so
%{basisinstdir}/program/libmcnttype.so
%{basisinstdir}/program/libmozbootstrap.so
%{basisinstdir}/program/libmsfilter%{SOPOST}.so
%{basisinstdir}/program/libmtfrenderer.uno.so
%{basisinstdir}/program/libmysql%{SOPOST}.so
%{basisinstdir}/program/libodbc%{SOPOST}.so
%{basisinstdir}/program/libodbcbase%{SOPOST}.so
%{basisinstdir}/program/liboffacc%{SOPOST}.so
%{basisinstdir}/program/liboox%{SOPOST}.so
%{basisinstdir}/program/libpcr%{SOPOST}.so
%{basisinstdir}/program/libpdffilter%{SOPOST}.so
%{basisinstdir}/program/libpl%{SOPOST}.so
%{basisinstdir}/program/libpreload%{SOPOST}.so
%{basisinstdir}/program/libprotocolhandler%{SOPOST}.so
%{basisinstdir}/program/libqstart_gtk%{SOPOST}.so
%{basisinstdir}/program/librecentfile.so
%{basisinstdir}/program/libres%{SOPOST}.so
%{basisinstdir}/program/libsax%{SOPOST}.so
%{basisinstdir}/program/libscn%{SOPOST}.so
%{basisinstdir}/program/libscriptframe.so
%{basisinstdir}/program/libsd%{SOPOST}.so
%{basisinstdir}/program/libsdfilt%{SOPOST}.so
%{basisinstdir}/program/libsdbc2.so
%{basisinstdir}/program/libsdbt%{SOPOST}so
%{basisinstdir}/program/libsdd%{SOPOST}.so
%{basisinstdir}/program/libsdui%{SOPOST}.so
%{basisinstdir}/program/libspa%{SOPOST}.so
%{basisinstdir}/program/libspell%{SOPOST}.so
%{basisinstdir}/program/libsrtrs1.so
%{basisinstdir}/program/libsts%{SOPOST}.so
%{basisinstdir}/program/libsvx%{SOPOST}.so
%{basisinstdir}/program/libsvxcore%{SOPOST}.so
%{basisinstdir}/program/libsw%{SOPOST}.so
%{basisinstdir}/program/libtextconv_dict.so
%{basisinstdir}/program/libtextconversiondlgs%{SOPOST}.so
%{basisinstdir}/program/libtvhlp1.so
%{basisinstdir}/program/libodfflatxml%{SOPOST}.so
%{basisinstdir}/program/libucbhelper4gcc3.so
%{basisinstdir}/program/libucpchelp1.so
%{basisinstdir}/program/libucpdav1.so
%{basisinstdir}/program/libucpftp1.so
%{basisinstdir}/program/libucphier1.so
%{basisinstdir}/program/libucppkg1.so
%{basisinstdir}/program/libunordf%{SOPOST}.so
%{basisinstdir}/program/libunopkgapp.so
%{basisinstdir}/program/libunoxml%{SOPOST}.so
%{basisinstdir}/program/libupdchk%{SOPOST}.so
%{basisinstdir}/program/libuui%{SOPOST}.so
%{basisinstdir}/program/libvbahelper%{SOPOST}.so
%{basisinstdir}/program/libvclplug_gen%{SOPOST}.so
%{basisinstdir}/program/libvclplug_gtk%{SOPOST}.so
%{basisinstdir}/program/libwpgimport%{SOPOST}.so
%{basisinstdir}/program/libxmlfa%{SOPOST}.so
%{basisinstdir}/program/libxmlfd%{SOPOST}.so
%{basisinstdir}/program/libxmx%{SOPOST}.so
%{basisinstdir}/program/libxof%{SOPOST}.so
%{basisinstdir}/program/libxsec_fw.so
%{basisinstdir}/program/libxsec_xmlsec.so
%{basisinstdir}/program/libxsltdlg%{SOPOST}.so
%{basisinstdir}/program/libxsltfilter%{SOPOST}.so
%{basisinstdir}/program/libxstor.so
%{basisinstdir}/program/migrationoo2.uno.so
%{basisinstdir}/program/migrationoo3.uno.so
%{basisinstdir}/program/msforms.uno.so
%{basisinstdir}/program/nsplugin
%{basisinstdir}/program/open-url
%{basisinstdir}/program/offapi.rdb
%{basisinstdir}/program/passwordcontainer.uno.so
%{basisinstdir}/program/pagein
%{basisinstdir}/program/pagein-common
%{basisinstdir}/program/plugin
%{basisinstdir}/program/pluginapp.bin
%{basisinstdir}/program/productregistration.uno.so
%dir %{basisinstdir}/program/resource
%{basisinstdir}/program/resource/avmediaen-US.res
%{basisinstdir}/program/resource/accen-US.res
%{basisinstdir}/program/resource/basctlen-US.res
%{basisinstdir}/program/resource/bf_frmen-US.res
%{basisinstdir}/program/resource/bf_ofaen-US.res
%{basisinstdir}/program/resource/bf_schen-US.res
%{basisinstdir}/program/resource/bf_sden-US.res
%{basisinstdir}/program/resource/bf_svten-US.res
%{basisinstdir}/program/resource/bf_svxen-US.res
%{basisinstdir}/program/resource/biben-US.res
%{basisinstdir}/program/resource/calen-US.res
%{basisinstdir}/program/resource/chartcontrolleren-US.res
%{basisinstdir}/program/resource/cuien-US.res
%{basisinstdir}/program/resource/dbaen-US.res
%{basisinstdir}/program/resource/dbmmen-US.res
%{basisinstdir}/program/resource/dbuen-US.res
%{basisinstdir}/program/resource/dbwen-US.res
%{basisinstdir}/program/resource/deploymenten-US.res
%{basisinstdir}/program/resource/deploymentguien-US.res
%{basisinstdir}/program/resource/dkten-US.res
%{basisinstdir}/program/resource/editengen-US.res
%{basisinstdir}/program/resource/epsen-US.res
%{basisinstdir}/program/resource/euren-US.res
%{basisinstdir}/program/resource/fps_officeen-US.res
%{basisinstdir}/program/resource/frmen-US.res
%{basisinstdir}/program/resource/fween-US.res
%{basisinstdir}/program/resource/galen-US.res
%{basisinstdir}/program/resource/impen-US.res
%{basisinstdir}/program/resource/ofaen-US.res
%{basisinstdir}/program/resource/pcren-US.res
%{basisinstdir}/program/resource/pdffilteren-US.res
%{basisinstdir}/program/resource/preloaden-US.res
%{basisinstdir}/program/resource/productregistrationen-US.res
%{basisinstdir}/program/resource/sanen-US.res
%{basisinstdir}/program/resource/sben-US.res
%{basisinstdir}/program/resource/sden-US.res
%{basisinstdir}/program/resource/sfxen-US.res
%{basisinstdir}/program/resource/spaen-US.res
%{basisinstdir}/program/resource/sdbten-US.res
%{basisinstdir}/program/resource/svlen-US.res
%{basisinstdir}/program/resource/svten-US.res
%{basisinstdir}/program/resource/svxen-US.res
%{basisinstdir}/program/resource/swen-US.res
%{basisinstdir}/program/resource/textconversiondlgsen-US.res
%{basisinstdir}/program/resource/tken-US.res
%{basisinstdir}/program/resource/tplen-US.res
%{basisinstdir}/program/resource/uuien-US.res
%{basisinstdir}/program/resource/updchken-US.res
%{basisinstdir}/program/resource/upden-US.res
%{basisinstdir}/program/resource/vclen-US.res
%{basisinstdir}/program/resource/wzien-US.res
%{basisinstdir}/program/resource/xmlsecen-US.res
%{basisinstdir}/program/resource/xsltdlgen-US.res
%{basisinstdir}/program/sax.uno.so
%{basisinstdir}/program/senddoc
%{basisinstdir}/program/services.rdb
%{basisinstdir}/program/simplecanvas.uno.so
%{basisinstdir}/program/slideshow.uno.so
%{basisinstdir}/program/libsofficeapp.so
%{basisinstdir}/program/spadmin.bin
%{basisinstdir}/program/stringresource%{SOPOST}.uno.so
%{basisinstdir}/program/syssh.uno.so
%{basisinstdir}/program/ucpexpand1.uno.so
%{basisinstdir}/program/ucpext.uno.so
%{basisinstdir}/program/ucptdoc1.uno.so
%{basisinstdir}/program/unorc
%{basisinstdir}/program/updatefeed.uno.so
%{basisinstdir}/ure-link
%{basisinstdir}/program/uri-encode
%{basisinstdir}/program/vbaevents%{SOPOST}.uno.so
%{basisinstdir}/program/vclcanvas.uno.so
%{basisinstdir}/program/versionrc
%{basisinstdir}/program/cairocanvas.uno.so
%dir %{basisinstdir}/share
%dir %{basisinstdir}/share/Scripts
%{basisinstdir}/share/autotext
%{basisinstdir}/share/basic
%dir %{basisinstdir}/share/config
%{basisinstdir}/share/config/images.zip
%{basisinstdir}/share/config/images_crystal.zip
%{basisinstdir}/share/config/images_hicontrast.zip
%{basisinstdir}/share/config/images_oxygen.zip
%{basisinstdir}/share/config/images_tango.zip
%{basisinstdir}/share/config/javasettingsunopkginstall.xml
%{basisinstdir}/share/config/psetup.xpm
%{basisinstdir}/share/config/psetupl.xpm
%dir %{basisinstdir}/share/config/soffice.cfg
%{basisinstdir}/share/config/soffice.cfg/modules
%{basisinstdir}/share/config/symbol
%{basisinstdir}/share/config/webcast
%{basisinstdir}/share/config/wizard
%dir %{basisinstdir}/share/dtd
%{basisinstdir}/share/dtd/officedocument
%{basisinstdir}/share/gallery
%dir %{basisinstdir}/share/psprint
%config %{basisinstdir}/share/psprint/psprint.conf
%{basisinstdir}/share/psprint/driver
%dir %{basisinstdir}/share/registry
%{basisinstdir}/share/registry/binfilter.xcd
%{basisinstdir}/share/registry/gnome.xcd
%{basisinstdir}/share/registry/lingucomponent.xcd
%{basisinstdir}/share/registry/main.xcd
%{basisinstdir}/share/registry/oo-ad-ldap.xcd.sample
%{basisinstdir}/share/registry/oo-ldap.xcd.sample
%{basisinstdir}/share/registry/Langpack-en-US.xcd
%dir %{basisinstdir}/share/registry/res
%{basisinstdir}/share/registry/res/fcfg_langpack_en-US.xcd
%dir %{basisinstdir}/share/samples
%{basisinstdir}/share/samples/en-US
%dir %{basisinstdir}/share/template
%{basisinstdir}/share/template/en-US
%dir %{basisinstdir}/share/template/common
%{basisinstdir}/share/template/common/layout
%{basisinstdir}/share/template/wizard
%dir %{basisinstdir}/share/wordbook
%{basisinstdir}/share/wordbook/en-US
%dir %{basisinstdir}/share/xslt
%{basisinstdir}/share/xslt/common
%dir %{basisinstdir}/share/xslt/export
%{basisinstdir}/share/xslt/export/common
%{basisinstdir}/share/xslt/export/spreadsheetml
%{basisinstdir}/share/xslt/export/wordml
%dir %{basisinstdir}/share/xslt/import
%{basisinstdir}/share/xslt/import/common
%{basisinstdir}/share/xslt/import/spreadsheetml
%{basisinstdir}/share/xslt/import/wordml
%{basisinstdir}/program/liblnth%{SOPOST}.so
%{_bindir}/unopkg
#icons and mime
%{_datadir}/icons/*/*/*/libreoffice*
%{_datadir}/mime-info/libreoffice.*
%{basisinstdir}/program/libxmlsecurity.so
%{_datadir}/mime/packages/libreoffice.xml
%{basisinstdir}/program/configmgr.uno.so
%{basisinstdir}/program/desktopbe1.uno.so
%{basisinstdir}/program/fsstorage.uno.so
%{basisinstdir}/program/gconfbe1.uno.so
%{basisinstdir}/program/i18npool.uno.so
%{basisinstdir}/program/libbasegfx%{SOPOST}.so
%{basisinstdir}/program/libcomphelpgcc3.so
%{basisinstdir}/program/libfileacc.so
%{basisinstdir}/program/libfwe%{SOPOST}.so
%{basisinstdir}/program/libfwi%{SOPOST}.so
%{basisinstdir}/program/libfwk%{SOPOST}.so
%{basisinstdir}/program/libfwl%{SOPOST}.so
%{basisinstdir}/program/libfwm%{SOPOST}.so
%{basisinstdir}/program/libi18nisolang*.so
%{basisinstdir}/program/libi18npaper*.so
%{basisinstdir}/program/libi18nutilgcc3.so
%{basisinstdir}/program/libpackage2.so
%{basisinstdir}/program/libsb%{SOPOST}.so
%{basisinstdir}/program/libsfx%{SOPOST}.so
%{basisinstdir}/program/libsot%{SOPOST}.so
%{basisinstdir}/program/libspl%{SOPOST}.so
%{basisinstdir}/program/libspl_unx%{SOPOST}.so
%{basisinstdir}/program/libsvl%{SOPOST}.so
%{basisinstdir}/program/libsvt%{SOPOST}.so
%{basisinstdir}/program/libtk%{SOPOST}.so
%{basisinstdir}/program/libtl%{SOPOST}.so
%{basisinstdir}/program/libucb1.so
%{basisinstdir}/program/libucpfile1.so
%{basisinstdir}/program/libutl%{SOPOST}.so
%{basisinstdir}/program/libvcl%{SOPOST}.so
%{basisinstdir}/program/libxcr%{SOPOST}.so
%{basisinstdir}/program/libxo%{SOPOST}.so
%{basisinstdir}/program/localebe1.uno.so
%{basisinstdir}/program/ucpgio1.uno.so
%{basisinstdir}/program/oovbaapi.rdb
#share unopkg
%dir %{baseinstdir}
%{baseinstdir}/basis-link
%dir %{baseinstdir}/share
%dir %{baseinstdir}/share/extensions
%{baseinstdir}/share/extensions/package.txt
%dir %{baseinstdir}/program
%{baseinstdir}/program/unopkg
%{baseinstdir}/program/unopkg.bin
%{baseinstdir}/program/bootstraprc
%{baseinstdir}/program/fundamentalrc
%{baseinstdir}/program/setuprc
%{baseinstdir}/program/services.rdb
%{baseinstdir}/program/versionrc
%doc %{baseinstdir}/CREDITS.odt
%doc %{baseinstdir}/LICENSE
%doc %{baseinstdir}/LICENSE.odt
%doc %{baseinstdir}/THIRDPARTYLICENSEREADME.html
%{baseinstdir}/program/about.*
%{baseinstdir}/program/intro.*
%{baseinstdir}/program/soffice
%{baseinstdir}/program/soffice.bin
%{baseinstdir}/program/sofficerc
%{baseinstdir}/program/spadmin
%{baseinstdir}/program/unoinfo
%{baseinstdir}/program/libnpsoplugin.so
%{baseinstdir}/program/oosplash.bin
%{baseinstdir}/program/shell/
%dir %{baseinstdir}/share/config
%{baseinstdir}/share/config/images_brand.zip
%dir %{baseinstdir}/share/registry
%{baseinstdir}/share/registry/brand.xcd
%{baseinstdir}/share/xdg/
%{baseinstdir}/program/redirectrc
%{ureinstdir}/lib/libjvm*.so*
%{_datadir}/applications/libreoffice-startcenter.desktop
#launchers
%{_bindir}/libreoffice
%{_bindir}/openoffice.org
%{_bindir}/soffice
%{_bindir}/ooffice
%{_bindir}/ooviewdoc

%files base
%dir %{basisinstdir}
%{basisinstdir}/help/en/sdatabase.*
%dir %{basisinstdir}/program
%dir %{basisinstdir}/program/classes
%{basisinstdir}/program/classes/hsqldb.jar
%{basisinstdir}/program/classes/sdbc_hsqldb.jar
%{basisinstdir}/program/libabp%{SOPOST}.so
%{basisinstdir}/program/libadabasui%{SOPOST}.so
%{basisinstdir}/program/libdbp%{SOPOST}.so
%{basisinstdir}/program/libhsqldb.so
%{basisinstdir}/program/librpt*%{SOPOST}.so
%dir %{basisinstdir}/program/resource
%{basisinstdir}/program/resource/abpen-US.res
%{basisinstdir}/program/resource/adabasuien-US.res
%{basisinstdir}/program/resource/cnren-US.res
%{basisinstdir}/program/resource/dbpen-US.res
%{basisinstdir}/program/resource/rpten-US.res
%{basisinstdir}/program/resource/rptuien-US.res
%{basisinstdir}/program/resource/sdbclen-US.res
%{basisinstdir}/program/resource/sdberren-US.res
%{basisinstdir}/share/registry/base.xcd
%dir %{baseinstdir}
%dir %{baseinstdir}/program
%{baseinstdir}/program/sbase
%{_datadir}/applications/libreoffice-base.desktop
%{_bindir}/oobase

%files report-builder
%docdir %{baseinstdir}/share/extensions/report-builder/help
%{baseinstdir}/share/extensions/report-builder

%files bsh
%{basisinstdir}/share/Scripts/beanshell
%{baseinstdir}/share/extensions/script-provider-for-beanshell

%files rhino
%{basisinstdir}/share/Scripts/javascript
%{baseinstdir}/share/extensions/script-provider-for-javascript

%files wiki-publisher
%docdir %{baseinstdir}/share/extensions/wiki-publisher/license
%{baseinstdir}/share/extensions/wiki-publisher

%files ogltrans
%dir %{baseinstdir}
%dir %{basisinstdir}/program
%{basisinstdir}/program/OGLTrans.uno.so
%dir %{basisinstdir}/share/config
%dir %{basisinstdir}/share/config/soffice.cfg
%dir %{basisinstdir}/share/config/soffice.cfg/simpress
%{basisinstdir}/share/config/soffice.cfg/simpress/transitions-ogl.xml
%{basisinstdir}/share/registry/ogltrans.xcd

%files presentation-minimizer
%docdir %{baseinstdir}/share/extensions/presentation-minimizer/help
%{baseinstdir}/share/extensions/presentation-minimizer

%files presenter-screen
%docdir %{baseinstdir}/share/extensions/presenter-screen/help
%{baseinstdir}/share/extensions/presenter-screen

%files pdfimport
%docdir %{baseinstdir}/share/extensions/pdfimport/help
%{baseinstdir}/share/extensions/pdfimport

%_font_pkg -n %{fontname} opens___.ttf
%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
%dir %{_fontdir}

%files calc
%dir %{basisinstdir}
%{basisinstdir}/help/en/scalc.*
%dir %{basisinstdir}/program
%{basisinstdir}/program/libanalysis%{SOPOST}.so
%{basisinstdir}/program/libbf_sc%{SOPOST}.so
%{basisinstdir}/program/libcalc%{SOPOST}.so
%{basisinstdir}/program/libdate%{SOPOST}.so
%{basisinstdir}/program/libfor%{SOPOST}.so
%{basisinstdir}/program/libforui%{SOPOST}.so
%{basisinstdir}/program/libsc%{SOPOST}.so
%{basisinstdir}/program/libscd%{SOPOST}.so
%{basisinstdir}/program/libscfilt%{SOPOST}.so
%{basisinstdir}/program/libscui%{SOPOST}.so
%{basisinstdir}/program/libsolver%{SOPOST}.so
%dir %{basisinstdir}/program/resource
%{basisinstdir}/program/resource/analysisen-US.res
%{basisinstdir}/program/resource/bf_scen-US.res
%{basisinstdir}/program/resource/dateen-US.res
%{basisinstdir}/program/resource/foren-US.res
%{basisinstdir}/program/resource/foruien-US.res
%{basisinstdir}/program/resource/scen-US.res
%{basisinstdir}/program/resource/solveren-US.res
%{basisinstdir}/program/vbaobj.uno.so
%{basisinstdir}/share/registry/calc.xcd
%{basisinstdir}/program/pagein-calc
%dir %{baseinstdir}
%dir %{baseinstdir}/program
%{baseinstdir}/program/scalc
%{_datadir}/applications/libreoffice-calc.desktop
%{_bindir}/oocalc

%files draw
%dir %{basisinstdir}
%{basisinstdir}/help/en/sdraw.*
%{basisinstdir}/share/registry/draw.xcd
%{basisinstdir}/program/pagein-draw
%dir %{baseinstdir}
%dir %{baseinstdir}/program
%{baseinstdir}/program/sdraw
%{_datadir}/applications/libreoffice-draw.desktop
%{_bindir}/oodraw

%files emailmerge
%dir %{basisinstdir}
%dir %{basisinstdir}/program
%{basisinstdir}/program/mailmerge.py*

%files writer
%dir %{basisinstdir}
%{basisinstdir}/help/en/swriter.*
%dir %{basisinstdir}/program
%{basisinstdir}/program/libbf_sw%{SOPOST}.so
%{basisinstdir}/program/libhwp.so
%{basisinstdir}/program/liblwpft%{SOPOST}.so
%{basisinstdir}/program/libmsword%{SOPOST}.so
%{basisinstdir}/program/libmsworks%{SOPOST}.so
%{basisinstdir}/program/libswd%{SOPOST}.so
%{basisinstdir}/program/libswui%{SOPOST}.so
%{basisinstdir}/program/libt602filter%{SOPOST}.so
%{basisinstdir}/program/libwpft%{SOPOST}.so
%{basisinstdir}/program/libwriterfilter%{SOPOST}.so
%{basisinstdir}/program/vbaswobj.uno.so
%dir %{basisinstdir}/program/resource
%{basisinstdir}/program/resource/bf_swen-US.res
%{basisinstdir}/program/resource/t602filteren-US.res
%{basisinstdir}/share/registry/writer.xcd
%{basisinstdir}/program/pagein-writer
%dir %{baseinstdir}
%dir %{baseinstdir}/program
%{baseinstdir}/program/swriter
%{_datadir}/applications/libreoffice-writer.desktop
%{_bindir}/oowriter

%files impress
%dir %{basisinstdir}
%{basisinstdir}/help/en/simpress.*
%dir %{basisinstdir}/program
%{basisinstdir}/program/libanimcore.so
%{basisinstdir}/program/libplaceware*.so
%dir %{basisinstdir}/share/config
%dir %{basisinstdir}/share/config/soffice.cfg
%dir %{basisinstdir}/share/config/soffice.cfg/simpress
%{basisinstdir}/share/config/soffice.cfg/simpress/effects.xml
%{basisinstdir}/share/config/soffice.cfg/simpress/transitions.xml
%{basisinstdir}/share/registry/impress.xcd
%{basisinstdir}/program/pagein-impress
%dir %{baseinstdir}
%dir %{baseinstdir}/program
%{baseinstdir}/program/simpress
%{_datadir}/applications/libreoffice-impress.desktop
%{_bindir}/ooimpress

%files math
%dir %{basisinstdir}
%{basisinstdir}/help/en/smath.*
%dir %{basisinstdir}/program
%{basisinstdir}/program/libbf_sm%{SOPOST}.so
%{basisinstdir}/program/libsm%{SOPOST}.so
%{basisinstdir}/program/libsmd%{SOPOST}.so
%dir %{basisinstdir}/program/resource
%{basisinstdir}/program/resource/bf_smen-US.res
%{basisinstdir}/program/resource/smen-US.res
%{basisinstdir}/share/registry/math.xcd
%dir %{baseinstdir}
%dir %{baseinstdir}/program
%{baseinstdir}/program/smath
%{_datadir}/applications/libreoffice-math.desktop
%{_bindir}/oomath

%files graphicfilter
%dir %{basisinstdir}
%dir %{basisinstdir}/program
%{basisinstdir}/program/libflash%{SOPOST}.so
%{basisinstdir}/program/libsvgfilter%{SOPOST}.so
%{basisinstdir}/share/registry/graphicfilter.xcd

%files xsltfilter
%dir %{basisinstdir}
%dir %{basisinstdir}/share/xslt
%{basisinstdir}/share/xslt/docbook
%dir %{basisinstdir}/share/xslt/export
%{basisinstdir}/share/xslt/export/uof
%{basisinstdir}/share/xslt/export/xhtml
%dir %{basisinstdir}/share/xslt/import
%{basisinstdir}/share/xslt/import/uof
%{basisinstdir}/share/registry/xsltfilter.xcd

%files javafilter
%dir %{basisinstdir}
%dir %{basisinstdir}/program
%dir %{basisinstdir}/program/classes
%{basisinstdir}/program/classes/aportisdoc.jar
%{basisinstdir}/program/classes/pexcel.jar
%{basisinstdir}/program/classes/pocketword.jar
%{_datadir}/applications/libreoffice-javafilter.desktop
%{basisinstdir}/share/registry/palm.xcd
%{basisinstdir}/share/registry/pocketexcel.xcd
%{basisinstdir}/share/registry/pocketword.xcd

%files testtools
%dir %{basisinstdir}
%dir %{basisinstdir}/program
%{basisinstdir}/program/libcommuni%{SOPOST}.so
%{basisinstdir}/program/libsimplecm%{SOPOST}.so
%{basisinstdir}/program/testtoolrc
%{basisinstdir}/program/testtool.bin
%dir %{basisinstdir}/program/resource
%{basisinstdir}/program/resource/stten-US.res

%files ure
%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
%dir %{baseinstdir}
%{ureinstdir}
%exclude %{ureinstdir}/lib/libjvm*.so*

%files sdk
%{sdkinstdir}/
%exclude %{sdkinstdir}/docs/
%exclude %{sdkinstdir}/examples/

%files sdk-doc
%docdir %{sdkinstdir}/docs
%{sdkinstdir}/docs/
%{sdkinstdir}/examples/

%files headless
%dir %{basisinstdir}
%dir %{basisinstdir}/program
%{basisinstdir}/program/libbasebmp%{SOPOST}.so
%{basisinstdir}/program/libvclplug_svp%{SOPOST}.so

%files pyuno
%dir %{basisinstdir}
%dir %{basisinstdir}/program
%{basisinstdir}/program/libpyuno.so
%{basisinstdir}/program/officehelper.py*
%{basisinstdir}/program/pythonloader.py*
%{basisinstdir}/program/pythonloader.uno.so
%{basisinstdir}/program/pythonloader.unorc
%{basisinstdir}/program/pyuno.so
%dir %{basisinstdir}/share/Scripts
%{basisinstdir}/share/Scripts/python
%{python_sitearch}/uno.py*
%{python_sitearch}/unohelper.py*
%{baseinstdir}/share/extensions/script-provider-for-python
%{basisinstdir}/share/registry/pyuno.xcd

%files kde
%dir %{basisinstdir}
%dir %{basisinstdir}/program
%{basisinstdir}/program/kde4be1.uno.so
%{basisinstdir}/program/fps_kde4.uno.so
%{basisinstdir}/program/libvclplug_kde4%{SOPOST}.so
%{basisinstdir}/program/kde-open-url


%files java-common
%dir %{basisinstdir}/program/classes
%{basisinstdir}/program/classes/agenda.jar
%{basisinstdir}/program/classes/commonwizards.jar
%{basisinstdir}/program/classes/fax.jar
%{basisinstdir}/program/classes/form.jar
%{basisinstdir}/program/classes/query.jar
%{basisinstdir}/program/classes/letter.jar
%{basisinstdir}/program/classes/LuceneHelpWrapper.jar
%{basisinstdir}/program/classes/officebean.jar
%{basisinstdir}/program/classes/report.jar
%{basisinstdir}/program/classes/saxon9.jar
%{basisinstdir}/program/classes/ScriptFramework.jar
%{basisinstdir}/program/classes/ScriptProviderForJava.jar
%{basisinstdir}/program/classes/table.jar
%{basisinstdir}/program/classes/unoil.jar
%{basisinstdir}/program/classes/web.jar
%{basisinstdir}/program/classes/XMergeBridge.jar
%{basisinstdir}/program/classes/xmerge.jar
%{basisinstdir}/program/classes/XSLTFilter.jar
%{basisinstdir}/program/classes/XSLTValidate.jar
%{basisinstdir}/program/libofficebean.so
%{basisinstdir}/share/Scripts/java



%changelog

* Tue Jun 19 2012 dmorgan <dmorgan> 3.4.6.2-0.1.mga1
+ Revision: 262009
- New version 3.4.6.2
- new upstream version 3.4.5
- drop integrated 001-add-Oracle-Java-1.7.0-recognition.patch
- drop integrated 001-fix-horizontal-scrollbars-with-KDE-oxygen-style-bnc-.patch
- drop integrated 001-fdo-43308-Set-the-logic-straight-for-center-across-s.patch
- drop integrated 001-Resolves-rhbz-754051-Libreoffice-calc-crashes-when-r.patch
- drop integrated 001-sw-fdo-39159-fdo-40482-temp-selection-print-doc.patch
- Resolves: rhbz#771108 English menu in writer despite installation of
  libreoffice-langpack-de
- Resolves: rhbz#661738 Very slow java database operations:
  Attach/DetachCurrentThread
- Resolves: fdo#44078 fix font alias name problems
- Resolves: fdo#44040 VIEWING: Crash when page preview after <f4>
- Resolves: fdo#39118 Fixed chart listener registration during ODS import
- Resolves: fdo#43725 crash on saving a file
- Resolves: fdo#45032 Calc export to HTML with graphics failed
- Resolves: rhbz#783556 crash in ScMatrix::GetDimensons()
- Resolves: fdo#44178 Align dictionary address with DICT_REPO_URL in
  instsetoo_native/util/openoffice.lst
- Resolves: fdo#43193 fix rotation of shapes in imported MS documents
- Resolves: fdo#44065
- Resolves: fdo#44385 restore special DATE handling code for SbxValue::Compute
- Resolves: fdo#43479 fix crash on DISTINCT
- Resolves: fdo#44208 country code 'IN' is not in use for these locales
- Resolves: fdo#45107
- Resolves: fdo#38542 "double" border line ODF import
- Resolves: fdo#38515 crasher in dialog destructor
- Resolves: fdo#40438 force calculating layout before Activate to
  avoid crashes and loops
- Resolves: rhbz#746174 also export list restart for non root list
- Resolves: fdo#42784 BorderLine with only InnerWidth set does not work
- New version 3.4.5.2
- Requires a langpack ( mga #3830)
- Obsolete non exiting anymore help packages
- New version 3.4.4.2
- Remove useless suggests
- Suggests hunspell-en ( mga #2942)
- Fix typo done in previous commit
- New version 3.3.4.1
- Remove old sources from sha1.lst
- New maintainance version 3.3.3.1
  See: https://bugs.mageia.org/show_bug.cgi?id=2010

* Sun May 29 2011 dmorgan <dmorgan> 3.3.2.2-14.mga1
+ Revision: 100652
- Move autocorr-en and hyphen-en as Suggests ( were Requires)

* Sun May 15 2011 mikala <mikala> 3.3.2.2-13.mga1
+ Revision: 99165
- Add missing \
- Add an obsolete & provide on libreoffice-help-lang to ease upgrade from mandriva

* Sun May 01 2011 blino <blino> 3.3.2.2-12.mga1
+ Revision: 94096
- fix langpack and help packages names for pt, pt_BR, zh_CN and zh_TW
  so that they can be expanded by clean-rpmsrate (do not use dash in
  lang suffix, #388)
- allow -U langpack option to be used even if -u is specified
  (so that both locales-br and locales-fr are required for breton)

  + dmorgan <dmorgan>
    - Provide templates for Breton ( mgabz #1029)

* Wed Apr 27 2011 tv <tv> 3.3.2.2-11.mga1
+ Revision: 91953
- fix file list: add sh help pack

  + blino <blino>
    - fix build by removing double declaration of breton lang and help packs (titypo)

  + dmorgan <dmorgan>
    - Remove he help
    - Remove wrong langs
    - Cy has no help
    - Fix typo
    - Add More translations
    - Remove fa from help packages
    - Fix typo
    - Fix typo
    - More fixes for the help packages
    - Help packages will be named libreoffice-help-*
    - Fix typo in file list
      Add debug ( if it fails )
    - Fix typo
    - Try to fix build of the help package
    - Bump release
    - fix macros
    - Try to create help packages
    - Remove unneeded %%post, they are already handled by filetriggers ( Anssi)

  + anssi <anssi>
    - add Provides on openoffice.org to libreoffice metapackage
    - add libreoffice meta-package requiring the main programs and have it
      obsolete openoffice.org meta-package

* Sat Apr 23 2011 dmorgan <dmorgan> 3.3.2.2-10.mga1
+ Revision: 89866
- backport for the locales fix
- Revert to LO 3.3.2.2
- make en langpack to require hyphen-en
- make en langpack to require autocorr-en
- make en langpack to require hunspell-en

* Fri Apr 22 2011 boklm <boklm> 3.3.99.1-1.mga1
+ Revision: 89767
- add locales-xx as require on libreoffice-langpack-xx

  + dmorgan <dmorgan>
    - Really fix file list ( Try #666 )
    - Sync configure with fedora
    - Fix rm
    - Fix file list ( try #6 )
    - Fix file list ( try #4 )
    - Fix file list ( try #3)
    - Fix typo
    - Apply patch16 cleanly
    - Sync with fedora ( fixes in build and translations)
    - Fix configure
    - Add hsqldb as buildrequire
    - Fix patch12
    - rediff patches
    - Update patch4
    - Fix BR
    - Update to 3.4 Beta 1
      Sync with fedora :
    - 3.4 beta1
    - drop openoffice.org-1.9.123.ooo53397.prelinkoptimize.desktop.patch
      in favour of ooosplash
    - drop openoffice.org-2.2.0.gccXXXXX.solenv.javaregistration.patch
      because components are passively registered now
    - drop integrated openoffice.org-3.1.0.ooo102061.sc.cellanchoring.patch
    - drop integrated turn-script-providers-into-extensions.patch
    - drop integrated 0001-tidy-this-up-and-don-t-bail-out-on-mislength-records.patch
    - drop integrated 0001-free-ctxt-after-taking-lastError-details.patch
    - drop integrated 0001-Removed-suspect-hack.-Cursor-on-post-it-now-scrolls-.patch
    - drop integrated libreoffice-gcc4.6.0.patch
    - drop integrated 0001-fexceptions-fexceptions.patch
    - drop integrated 0001-Related-rhbz-672872-cancel-gtk-file-dialog-on-deskto.patch
    - drop vbahelper.visibility.patch
    - drop integrated 0001-Resolves-fdo-33509-i62414-out-by-one-breaks-CTL-spel.patch
    - drop integrated 0001-Resolves-rhbz-670020-crash-in-slidesorting.patch
    - drop integrated 0001-Resolves-rhbz-676539-handle-missing-pWindows-from-xW.patch
    - drop integrated 0001-Resolves-fdo-33750-i94623-use-optimal-border-width-w.patch
    - drop integrated 0001-rhbz-649310-don-t-crash-deregistering-diff.-platform.patch
    - drop integrated 0001-Resolves-rhbz-674330-dereference-of-NULL-mpBase.patch
    - drop integrated 0001-rhbz-678284-Get-correct-current-position-when-shift-page-up-and-.patch
    - drop integrated 0001-Resolves-rhbz-681159-bandaid-for-crash.patch
    - drop integrated 0001-Resolves-rhbz-672818-bandaid-for-crash-in-SwTxtNode-.patch
    - drop integrated 0001-install-high-resolution-icons.patch
    - drop integrated 0001-Resolves-rhbz-682716-pa-IN-isn-t-handled-by-fontconf.patch
    - drop integrated 0001-Related-rhbz-684477-make-sure-this-is-thread-safe.patch
    - drop integrated 0001-Resolves-rhbz-682621-better-resizing-of-overtall-gly.patch
    - drop integrated 0001-Resolves-rhbz-684620-crash-with-NULL-pTableBox.patch
    - drop integrated libreoffice-fdo33947.sd.print.crash.patch
    - drop integrated 0001-add-cairo_ft_font_face_create_for_pattern-wrapper.patch
    - drop integrated 0001-Related-rhbz-680460-reorganize-this-to-make-it-inher.patch
    - drop integrated 0001-Related-rhbz-680460-don-t-bother-with-an-interim-Fon.patch
    - drop integrated 0001-Resolves-rhbz-680460-honour-lcdfilter-subpixeling-et.patch
    - drop integrated 0001-Cut-Gordian-Knot-of-who-owns-the-font-options.patch
    - drop integrated 0001-beware-of-invalidated-iterator.patch
    - drop integrated rhbz680766.fix-mdds-crash.patch
    - drop integrated 0001-Resolves-rhbz-684580-X-and-strike-through-escapes-ra.patch
    - drop integrated 0001-set-mime-types-on-flat-xml-filters.patch
    - drop integrated 0001-add-flat-xml-types-to-.desktop-files-etc.patch
    - drop integrated libreoffice-fdo31271.icu.patch

  + misc <misc>
    - fix file list

* Sat Apr 16 2011 dmorgan <dmorgan> 3.3.2.2-9.mga1
+ Revision: 86118
- Fix ure to not require java anymore
- Fix require exception
- Fix conflicts ( mikala)
- Move some obsoletes from core to java-commont

* Fri Apr 15 2011 dmorgan <dmorgan> 3.3.2.2-8.mga1
+ Revision: 85660
- Create a java-common package

* Wed Apr 13 2011 dmorgan <dmorgan> 3.3.2.2-7.mga1
+ Revision: 84787
- Move %%{ureinstdir}/lib/libjvm*.so* in core
- Only suggests %%name-ure

* Wed Apr 13 2011 dmorgan <dmorgan> 3.3.2.2-6.mga1
+ Revision: 84402
- Move libofficebean.so to ure package
  Add conflict to ease update

* Mon Apr 11 2011 dmorgan <dmorgan> 3.3.2.2-5.mga1
+ Revision: 83487
- Fix Breton language pack as there is no Hyphen-br
- Fix groups

* Sun Apr 10 2011 dmorgan <dmorgan> 3.3.2.2-4.mga1
+ Revision: 82733
- Only fix base desktop file for now
- Disable patch44 ( as we removed patches 45 and 46 )
- Do not use patch 45/46, i will investigate later
- Do not requires devel(libstlport_gcc)
- Make jre optionnal
- backport desktop files fixes from openoffice package
- Add fedora patches (Resolves: rhbz#680766 crash in mdds)

  + tv <tv>
    - there's no hyphen for br

* Thu Apr 07 2011 tv <tv> 3.3.2.2-3.mga1
+ Revision: 81640
- enable br langpack

* Sun Mar 27 2011 dmorgan <dmorgan> 3.3.2.2-2.mga1
+ Revision: 78202
- Rebuild against new poppler

* Fri Mar 25 2011 dmorgan <dmorgan> 3.3.2.2-1.mga1
+ Revision: 77522
- Do not apply42 as it need patch41
- Disable patch41, which crash when fast scrolling
- Revert previous commit now that redland is fixed
- Try to fix buildrequires
- Change openoffice.org-voikko require to libreoffice-voikko
- Update to version 3.3.2.2
- Fix group

* Fri Mar 18 2011 dmorgan <dmorgan> 3.3.1.2-7.mga1
+ Revision: 74268
- Obsolete openoffice.org-help-en_US and openoffice.org-help-en_GB

* Fri Mar 18 2011 dmorgan <dmorgan> 3.3.1.2-6.mga1
+ Revision: 73904
- More obsolete to easy upgrade
- Add fedora patches:
  	- Resolves: rhbz#681159 crash in writer
  	- Resolves: rhbz#672818 crash in writer
  	- Resolves: fdo#33701 ensure node outlives path
  	- Resolves: rhbz#681738 crash on writing config post-main
  	- install 128x128 px icons
  	- Resolves: rhbz#682716 pa-IN isn't handled well by fontconfig
  	- Resolves: rhbz#682621 better resizing of overtall glyphsubs
  	- Related: rhbz#684477 make sure this is thread safe
  	- Resolves: rhbz#684620 crash with NULL pTableBox
  	- Resolves: fdo#33947 sd print crash
  	- Resolves: rhbz#680460 honour lcdfilter and subpixeling

* Wed Mar 16 2011 dmorgan <dmorgan> 3.3.1.2-5.mga1
+ Revision: 72319
- More upgrade fixes

* Wed Mar 16 2011 dmorgan <dmorgan> 3.3.1.2-4.mga1
+ Revision: 72280
- Try to fix upgrade
- Try to fix upgrade
- Fc patch: Resolves: rhbz#681159 crash in writer
- Reapply patches, previous error was because of iurt timeout

* Sat Mar 12 2011 dmorgan <dmorgan> 3.3.1.2-3.mga1
+ Revision: 68347
- Disable patches 7 8 and 27 as i have a build error i did not had before
- Fix patches
- Fix patch6
- Re enable languages
- Give a try without af localization
- Give a try to langpack

* Mon Feb 21 2011 dmorgan <dmorgan> 3.3.1.2-1.mga1
+ Revision: 55867
- Do not apply patch27, i will rediff it later
- Update to 3.3.1.2
- Add fedora patches :
  	- Resolves: rhbz#674330 dereference of NULL mpBase
  	- Resolves: rhbz#678284 Calc crashes during cell select with keys

* Fri Feb 18 2011 dmorgan <dmorgan> 3.3.1.1-1.mga1
+ Revision: 53946
- BuildRequires fontpackages-devel not fontpackages
- Add fontpackages as BuildRequire
- Do not build languages for now
- Remove debug
- Build with Werror_cflags %%nil
- Comment patch7 and 8, will be rediff later
- Rediff patch 0001-Related-rhbz-672872-cancel-gtk-file-dialog-on-deskto.patch
  Use default fuzz 2
- Add fedora patches
- New version 3.3.1 rc
- Fix dejavu requires
- Add patch to fix compilation
- FIx BuildRequires
- FIx BuildRequires
- DO not apply patches 20 21 for the moment
- Comment libtextcat-devel for now
- Add missing patch
- Fix groups
- Remove commented buildrequires
  Comment missing requires
- Rediff and Enable patch4
- Use %%qt4dir
- Fix kde and qt path
- add libreoffice-fdo32561.comphelper.patch ( from fc )
- Adda a fedora patch to build against gcc 4.6
- Backport commits from fedora
- Enable back the "touch" part
- Enable and rediff patch 9
- Rediff and enable patch 10
- Enable patches 11 -> 13
- Enable patch 14
- Enable patches 15 -> 18
- Fix BuildRequires for mageia
  Comment patches that need to be rediff
- Rediff patches 5-6
- imported package libreoffice


* Thu Jan 20 2011 Caolán McNamara <caolanm@redhat.com> 3.3.0.4-1
- next release candidate
- drop integrated 0001-fix-presenter-screens-description.xml-build.patch

* Tue Jan 18 2011 Caolán McNamara <caolanm@redhat.com> 3.3.0.3-2
- backport fix to get presenter screen working
- make handling busted extensions more robust

* Wed Jan 12 2011 Caolán McNamara <caolanm@redhat.com> 3.3.0.3-1
- latest version
- drop integrated 0001-Resoves-rhbz-663857-font-color-missing-C-FAQ-10.3-do.patch
- drop integrated 0001-Avoid-double-paste-when-pasting-text-into-cell-comme.patch
- drop integrated 0001-Resolves-rhbz-660342-Undo-Redo-crash-with-postits.patch
- drop integrated 0001-Resolves-rhbz-666088-clean-up-search-cache-singleton.patch

* Thu Jan 06 2011 Caolán McNamara <caolanm@redhat.com> 3.3.0.2-5
- Resolves: rhbz#666088 don't crash on clean up of search cache

* Wed Jan 05 2011 Lukas Tinkl <ltinkl@redhat.com> 3.3.0.2-4
- create a KDE integration subpackage

* Mon Jan 03 2011 David Tardon <dtardon@redhat.com> 3.3.0.2-3
- rebuild with new poppler

* Wed Dec 22 2010 Caolán McNamara <caolanm@redhat.com> 3.3.0.2-2
- Resolves: rhbz#663724 fdo32572-sc-dont-double-paste.patch
- Resolves: rhbz#660342 Undo/Redo crash with postits

* Tue Dec 21 2010 Caolán McNamara <caolanm@redhat.com> 3.3.0.2-1
- latest version

* Sat Dec 18 2010 Caolán McNamara <caolanm@redhat.com> 3.3.0.1-4
- Resolves: rhbz#663857 font color missing in transitions

* Wed Dec 15 2010 Rex Dieter <rdieter@fedoraproject.org> - 3.3.0.1-3
- rebuild (poppler)

* Wed Dec 15 2010 Caolán McNamara <caolanm@redhat.com> 3.3.0.1-2
- Fix up some doc imports

* Sun Dec 05 2010 Caolán McNamara <caolanm@redhat.com> 3.3.0.1-1
- release candidate 1
- drop integrated qstart.dont-forceenabled-on-post-reg-restart.patch
- drop integrated exit.quickstarter.when.deleted.patch
- drop integrated 0001-destroydesktop.in.timeout.patch
- drop integrated openoffice.org-3.3.0.rhbz657541.join-paragraphs.patch

* Sat Nov 27 2010 Caolán McNamara <caolanm@redhat.com> 3.2.99.3-2
- Resolves: rhbz#610103 exit quickstarter when libs deleted
- Resolves: rhbz#652695 release desktop in timeout
- Resolves: rhbz#657541 don't crash during processing of auto. styles
  when joining paragraphs (dtardon)

* Thu Nov 18 2010 Caolán McNamara <caolanm@redhat.com 3.2.99.3-1
- next Libreoffice milestone
- drop integrated openoffice.org-2.0.1.rhXXXXXX.extensions.defaulttoevo2.patch
- drop integrated openoffice.org-2.2.1.ooo7065.sw.titlepagedialog.patch
- drop integrated openoffice.org-3.2.0.ooo108846.sfx2.qstartfixes.patch
- drop integrated openoffice.org-3.3.0.ooo107490.cppu.lifecycle.patch
- drop integrated libreoffice-buildfix.patch
- drop integrated libreoffice-xdg632229.gnomeshell.patch
- drop integrated 0001-strcpy-cannot-be-used-with-overlapping-src-and-dest.patch
- drop integrated 0001-abort-doesn-t-gain-us-anything-here.patch
- drop integrated 0001-latest-libX11-changed-header-guards.patch

* Sat Nov 06 2010 David Tardon <dtardon@redhat.com 3.2.99.2-6
- turn script providers into extensions

* Wed Nov 03 2010 Caolán McNamara <caolanm@redhat.com> 3.2.99.2-5
- Resolves: rhbz#649210 add Sinhalese langpack

* Sun Oct 30 2010 Caolán McNamara <caolanm@redhat.com> 3.2.99.2-4
- langpack macro hard-coded version number

* Fri Oct 22 2010 Caolán McNamara <caolanm@redhat.com> 3.2.99.2-3
- Resolves: xdg632229 gnomeshell app tracking

* Tue Oct 12 2010 David Tardon <dtardon@redhat.com> 3.2.99.2-2
- use macros to define auto-correction and language pack subpackages

* Mon Oct 11 2010 Caolán McNamara <caolanm@redhat.com> 3.2.99.2-1
- next LibreOffice milestone
- drop integrated openoffice.org-2.3.0.ooo76649.httpencoding.patch
- drop integrated workspace.dtardon03.patch
- drop integrated openoffice.org-3.1.0.ooo61927.sw.ww6.unicodefontencoding.patch
- drop integrated workspace.impress195.patch
- drop integrated workspace.srb1.patch
- drop integrated openoffice.org-3.2.0.ooo106502.svx.fixspelltimer.patch
- drop integrated openoffice.org-3.3.0.ooo108246.svx.hide-sql-group-when-inactive.patch
- drop integrated openoffice.org-3.2.0.ooo95369.sw.sortedobjs.patch
- drop integrated openoffice.org-3.2.0.ooo110142.svx.safercolornames.patch
- drop integrated openoffice.org-3.3.0.ooo111758.sd.xerror.patch
- drop integrated openoffice.org-3.2.0.ooo111741.extras.malformed-xml-file.patch
- drop integrated openoffice.org-3.3.0.ooo112059.sw.avoid-null-ptr-deref.patch
- drop integrated openoffice.org-3.3.0.ooo100686.wizards.types.not.mediatypes.patch
- drop integrated workspace.vcl113.patch
- drop integrated openoffice.org-3.3.0.ooo112384.sw.export.doc.styledoesntexist.patch
- drop integrated workspace.cmcfixes77.patch
- drop integrated workspace.vcl114.patch
- drop integrated openoffice.org-3.3.0.ooo106591.sal.tradcopy.patch
- drop integrated workspace.vcl115.patch
- drop integrated workspace.cmcfixes78.patch
- drop integrated openoffice.org-3.3.0.ooo114012.sd.bada11ychain.patch
- drop integrated workspace.cmcfixes79.patch
- drop integrated openoffice.org-3.3.0.ooo114703.vcl.betterlocalize.font.patch
- drop integrated openoffice.org-3.3.0.rh638185.editeng.cjkctlhtmlsizes.patch
- drop integrated openoffice.org-3.3.0.rh637738.libgcrypt.addmutex.patch
- drop integrated openoffice.org-3.2.0.rh632236.writerfilter.cleanup-cell-props.patch
- drop workspace.gtk3.patch

* Wed Oct 06 2010 Caolán McNamara <caolanm@redhat.com> 3.2.99.1-2
- Related: rhbz#639945 pull in review changes
  + redland build-fix
  + replace awk script
  + validate .destop files

* Wed Sep 29 2010 Caolán McNamara <caolanm@redhat.com> 3.2.99.1-1
- initial import of the leviathan