libreoffice/libreoffice.spec

1306 lines
45 KiB
RPMSpec
Raw Normal View History

#
# spec file for package libreoffice
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# List of supported langs, populated bellow in the lang macros
%global langpack_langs %{nil}
# debug_build: 0 = no ( do not use ccache
# 1 = yes
%define debug_build 0
# LO paths
%define lo_prefix %{_libdir}
%define lo_home libreoffice
# extensions
%define ct2n_version 1.3.2
%define gdocs_version 3.0.1
%define numbertext_version 0.9.5
# Urls
%define external_url http://dev-www.libreoffice.org/src/
Name: libreoffice
Version: 4.2.0.1
Release: 0
Summary: A Free Office Suite (Framework)
Accepting request 114864 from LibreOffice:Unstable this is needed to fix build in Factory - buildfix-icu-4.9.diff: fix build with icu-4.9; needed for openSUSE-12.2 - clean up configure switches: * move switches from SUSE*.conf to spec files * use --with-system-headers and --with-system-libs to prefer system stuff over internal copies * use --without-system-<library> only for stuff that is not packaged or not patched in the SUSE distribution, for example libvisio, redland, mythes * bin not longer existing options - remove unused python-devel from BuildRequires - build zip-3.0 only for openSUSE < 11.4 - add patches for the extra zip-3.0 from the last zip package - make sure that parallel build is used for dmake and GNU make build parts - buildfix-icu-4.9.diff: fix build with icu-4.9; needed for openSUSE-12.2 - clean up configure switches: * move switches from SUSE*.conf to spec files * use --with-system-headers and --with-system-libs to prefer system stuff over internal copies * use --without-system-<library> only for stuff that is not packaged or not patched in the SUSE distribution, for example libvisio, redland, mythes * bin not longer existing options - build zip-3.0 only for openSUSE < 11.4 - add patches for the extra zip-3.0 from the last zip package - make sure that parallel build is used for dmake and GNU make build parts OBS-URL: https://build.opensuse.org/request/show/114864 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libreoffice?expand=0&rev=31
2012-04-26 17:35:13 +02:00
License: Apache-2.0 and Artistic-1.0 and BSD-3-Clause and BSD-4-Clause and GPL-2.0+ and LPPL-1.3c and LGPL-2.1+ and LGPL-3.0 and MPL-1.1 and MIT and SUSE-Public-Domain and W3C
Group: Productivity/Office/Suite
Url: http://www.documentfoundation.org/
Source0: libreoffice-%{version}.tar.xz
Source1: libreoffice-help-%{version}.tar.xz
Source2: libreoffice-translations-%{version}.tar.xz
# 256x256 desktop icons (bnc#722644)
Source20: libreoffice-desktop-icons-256x256.tar.bz2
# rpmlint complains about devel files in non-devel package
# but we would like to keep the sdk package name
# We would like to keep the -bootstrap package name
# So we need to disable these rpmlint checks
Source200: %{name}-rpmlintrc
# Prebuilt sofficerc for the noarch upstream branding package
Source201: sofficerc-upstream
# This background is used by another Novell product, added 2006-02-08
Source202: Draft.jpg
# helper scripts
# create compat symlinks from %{_datadir} to %{_prefix}/lib(64); used by noarch packages
Source300: link-to-ooo-home
# extensions
Source400: README-scsolver.txt
# prebuilt extensions
Source401: %{external_url}/27211596cf0ad97cab7321239406fde0-gdocs_%{gdocs_version}_modified.oxt
Source402: %{external_url}/b7cae45ad2c23551fd6ccb8ae2c1f59e-numbertext_%{numbertext_version}.oxt
# used extensions sources
Source450: %{external_url}/451ccf439a36a568653b024534669971-ConvertTextToNumber-%{ct2n_version}.oxt
Source452: %{external_url}/90401bca927835b6fbae4a707ed187c8-nlpsolver-0.9.tar.bz2
# Internal bundled stuff (jfreereport), should be unbundled
Source1000: %{external_url}/39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip
Source1001: %{external_url}/ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip
Source1002: %{external_url}/d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip
Source1003: %{external_url}/ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
Source1004: %{external_url}/db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip
Source1005: %{external_url}/97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip
Source1006: %{external_url}/3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip
Source1007: %{external_url}/8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip
Source1008: %{external_url}/3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip
Source1009: %{external_url}/f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip
Source1010: %{external_url}/eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip
# Internal bundled stuff we can't remove
# XMLSec is patched over and over in here
Source2000: %{external_url}/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
# To build this we would pull cygwin; not worth it
Source2001: http://dev-www.libreoffice.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll
# hsqldb simply does not work with new system version, but luckily we migrate to firebird
Source2002: %{external_url}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip
# Heavily patched and not possible to use system one
Source2003: %{external_url}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
Source2004: %{external_url}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
# Needed for wiki-published and always taken as bundled
Source2005: %{external_url}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
# unused extensions sources
# FIXME: this is just because of license; we do not build gdocs from sources now
# gdocs sources
Source500: gdocs_3.0.0.tar.bz2
Source501: gdocs_3.0.0.diff
# PATCH-FIX-UPSTREAM: search usr and lib together for the icons, after last update it only
# takes one path, so our patch won't work at all
Patch2: split-icons-search-usr-share.diff
# search help icons in %{_prefix}/share
# FIXME: make it configurable in integrate into git
Patch3: officecfg-help-in-usr-share.diff
# change user config dir name from ~/.libreoffice/3 to ~/.libreoffice/3-suse
# to avoid BerkleyDB incompatibility with the plain build
# FIXME: make it configurable and push upstream
Patch5: scp2-user-config-suse.diff
# pack new desktop files
Patch6: pack-desktop-files-for-optional-filters.diff
# As the patch2 and usr share search is broken we can't do this anymore
# search <lo-home>/share/template/common for language independent templates
Accepting request 114864 from LibreOffice:Unstable this is needed to fix build in Factory - buildfix-icu-4.9.diff: fix build with icu-4.9; needed for openSUSE-12.2 - clean up configure switches: * move switches from SUSE*.conf to spec files * use --with-system-headers and --with-system-libs to prefer system stuff over internal copies * use --without-system-<library> only for stuff that is not packaged or not patched in the SUSE distribution, for example libvisio, redland, mythes * bin not longer existing options - remove unused python-devel from BuildRequires - build zip-3.0 only for openSUSE < 11.4 - add patches for the extra zip-3.0 from the last zip package - make sure that parallel build is used for dmake and GNU make build parts - buildfix-icu-4.9.diff: fix build with icu-4.9; needed for openSUSE-12.2 - clean up configure switches: * move switches from SUSE*.conf to spec files * use --with-system-headers and --with-system-libs to prefer system stuff over internal copies * use --without-system-<library> only for stuff that is not packaged or not patched in the SUSE distribution, for example libvisio, redland, mythes * bin not longer existing options - build zip-3.0 only for openSUSE < 11.4 - add patches for the extra zip-3.0 from the last zip package - make sure that parallel build is used for dmake and GNU make build parts OBS-URL: https://build.opensuse.org/request/show/114864 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libreoffice?expand=0&rev=31
2012-04-26 17:35:13 +02:00
# FIXME: make it configurable to push upstream
Patch9: office-cfg-linux-common-template-dir.diff
# correctly bootstrap python stuff with system python (deb#501028, i#90701)
Patch10: system-pyuno.diff
# do not use the broken help; unopkg complained about it when registering extensions
# FIXME: the right fix is to compile the help and produce the .db_, .ht_, and other files
Patch11: nlpsolver-no-broken-help.diff
Patch12: mediawiki-no-broken-help.diff
# LO newer worked well with it
Patch13: jvmfwk-disable-gcj.diff
# lost RPM optflags when compiling bridges
Patch15: bridges-missing-cxxflags.diff
# Fix running wizzards in py2 as the utf is not htere
Patch16: wizards-create-temlates-with-python-2.6.diff
# try to save space by using hardlinks
Patch990: install-with-hardlinks.diff
BuildRequires: ImageMagick
BuildRequires: ant
BuildRequires: ant-apache-regexp
BuildRequires: ant-nodeps
BuildRequires: autoconf
BuildRequires: bison
BuildRequires: bluez-devel
BuildRequires: boost-devel
BuildRequires: bsh
BuildRequires: clucene-core-devel
BuildRequires: commons-codec
BuildRequires: commons-httpclient
BuildRequires: commons-lang
BuildRequires: commons-logging
BuildRequires: cups-devel
BuildRequires: curl-devel
BuildRequires: db-devel
BuildRequires: dbus-1-glib-devel
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: flac-devel
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: glu-devel
BuildRequires: gnome-vfs2-devel
BuildRequires: gperf
BuildRequires: graphite2-devel
BuildRequires: gstreamer-plugins-base-devel
BuildRequires: gtk2-devel
BuildRequires: gtk3-devel
BuildRequires: harfbuzz-devel
BuildRequires: hunspell-devel
BuildRequires: hyphen-devel
BuildRequires: icu
BuildRequires: java-devel >= 1.6
BuildRequires: junit4
BuildRequires: krb5
BuildRequires: krb5-devel
BuildRequires: libcdr-devel
BuildRequires: libcmis-devel
BuildRequires: libcppunit-devel
BuildRequires: libe-book-devel
BuildRequires: libetonyek-devel
BuildRequires: libexif
BuildRequires: libexpat-devel
BuildRequires: libexttextcat-devel
BuildRequires: libfbembed-devel
BuildRequires: libfreehand-devel
BuildRequires: libicu-devel
BuildRequires: libkde4-devel
BuildRequires: liblangtag-devel
BuildRequires: liblcms2-devel
BuildRequires: libmspub-devel
BuildRequires: libmwaw-devel
BuildRequires: libmysqlclient-devel
BuildRequires: libmysqlcppconn-devel >= 1.0.6
BuildRequires: libodfgen-devel
BuildRequires: liborcus-devel >= 0.5.0
BuildRequires: libpoppler-devel
BuildRequires: libredland-devel
BuildRequires: librsvg-devel
BuildRequires: libtool
BuildRequires: libvisio-devel
BuildRequires: libwpd-devel
BuildRequires: libwpg-devel
BuildRequires: libwps-devel
BuildRequires: libxml2-devel
BuildRequires: lpsolve-devel
BuildRequires: make
BuildRequires: mdds-devel >= 0.8.0
BuildRequires: mozilla-nspr-devel
BuildRequires: mozilla-nss-devel
BuildRequires: mythes-devel
BuildRequires: neon-devel
BuildRequires: npapi-sdk
BuildRequires: openldap2-devel
BuildRequires: pam-devel
BuildRequires: patch
BuildRequires: perl-Archive-Zip
BuildRequires: perl-Compress-Zlib
BuildRequires: postgresql-devel
BuildRequires: procps
BuildRequires: python-devel
BuildRequires: python-lxml
BuildRequires: python-xml
BuildRequires: recode
BuildRequires: rhino
BuildRequires: sane-backends-devel
BuildRequires: telepathy-glib-devel
BuildRequires: ucpp
BuildRequires: unixODBC-devel
BuildRequires: unzip
BuildRequires: vigra-devel
BuildRequires: vlc-devel
BuildRequires: xml-commons-apis
BuildRequires: xorg-x11
BuildRequires: xorg-x11-fonts
BuildRequires: xz
BuildRequires: zip
Requires: libreoffice-branding >= 4.0
Requires: libreoffice-icon-themes = %{version}
Requires(post): coreutils
Requires(post): grep
Requires(post): gtk2
Requires(post): zip
Requires(postun): coreutils
Requires(postun): gtk2
Requires(pre): findutils
# Remove after 13.1 is out of support scope
Provides: %{name}-draw-extensions = %{version}
Obsoletes: %{name}-draw-extensions < %{version}
# Remove after 13.1 is out of support scope
Provides: %{name}-kde = %{version}
Obsoletes: %{name}-kde < %{version}
# Remove after 13.1 is out of support scope
Provides: %{name}-l10n-prebuild = %{version}
Obsoletes: %{name}-l10n-prebuild < %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %{arm} %{ix86} x86_64 ppc ppc64
# we need a JRE for oobase and the other stuff
%ifarch %{ix86}
Recommends: jre-32 >= 1.6
%endif
%ifarch x86_64
Recommends: jre-64 >= 1.6
%endif
%ifarch ppc
Recommends: jre-32 >= 1.6
%endif
%description
LibreOffice is a comprehensive office package featuring a word
processor, a spreadsheet, a presentation program, and much more. This
package provides only the basic framework. You have to install the
additional modules to get the required functionality, see packages:
- libreoffice-base
- libreoffice-calc
- libreoffice-draw
- libreoffice-impress
- libreoffice-math
- libreoffice-writer
Some optional features are provided by extra packages, for example:
- libreoffice-mailmerge
- libreoffice-filters
- libreoffice-kde
- libreoffice-gnome
Non-English localizations are provided by extra packges as well, for
example:
- libreoffice-l10n-de
- libreoffice-l10n-fr
- libreoffice-l10n-it
%package icon-theme-crystal
Summary: Crystal LibreOffice Icon Theme (KDE3 default)
License: LGPL-2.1
Group: Productivity/Office/Suite
Supplements: packageand(libreoffice:kdebase3-session)
Provides: libreoffice-icon-themes = %{version}
Obsoletes: libreoffice-icon-themes < %{version}
BuildArch: noarch
%description icon-theme-crystal
This package provides Crystal LibreOffice icon theme. It is used in KDE3 by default.
%package icon-theme-galaxy
Summary: Galaxy LibreOffice Icon Theme (OOo-3.x default)
License: LGPL-3.0
Group: Productivity/Office/Suite
Supplements: libreoffice
Provides: libreoffice-icon-themes = %{version}
Obsoletes: libreoffice-icon-themes < %{version}
BuildArch: noarch
%description icon-theme-galaxy
This package provides Galaxy LibreOffice icon theme. It is used in the original OOo-3.x by default.
%package icon-theme-hicontrast
Summary: Hicontrast LibreOffice Icon Theme
License: LGPL-3.0
Group: Productivity/Office/Suite
Supplements: libreoffice
Provides: libreoffice-icon-themes = %{version}
Obsoletes: libreoffice-icon-themes < %{version}
BuildArch: noarch
%description icon-theme-hicontrast
This package provides Hicontrast LibreOffice icon theme.
%package icon-theme-oxygen
Summary: Oxygen LibreOffice Icon Theme (KDE4 default)
License: LGPL-3.0 or CC-BY-SA-3.0
Group: Productivity/Office/Suite
Supplements: packageand(libreoffice:kdebase4-workspace)
Provides: libreoffice-icon-themes = %{version}
Obsoletes: libreoffice-icon-themes < %{version}
BuildArch: noarch
%description icon-theme-oxygen
This package provides Oxygen LibreOffice icon theme. It is used in KDE4 by default.
%package icon-theme-tango
Summary: Tango LibreOffice Icon Theme (GNOME default)
License: LGPL-3.0
Group: Productivity/Office/Suite
Supplements: packageand(libreoffice:gnome-session)
Provides: libreoffice-icon-themes = %{version}
Obsoletes: libreoffice-icon-themes < %{version}
BuildArch: noarch
%description icon-theme-tango
This package provides Tango LibreOffice icon theme. It is used in GNOME by default
and obsoleted the old Industrial theme.
%package base
Summary: LibreOffice Base
License: LGPL-3.0
Group: Productivity/Office/Suite
Requires: %{name} = %{version}
Supplements: %{name}
%description base
This module allows you to manage databases, create queries and reports
to track and manage your information by using LibreOffice office
suite.
%package calc
Summary: LibreOffice Calc
License: LGPL-3.0
Group: Productivity/Office/Suite
Requires: %{name} = %{version}
Supplements: %{name}
%description calc
This module allows you to perform calculation, analyze information and
manage lists in spreadsheets by using LibreOffice office suite.
%package draw
Summary: LibreOffice Draw
License: LGPL-3.0
Group: Productivity/Office/Suite
Requires: %{name} = %{version}
Supplements: %{name}
%description draw
This module allows you to create and edit drawings, flow charts, and
logos by using LibreOffice office suite.
%package math
Summary: LibreOffice Math
License: LGPL-3.0
Group: Productivity/Office/Suite
Requires: %{name} = %{version}
Supplements: %{name}
%description math
This module allows you to create and edit scientific formulas and
equations by using LibreOffice office suite.
%package impress
Summary: LibreOffice Impress
License: LGPL-3.0
Group: Productivity/Office/Suite
Requires: %{name} = %{version}
Supplements: %{name}
%description impress
This module allows you to create and edit presentations for slideshows,
meeting and Web pages by using LibreOffice office suite.
%package writer
Summary: LibreOffice Writer and Web
License: LGPL-3.0
Group: Productivity/Office/Suite
Requires: %{name} = %{version}
Supplements: %{name}
%description writer
This module allows you to create and edit text and graphics in letters,
reports, documents and Web pages by using LibreOffice office suite.
%package base-drivers-postgresql
Summary: PostgreSQL Database Driver for LibreOffice
License: LGPL-2.1+
Group: Productivity/Office/Suite
Requires: postgresql
%description base-drivers-postgresql
This package allows to access PostgreSQL databases from LibreOffice
Base.
%package filters-optional
Summary: Additional Import and Export Filters for LibreOffice
License: LGPL-3.0
Group: Productivity/Office/Suite
Requires: %{name}-calc = %{version}
Requires: %{name}-draw = %{version}
Requires: %{name}-impress = %{version}
Requires: %{name}-math = %{version}
Requires: %{name}-writer = %{version}
Supplements: %{name}
%description filters-optional
This package includes some additional import and export filters for
LibreOffice:
- AportisDoc (Palm)
- Pocket Excel
- Pocket Word
- DocBook
- XHTML
%package mailmerge
Summary: Mail Merge Functionality for LibreOffice
License: LGPL-3.0
Group: Productivity/Office/Suite
Requires: %{name}-pyuno = %{version}
Supplements: %{name}
%description mailmerge
This module allows you to create form letters or send E-mail messages
to many recipients using LibreOffice office suite.
%package pyuno
Summary: Python UNO Bridge for LibreOffice
License: LGPL-3.0
Group: Productivity/Office/Suite
Requires: %{name} = %{version}
Supplements: %{name}
%description pyuno
The Python-UNO bridge allows to use the standard LibreOffice API
from the well known Python scripting language. It can be used to
develop UNO components in python, thus python UNO components may be run
within the LibreOffice process and can be called from Java, C++ or
the built in StarBasic scripting language. You can create and invoke
scripts with the office scripting framework (OOo 2.0 and later) with
it. For example, it is used for the mail merge functionality.
You can find the more information at
http://udk.openoffice.org/python/python-bridge.html
%package gnome
Summary: GNOME Extensions for LibreOffice
License: LGPL-3.0
Group: Productivity/Office/Suite
Requires: %{name} = %{version}
%description gnome
This package contains some GNOME extensions for LibreOffice.
%package kde4
Summary: KDE4 Extensions for LibreOffice
License: LGPL-3.0
Group: Productivity/Office/Suite
Requires: %{name} = %{version}
%description kde4
This package contains some KDE4 extensions for LibreOffice.
%package sdk
Summary: LibreOffice SDK
License: LGPL-3.0
Group: Documentation/HTML
Requires: %{name} = %{version}
Requires: gcc-c++
Requires: make
Requires: zip
Recommends: java-devel
%description sdk
This package contains the files needed to build plugins/add-ons for
LibreOffice. It includes header files, IDL files, needed build
tools, etc.
The documentation is in the package libreoffice-sdk-doc
%package sdk-doc
Summary: LibreOffice SDK Documentation
License: LGPL-3.0
Group: Development/Libraries/Other
Suggests: %{name}-sdk = %{version}
Enhances: %{name}-sdk = %{version}
%description sdk-doc
This package includes documentation and examples for the LibreOffice
Software Development Kit (SDK).
%package officebean
Summary: OfficeBean Java Bean component for LibreOffice
License: LGPL-3.0
Group: Productivity/Office/Suite
Requires: %{name} = %{version}
%description officebean
With the OfficeBean, a developer can easily write Java applications,
harnessing the power of LibreOffice. It encapsulates a connection to
a locally running LibreOffice process, and hides the complexity of
establishing and maintaining that connection from the developer.
It also allows embedding of LibreOffice documents within the Java
environment. It provides an interface the developer can use to obtain
Java AWT windows into which the backend LibreOffice process draws
its visual representation. These windows are then plugged into the UI
hierarchy of the hosting Java application. The embedded document is
controlled from the Java environment, since the OfficeBean allows
developers to access the complete LibreOffice API from their Java
environment giving them full control over the embedded document, its
appearance and behavior.
%package base-extensions
Summary: LibreOffice Base Extensions
License: GPL-2.0 and LGPL-2.1 and LGPL-3.0 and W3C
Group: Productivity/Office/Suite
Requires: libreoffice-base = %{version}
Requires(pre): libreoffice = %{version}
%description base-extensions
This package provides extensions for LibreOffice Base:
- Report Builder
%package base-drivers-mysql
Summary: MySQL Database Driver for LibreOffice
License: GPL-2.0 and LGPL-3.0
Group: Productivity/Office/Suite
Requires: libreoffice-base = %{version}
Requires(pre): libreoffice = %{version}
Supplements: packageand(libreoffice-base:mysql-client)
%description base-drivers-mysql
This package allows to access MySQL databases from LibreOffice
Base.
%package calc-extensions
Summary: LibreOffice Calc Extensions
License: LGPL-2.1+ and LGPL-3.0
Group: Productivity/Office/Suite
Requires: libreoffice-calc = %{version}
# pyuno is needed for the numbertext extension
Requires: libreoffice-pyuno = %{version}
Requires(pre): libreoffice = %{version}
# the watchWindow extension is written in java
%ifarch %{ix86} ppc
Requires: jre-32 > 1.5
Recommends: jre-32 >= 1.6
%endif
%ifarch x86_64
Requires: jre-64 > 1.5
Recommends: jre-64 >= 1.6
%endif
%description calc-extensions
This package provides extensions for LibreOffice Calc:
- Convert Text to Number
- New Functions NUMBERTEXT and MONEYTEXT
- Solver for Nonlinear Programming
%package impress-extensions
Summary: LibreOffice Impress Extensions
License: LGPL-3.0
Group: Productivity/Office/Suite
Requires: libreoffice-impress = %{version}
Requires(pre): libreoffice = %{version}
%description impress-extensions
This package provides extensions for LibreOffice Impress:
- Presentation Minimizer
- Presenter Console
%package writer-extensions
Summary: LibreOffice Writer Extensions
License: Apache-2.0 and LGPL-3.0 and CDDL-1.0
Group: Productivity/Office/Suite
Requires: libreoffice-writer = %{version}
Requires(pre): libreoffice = %{version}
# the wiki extension is written in java
%ifarch %{ix86} ppc
Requires: jre-32 > 1.5
Recommends: jre-32 >= 1.6
%endif
%ifarch x86_64
Requires: jre-64 > 1.5
Recommends: jre-64 >= 1.6
%endif
%description writer-extensions
This package provides extensions for LibreOffice Writer:
- Google Docs, Zoho, and WebDAV Export/Import
- MediaWiki Publisher
# Crazy magic for the auto help/lang generating.
# Inspired and adjusted from Fedora spec.
%define _langpack_common() \
%{_datadir}/%{name}/program/resource/*%{1}.res \
%{_datadir}/%{name}/share/config/soffice.cfg/modules/*/ui/res/%{1} \
%{_datadir}/%{name}/share/config/soffice.cfg/*/ui/res/%{1} \
%{_datadir}/%{name}/share/template/%{1} \
%{_datadir}/%{name}/share/registry/Langpack-%{1}.xcd \
%{_datadir}/%{name}/share/registry/res/registry_%{1}.xcd \
%{_datadir}/%{name}/share/registry/res/fcfg_langpack_%{1}.xcd \
%{nil}
# 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 yum 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.
#
# c: additional config file (just the name stem)
# E the package does not contain any files (i.e., has empty filelist)
# i: additional language added to this package
# L: internal (LibreOffice) language code, used in file names
# l: language code, e.g., cs
# Mm: mythes dependency
# n: language name, e.g., Czech
# p: Provides: of libreoffice-l10n
# r: comma-separated list of additional requires
# S:s: script classification (cjk, ctl). -S is only a marker, as it does
# not add any .xcd into the package (the file does not exist for at
# least one CTL-using locale, si)
# T has help files
# Xx: has autotext definitions
#
# Example:
# libreoffice-l10n-cs: langpack for Czech lang. Requiring libreoffice-thesaurus-cs:
# %%langpack -l cs -n Czech -m cs
%define langpack(c:Ei:L:l:Mm:n:p:r:S:s:TXx:) \
%define project LibreOffice \
%define lang %{-l:%{-l*}}%{!-l:%{error:Language code not defined}} \
%define _langpack_lang %{-L:%{-L*}}%{!-L:%{lang}} \
%define pkgname l10n-%{lang} \
%define langname %{-n:%{-n*}}%{!-n:%{error:Language name not defined}} \
\
%global langpack_langs %{langpack_langs} %{_langpack_lang} %{-i:%{-i*}} \
\
%package %{pkgname} \
Summary: %{langname} Localization Files for LibreOffice \
Group: Productivity/Office/Suite \
Requires: %{name} = %{version} \
Provides: locale(libreoffice:%{lang}) \
BuildArch: noarch \
%{-m:Requires: libreoffice-thesaurus-%{-m*}}%{!-m:%{-M:Requires: libreoffice-thesaurus-%{lang}}} \
%{-r:Requires: %{-r*}} \
%{-p:Provides: %{name}-l10n-%{-p*}} \
%{-T: \
Provides: %{name}-help-%{lang} = %{version} \
Obsoletes: %{name}-help-%{lang} < %{version} \
} \
\
%description %{pkgname} \
Provides additional %{langname} translations and resources for %{project}. \
\
%files %{pkgname} \
%{!-E: \
%define autotextdir %{_datadir}/%{name}/share/autotext \
%{expand:%%_langpack_common %{_langpack_lang}} \
%{-x:%{autotextdir}/%{-x*}}%{!-x:%{-X:%{autotextdir}/%{_langpack_lang}}} \
%{-c:%{_datadir}/%{name}/share/registry/%{-c*}.xcd} \
%{-s:%{_datadir}/%{name}/share/registry/%{-s*}_%{_langpack_lang}.xcd} \
%{-T: \
%docdir %{_datadir}/%{name}/help/%{_langpack_lang} \
%{_datadir}/%{name}/help/%{_langpack_lang} \
} \
%{-i:%{expand:%%_langpack_common %{-i*}}} \
} \
%{nil}
%langpack -l af -n Afrikaans
%langpack -l ar -n Arabic -s ctl
%langpack -l as -n Assamese
%langpack -l bg -n Bulgarian -M -T -X
%langpack -l bn -n Bengali -T
%langpack -l br -n Breton
%langpack -l ca -n Catalan -M -T
%langpack -l cs -n Czech -M -T -X
%langpack -l cy -n Welsh
%langpack -l da -n Danish -M -T -X
%langpack -l de -n German -M -T -X
%langpack -l dz -n Dzongkha -s ctl -T
%langpack -l el -n Greek -M -T
%langpack -l en -n English -M -L en-US
%langpack -l es -n Spanish -M -T -X
%langpack -l et -n Estonian -T
%langpack -l eu -n Basque -T
%langpack -l fa -n Farsi -s ctl
%langpack -l fi -n Finnish -r libreoffice-voikko -T
%langpack -l fr -n French -M -T -X
%langpack -l ga -n Irish -M
%langpack -l gl -n Galician -T
%langpack -l gu -n Gujarati -s ctl
%langpack -l he -n Hebrew -s ctl
%langpack -l hi -n Hindi -s ctl -T
%langpack -l hr -n Croatian
%langpack -l hu -n Hungarian -M -T -X
%langpack -l it -n Italian -M -T -X
%langpack -l ja -n Japanese -s cjk -T -X
%langpack -l kk -n Kazakh
%langpack -l kn -n Kannada
%langpack -l ko -n Korean -s cjk -T -c korea -X
%langpack -l lt -n Lithuanian
%langpack -l lv -n Latvian -M
%langpack -l mai -n Maithili
%langpack -l ml -n Malayalam
%langpack -l mr -n Marathi
%langpack -l nb -n Bokmal -M -T
%langpack -l nl -n Dutch -M -T -X
%langpack -l nn -n Nynorsk -M -T
%define langpack_lang Southern Ndebele
%langpack -l nr -n %{langpack_lang}
%define langpack_lang Northern Sotho
%langpack -l nso -n %{langpack_lang}
%langpack -l or -n Odia -s ctl
%langpack -l pa -n Punjabi -s ctl -L pa-IN
%langpack -l pl -n Polish -M -T -X
%define langpack_lang Brazilian Portuguese
%langpack -l pt-BR -n %{langpack_lang} -m pt -p pt_BR -T -X
%langpack -l pt-PT -n Portuguese -m pt -p pt_PT -T -L pt -x pt
%langpack -l ro -n Romanian -M
%langpack -l ru -n Russian -M -T -X
%langpack -l si -n Sinhalese -S ctl -T
%langpack -l sk -n Slovak -M -T -X
%langpack -l sl -n Slovenian -M -T -X
%{baseinstdir}/share/wordbook/sl.dic
%langpack -l sr -n Serbian -i sr-Latn
%langpack -l ss -n Swati
%define langpack_lang Southern Sotho
%langpack -l st -n %{langpack_lang}
%langpack -l sv -n Swedish -M -T -X
%langpack -l ta -n Tamil -s ctl
%langpack -l te -n Telugu
%langpack -l th -n Thai -s ctl -c ctlseqcheck_th
%langpack -l tn -n Tswana
%langpack -l tr -n Turkish -T -X
%langpack -l ts -n Tsonga
%langpack -l uk -n Ukrainian -M -T
%langpack -l ve -n Venda
%langpack -l xh -n Xhosa
%define langpack_lang Simplified Chinese
%langpack -l zh-Hans -n %{langpack_lang} -p zh_CN -s cjk -T -L zh-CN -x zh-CN
%define langpack_lang Traditional Chinese
%langpack -l zh-Hant -n %{langpack_lang} -p zh_TW -s cjk -T -L zh-TW -x zh-TW
%langpack -l zu -n Zulu
%undefine langpack_lang
%prep
%setup -q -b1 -b2 -n libreoffice-%{version}
# apply patches before caling any other command to be able to patch with quilt easily
#%patch2 -p1
%patch3 -p1
%patch5
%patch6 -p1
%patch9 -p1
%patch10 -p1
%patch11
%patch12
%patch13 -p1
%patch15
%patch16 -p1
%patch990 -p1
# 256x256 icons
tar -xjf %{SOURCE20}
# READMEs
cp $RPM_SOURCE_DIR/README* .
%build
# Parallel build settings ...
lo_jobs="%{?jobs:%jobs}"
%ifarch %arm
%if ! 0%{?qemu_user_space_build:1}
# native hardware is not that powerful
lo_jobs="1"
%endif
%endif
# do not eat all memory
echo "Available memory:"
free
echo "System limits:"
ulimit -a
lo_jobs_reduced=
if test -n "$lo_jobs" -a "$lo_jobs" -gt 1 ; then
if test `uname -i` = "x86_64" ; then
mem_per_process=1000
else
mem_per_process=800
fi
%if 0%{?qemu_user_space_build:1}
mem_per_process=1200
%endif
max_mem=`LANG=C free -t -m | sed -n "s|^Mem: *\([0-9]*\).*$|\1|p"`
max_jobs="$(($max_mem / $mem_per_process))"
test "$lo_jobs" -gt "$max_jobs" && lo_jobs="$max_jobs" && lo_jobs_reduced="yes" && echo "Warning: Reducing number of jobs to $max_jobs because of memory limits"
test "$lo_jobs" -le 0 && lo_jobs=1 && echo "Warning: Do not use the parallel build at all becuse of memory limits"
fi
# finally set jobs
PARALLEL_BUILD=
if test -n "$lo_jobs" ; then
PARALLEL_BUILD="--with-parallelism=$lo_jobs"
fi
# using icecream
if test -e "/opt/icecream/bin/gcc" -a -e "/opt/icecream/bin/g++" ; then
PARALLEL_BUILD="$PARALLEL_BUILD --enable-icecream"
fi
# make sure that JAVA_HOME is set correctly
source /etc/profile.d/alljava.sh
# use RPM_OPT_FLAGS, ...
# FIXME: use -g1 instead of -g; the .o files need about 12GB disk space with full debugging symbols; there is not enough disk space and not enough memory for linking libmerged on the build hosts
# 12.3 has broken cppconnector with wrong incude paths
%if 0%{?suse_version} == 01230
ARCH_FLAGS="`echo $RPM_OPT_FLAGS | sed -e 's/\-fexceptions//g' -e 's/^-g /-g1 /g' -e 's/ -g / -g1 /g' -e 's/ -g$/ -g1/g'` -fno-strict-aliasing -I/usr/include/mysql-connector/ "
%else
ARCH_FLAGS="`echo $RPM_OPT_FLAGS | sed -e 's/\-fexceptions//g' -e 's/^-g /-g1 /g' -e 's/ -g / -g1 /g' -e 's/ -g$/ -g1/g'` -fno-strict-aliasing"
%endif
CFLAGS="$ARCH_FLAGS"
CXXFLAGS="$ARCH_FLAGS"
export ARCH_FLAGS CFLAGS CXXFLAGS
# Whack in our python2 so we don't have to use internal one
# which is quite nightmare.
export PYTHON=%{_bindir}/python2
export PYTHON_CFLAGS=`pkg-config --cflags python2`
export PYTHON_LIBS=`pkg-config --libs python2`
# do not run configure in autogen but use macro later
export NOCONFIGURE=yes
./autogen.sh
%configure \
$PARALLEL_BUILD \
Accepting request 114864 from LibreOffice:Unstable this is needed to fix build in Factory - buildfix-icu-4.9.diff: fix build with icu-4.9; needed for openSUSE-12.2 - clean up configure switches: * move switches from SUSE*.conf to spec files * use --with-system-headers and --with-system-libs to prefer system stuff over internal copies * use --without-system-<library> only for stuff that is not packaged or not patched in the SUSE distribution, for example libvisio, redland, mythes * bin not longer existing options - remove unused python-devel from BuildRequires - build zip-3.0 only for openSUSE < 11.4 - add patches for the extra zip-3.0 from the last zip package - make sure that parallel build is used for dmake and GNU make build parts - buildfix-icu-4.9.diff: fix build with icu-4.9; needed for openSUSE-12.2 - clean up configure switches: * move switches from SUSE*.conf to spec files * use --with-system-headers and --with-system-libs to prefer system stuff over internal copies * use --without-system-<library> only for stuff that is not packaged or not patched in the SUSE distribution, for example libvisio, redland, mythes * bin not longer existing options - build zip-3.0 only for openSUSE < 11.4 - add patches for the extra zip-3.0 from the last zip package - make sure that parallel build is used for dmake and GNU make build parts OBS-URL: https://build.opensuse.org/request/show/114864 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libreoffice?expand=0&rev=31
2012-04-26 17:35:13 +02:00
--docdir=%{_docdir}/%{name} \
--with-system-headers \
--with-system-libs \
--with-system-jars \
--with-system-dicts \
--with-vendor=SUSE \
--with-alloc=system \
--with-lang=%{langpack_langs} \
Accepting request 114864 from LibreOffice:Unstable this is needed to fix build in Factory - buildfix-icu-4.9.diff: fix build with icu-4.9; needed for openSUSE-12.2 - clean up configure switches: * move switches from SUSE*.conf to spec files * use --with-system-headers and --with-system-libs to prefer system stuff over internal copies * use --without-system-<library> only for stuff that is not packaged or not patched in the SUSE distribution, for example libvisio, redland, mythes * bin not longer existing options - remove unused python-devel from BuildRequires - build zip-3.0 only for openSUSE < 11.4 - add patches for the extra zip-3.0 from the last zip package - make sure that parallel build is used for dmake and GNU make build parts - buildfix-icu-4.9.diff: fix build with icu-4.9; needed for openSUSE-12.2 - clean up configure switches: * move switches from SUSE*.conf to spec files * use --with-system-headers and --with-system-libs to prefer system stuff over internal copies * use --without-system-<library> only for stuff that is not packaged or not patched in the SUSE distribution, for example libvisio, redland, mythes * bin not longer existing options - build zip-3.0 only for openSUSE < 11.4 - add patches for the extra zip-3.0 from the last zip package - make sure that parallel build is used for dmake and GNU make build parts OBS-URL: https://build.opensuse.org/request/show/114864 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libreoffice?expand=0&rev=31
2012-04-26 17:35:13 +02:00
--disable-fetch-external \
--with-external-tar="$RPM_SOURCE_DIR" \
--disable-epm \
--disable-gnome-vfs \
--disable-gstreamer-0-10 \
--disable-kdeab \
--disable-kde \
--disable-online-update \
--disable-systray \
--enable-release-build \
Accepting request 114864 from LibreOffice:Unstable this is needed to fix build in Factory - buildfix-icu-4.9.diff: fix build with icu-4.9; needed for openSUSE-12.2 - clean up configure switches: * move switches from SUSE*.conf to spec files * use --with-system-headers and --with-system-libs to prefer system stuff over internal copies * use --without-system-<library> only for stuff that is not packaged or not patched in the SUSE distribution, for example libvisio, redland, mythes * bin not longer existing options - remove unused python-devel from BuildRequires - build zip-3.0 only for openSUSE < 11.4 - add patches for the extra zip-3.0 from the last zip package - make sure that parallel build is used for dmake and GNU make build parts - buildfix-icu-4.9.diff: fix build with icu-4.9; needed for openSUSE-12.2 - clean up configure switches: * move switches from SUSE*.conf to spec files * use --with-system-headers and --with-system-libs to prefer system stuff over internal copies * use --without-system-<library> only for stuff that is not packaged or not patched in the SUSE distribution, for example libvisio, redland, mythes * bin not longer existing options - build zip-3.0 only for openSUSE < 11.4 - add patches for the extra zip-3.0 from the last zip package - make sure that parallel build is used for dmake and GNU make build parts OBS-URL: https://build.opensuse.org/request/show/114864 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libreoffice?expand=0&rev=31
2012-04-26 17:35:13 +02:00
--enable-split-app-modules \
--enable-split-opt-features \
--enable-mergelibs \
--enable-cairo-canvas \
--enable-graphite \
--enable-largefile \
--enable-mergelibs \
--enable-python=system \
--enable-randr \
--enable-randr-link \
--without-afms \
Accepting request 114864 from LibreOffice:Unstable this is needed to fix build in Factory - buildfix-icu-4.9.diff: fix build with icu-4.9; needed for openSUSE-12.2 - clean up configure switches: * move switches from SUSE*.conf to spec files * use --with-system-headers and --with-system-libs to prefer system stuff over internal copies * use --without-system-<library> only for stuff that is not packaged or not patched in the SUSE distribution, for example libvisio, redland, mythes * bin not longer existing options - remove unused python-devel from BuildRequires - build zip-3.0 only for openSUSE < 11.4 - add patches for the extra zip-3.0 from the last zip package - make sure that parallel build is used for dmake and GNU make build parts - buildfix-icu-4.9.diff: fix build with icu-4.9; needed for openSUSE-12.2 - clean up configure switches: * move switches from SUSE*.conf to spec files * use --with-system-headers and --with-system-libs to prefer system stuff over internal copies * use --without-system-<library> only for stuff that is not packaged or not patched in the SUSE distribution, for example libvisio, redland, mythes * bin not longer existing options - build zip-3.0 only for openSUSE < 11.4 - add patches for the extra zip-3.0 from the last zip package - make sure that parallel build is used for dmake and GNU make build parts OBS-URL: https://build.opensuse.org/request/show/114864 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libreoffice?expand=0&rev=31
2012-04-26 17:35:13 +02:00
--without-fonts \
--without-myspell-dicts \
--with-jdk-home=$JAVA_HOME \
--with-ant-home=%{_datadir}/ant \
--with-external-dict-dir=%{_datadir}/myspell \
--with-external-hyph-dir=%{_datadir}/ooo/hyphen \
--with-external-thes-dir=%{_datadir}/ooo/thesaurus \
--with-help \
Accepting request 114864 from LibreOffice:Unstable this is needed to fix build in Factory - buildfix-icu-4.9.diff: fix build with icu-4.9; needed for openSUSE-12.2 - clean up configure switches: * move switches from SUSE*.conf to spec files * use --with-system-headers and --with-system-libs to prefer system stuff over internal copies * use --without-system-<library> only for stuff that is not packaged or not patched in the SUSE distribution, for example libvisio, redland, mythes * bin not longer existing options - remove unused python-devel from BuildRequires - build zip-3.0 only for openSUSE < 11.4 - add patches for the extra zip-3.0 from the last zip package - make sure that parallel build is used for dmake and GNU make build parts - buildfix-icu-4.9.diff: fix build with icu-4.9; needed for openSUSE-12.2 - clean up configure switches: * move switches from SUSE*.conf to spec files * use --with-system-headers and --with-system-libs to prefer system stuff over internal copies * use --without-system-<library> only for stuff that is not packaged or not patched in the SUSE distribution, for example libvisio, redland, mythes * bin not longer existing options - build zip-3.0 only for openSUSE < 11.4 - add patches for the extra zip-3.0 from the last zip package - make sure that parallel build is used for dmake and GNU make build parts OBS-URL: https://build.opensuse.org/request/show/114864 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libreoffice?expand=0&rev=31
2012-04-26 17:35:13 +02:00
--enable-odk \
--with-doxygen \
--enable-gtk3 \
Accepting request 114864 from LibreOffice:Unstable this is needed to fix build in Factory - buildfix-icu-4.9.diff: fix build with icu-4.9; needed for openSUSE-12.2 - clean up configure switches: * move switches from SUSE*.conf to spec files * use --with-system-headers and --with-system-libs to prefer system stuff over internal copies * use --without-system-<library> only for stuff that is not packaged or not patched in the SUSE distribution, for example libvisio, redland, mythes * bin not longer existing options - remove unused python-devel from BuildRequires - build zip-3.0 only for openSUSE < 11.4 - add patches for the extra zip-3.0 from the last zip package - make sure that parallel build is used for dmake and GNU make build parts - buildfix-icu-4.9.diff: fix build with icu-4.9; needed for openSUSE-12.2 - clean up configure switches: * move switches from SUSE*.conf to spec files * use --with-system-headers and --with-system-libs to prefer system stuff over internal copies * use --without-system-<library> only for stuff that is not packaged or not patched in the SUSE distribution, for example libvisio, redland, mythes * bin not longer existing options - build zip-3.0 only for openSUSE < 11.4 - add patches for the extra zip-3.0 from the last zip package - make sure that parallel build is used for dmake and GNU make build parts OBS-URL: https://build.opensuse.org/request/show/114864 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libreoffice?expand=0&rev=31
2012-04-26 17:35:13 +02:00
--enable-kde4 \
--enable-gstreamer \
Accepting request 114864 from LibreOffice:Unstable this is needed to fix build in Factory - buildfix-icu-4.9.diff: fix build with icu-4.9; needed for openSUSE-12.2 - clean up configure switches: * move switches from SUSE*.conf to spec files * use --with-system-headers and --with-system-libs to prefer system stuff over internal copies * use --without-system-<library> only for stuff that is not packaged or not patched in the SUSE distribution, for example libvisio, redland, mythes * bin not longer existing options - remove unused python-devel from BuildRequires - build zip-3.0 only for openSUSE < 11.4 - add patches for the extra zip-3.0 from the last zip package - make sure that parallel build is used for dmake and GNU make build parts - buildfix-icu-4.9.diff: fix build with icu-4.9; needed for openSUSE-12.2 - clean up configure switches: * move switches from SUSE*.conf to spec files * use --with-system-headers and --with-system-libs to prefer system stuff over internal copies * use --without-system-<library> only for stuff that is not packaged or not patched in the SUSE distribution, for example libvisio, redland, mythes * bin not longer existing options - build zip-3.0 only for openSUSE < 11.4 - add patches for the extra zip-3.0 from the last zip package - make sure that parallel build is used for dmake and GNU make build parts OBS-URL: https://build.opensuse.org/request/show/114864 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libreoffice?expand=0&rev=31
2012-04-26 17:35:13 +02:00
--enable-evolution2 \
--enable-lockdown \
--enable-dbus \
--enable-hardlink-deliver \
Accepting request 114864 from LibreOffice:Unstable this is needed to fix build in Factory - buildfix-icu-4.9.diff: fix build with icu-4.9; needed for openSUSE-12.2 - clean up configure switches: * move switches from SUSE*.conf to spec files * use --with-system-headers and --with-system-libs to prefer system stuff over internal copies * use --without-system-<library> only for stuff that is not packaged or not patched in the SUSE distribution, for example libvisio, redland, mythes * bin not longer existing options - remove unused python-devel from BuildRequires - build zip-3.0 only for openSUSE < 11.4 - add patches for the extra zip-3.0 from the last zip package - make sure that parallel build is used for dmake and GNU make build parts - buildfix-icu-4.9.diff: fix build with icu-4.9; needed for openSUSE-12.2 - clean up configure switches: * move switches from SUSE*.conf to spec files * use --with-system-headers and --with-system-libs to prefer system stuff over internal copies * use --without-system-<library> only for stuff that is not packaged or not patched in the SUSE distribution, for example libvisio, redland, mythes * bin not longer existing options - build zip-3.0 only for openSUSE < 11.4 - add patches for the extra zip-3.0 from the last zip package - make sure that parallel build is used for dmake and GNU make build parts OBS-URL: https://build.opensuse.org/request/show/114864 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libreoffice?expand=0&rev=31
2012-04-26 17:35:13 +02:00
--enable-ext-ct2n \
--enable-ext-nlpsolver \
--enable-ext-google-docs \
--enable-ext-numbertext \
--enable-ext-wiki-publisher \
--enable-ext-mariadb-connector \
--enable-scripting-beanshell \
--enable-scripting-javascript \
--enable-telepathy \
--enable-opengl \
--enable-vlc \
--enable-neon \
--with-system-ucpp \
%if %{debug_build} == 0
--disable-ccache \
%endif
%ifarch ppc64
--disable-report-builder \
%endif
--without-system-jfreereport
# hack to correctly bootstrap python stuff with system python, (deb#501028, i#90701)
sed -i -e "s|@INSTALLDIR@|%{lo_prefix}/%{lo_home}|" pyuno/source/module/uno.py scripting/source/pyprov/officehelper.py
# just call make here as we added the jobs in configure
make build-nocheck
%check
make unitcheck
make slowcheck
%install
make DESTDIR=%{buildroot} distro-pack-install
################
# update desktop files
builddir=`pwd`
cd %{buildroot}%{_datadir}/applications
for desktop in * ; do
# relative link is needed by %%suse_update_desktop_file
relative_target=`readlink $desktop | sed "s|%lo_prefix|../../%_lib|"`
# FIXME: remove the libreoffice- prefix because the old desktop files are preferred in /etc/gnome_defaults.conf
desktop_new=`echo $desktop | sed -e "s/%lo_home-//"`
rm $desktop
sed -i -e "s|%_datadir/applications/$desktop|%_datadir/applications/$desktop_new|" $builddir/file-lists/*.txt
# finally, create the right link
ln -sf $relative_target $desktop_new
# enable startup notification (bnc#796875)
grep -q "NoDisplay=true" $desktop_new || sed -i "s/\(\[Desktop Entry\]\)/\1\nStartupNotify=true/" $desktop_new
# suse_update
app=`echo $desktop_new | sed "s/.desktop//"`
%suse_update_desktop_file $app
done
sed -i -e 's:Office;:Office;Spreadsheet;:g' %_datadir/applications/math.desktop
cd -
################
# compat stuff for noarch packages
mkdir -p %{buildroot}/%{_datadir}/%{lo_home}/program
install -m 755 $RPM_SOURCE_DIR/link-to-ooo-home %{buildroot}%{_datadir}/%{lo_home}/
echo "%dir %{_datadir}/%{lo_home}" >>file-lists/common_list.txt
echo "%dir %{_datadir}/%{lo_home}/program" >>file-lists/common_list.txt
echo "%{_datadir}/%{lo_home}/link-to-ooo-home" >>file-lists/common_list.txt
################
# helper script for noarch packages
# add missing directories to the file list
for dir in `find %{buildroot}/%{_datadir}/icons/gnome -type d` ; do
dir=`echo $dir | sed -e "s|%{buildroot}||"`
echo "%dir $dir" >>file-lists/common_list.txt
done
echo "%dir %{_datadir}/application-registry" >>file-lists/common_list.txt
echo "%dir %{_datadir}/mime-info" >>file-lists/common_list.txt
echo "%dir %{_datadir}/mimelnk" >>file-lists/common_list.txt
echo "%dir %{_datadir}/mimelnk/application" >>file-lists/common_list.txt
################
# compat symlinks for the old main icon (bnc#724087)
icon_found=
for icon in `find %{buildroot}/%{_datadir}/icons -name libreoffice-main.png` ; do
icon_found=1
icon_name=$(basename $icon)
icon_dir=$(dirname $icon | sed -e "s|^%{buildroot}||")
ln -sf $icon_name %{buildroot}/$icon_dir/ooo-gulls.png
echo "$icon_dir/ooo-gulls.png" >>file-lists/common_list.txt
done
test -z "$icon_found" && echo "ERROR: Can't find compat icon for ooo-gulls.png" && exit 1;
################
# common helpcontent files
# create symlinks to %{_datadir} for noarch help packages
mkdir -p %{buildroot}/%{_datadir}/%{lo_home}/help
echo "%dir %{lo_prefix}/%{lo_home}/help" >>file-lists/common_list.txt
echo "%dir %{_datadir}/%{lo_home}/help" >>file-lists/common_list.txt
for file in idxcaption.xsl idxcontent.xsl main_transform.xsl ; do
ln -sf %{lo_prefix}/%{lo_home}/help/$file %{buildroot}/%{_datadir}/%{lo_home}/help
echo "%{lo_prefix}/%{lo_home}/help/$file" >>file-lists/common_list.txt
echo "%{_datadir}/%{lo_home}/help/$file" >>file-lists/common_list.txt
done
################
# branding will be in separate packages
# first check wheter the prebuilt sofficerc is still the same
if ! diff %{buildroot}%{lo_prefix}/%{lo_home}/program/sofficerc $RPM_SOURCE_DIR/sofficerc-upstream ; then
echo "Error: The file \"sofficerc\" has changed in the sources"
echo " Please, update the prebuilt variant in $RPM_SOURCE_DIR/sofficerc-upstream"
exit 1;
fi
# replace files with symlinks to noarch packages
mkdir -p %{buildroot}/%{_datadir}/%{lo_home}/program/shell
for file in sofficerc \
intro.png \
flat_logo.svg \
shell/about.svg \
shell/backing_left.png \
shell/backing_right.png \
shell/backing_rtl_left.png \
shell/backing_rtl_right.png \
shell/backing_space.png ; do
rm -f %{buildroot}/%{lo_prefix}/%{lo_home}/program/$file
ln -sf %{_datadir}/%{lo_home}/program/$file %{buildroot}/%{lo_prefix}/%{lo_home}/program/$file
# touch the target file to make brp-symlink happy; the touched files are not packaged
# it would be possible to disable the error using NO_BRP_STALE_LINK_ERROR=yes but the check is pretty useful to catch other errors
touch %{buildroot}/%{_datadir}/%{lo_home}/program/$file
done
################
# extra background picture into the gallery
export galdir="%{lo_prefix}/%{lo_home}/share/gallery"
install -m 644 "$RPM_SOURCE_DIR/Draft.jpg" "%{buildroot}$galdir/www-back/"
echo "$galdir/www-back/Draft.jpg" >>file-lists/common_list.txt
# make sure that the existing galleries can be modified
chmod 644 %{buildroot}$galdir/sg*.???
# LC_ALL=en_US.UTF-8 is necessary to make sure that the name "Backgrounds" is compared with the right localization
LC_ALL=en_US.UTF-8 %{buildroot}%{lo_prefix}/%{lo_home}/program/gengal -headless --name "Backgrounds" --path "%{buildroot}$galdir" --destdir %{buildroot} "%{buildroot}$galdir/www-back/Draft.jpg" || exit 1;
################
# FIXME: fast hack to solve a customer issue, n#364523
# we need a more generic solution
ln -sf acor_fr-FR.dat %{buildroot}%{lo_prefix}/%{lo_home}/share/autocorr/acor_fr-CA.dat
echo "%{lo_prefix}/%{lo_home}/share/autocorr/acor_fr-CA.dat" >>file-lists/common_list.txt
################
# helper script to create libstlport compat symlink (bnc#458952)
%ifarch %{ix86}
cat << EOF > %{buildroot}%{lo_prefix}/%{lo_home}/ure/bin/create-libstlport-compat-links
#!/bin/sh
# helper script to create compat link needed to run upstream extensions (bnc#458952)
if ! test -L %{_libdir}/libstlport_gcc.so -a -r %{_libdir}/libstlport_gcc.so ; then
lib_name=\`ls %{_libexecdir}/libstlport_gcc.so.4* 2>/dev/null | tail -n 1\`
if test -n "\$lib_name" -a -r "\$lib_name" ; then
lib_name=\`basename \$lib_name\`
rm -f %{_libdir}/libstlport_gcc.so
ln -sf \$lib_name %{_libdir}/libstlport_gcc.so
fi
fi
EOF
chmod 755 %{buildroot}%{lo_prefix}/%{lo_home}/ure/bin/create-libstlport-compat-links
echo "%{lo_prefix}/%{lo_home}/ure/bin/create-libstlport-compat-links" >>file-lists/common_list.txt
%endif
# Symlink uno.py and unohelper.py so that python can find them
mkdir -p %{buildroot}%{python_sitelib}
ln -s %{_libdir}/libreoffice/program/uno.py %{buildroot}%{python_sitelib}/uno.py
ln -s %{_libdir}/libreoffice/program/unohelper.py %{buildroot}%{python_sitelib}/unohelper.py
# Move icon themes from lib to share
mkdir -p %{buildroot}%{_datadir}/%{lo_home}/share/config
mv %{buildroot}%{_libdir}/%{lo_home}/share/config/images*.zip %{buildroot}%{_datadir}/%{lo_home}/share/config/
# We have ton of duped files so run over it
%fdupes %{buildroot}/usr
%pre
# do not crate cache for bundled extensions because it is not secure
# rather remove it (fdo#53006, fdo#51252, bnc#769448)
# Remove after 12.2 is out of support scope.
bundled_cache="%{lo_prefix}/%{lo_home}/share/prereg/bundled"
test -d "$bundled_cache" && rm -rf "$bundled_cache"/* || true;
%post
/sbin/ldconfig
%mime_database_post
%desktop_database_post
%icon_theme_cache_post
# do not crate the cache because it is not secure
# remove the system cache for bundled extensions; it is not secure (fdo#53006, fdo#51252)
# it has not been created since LO-3.6.1, August 2012
bundled_cache="%{lo_prefix}/%{lo_home}/share/prereg/bundled"
test -d "$bundled_cache" && rm -rf "$bundled_cache"/* || true;
exit 0
%preun
test "$1" = "0" && rm -rf ./%{lo_prefix}/%{lo_home}/share/uno_packages/cache || true
%postun
/sbin/ldconfig
%icon_theme_cache_postun
%desktop_database_postun
%mime_database_postun
%ifarch %{ix86}
if test $1 = 0 ; then
# LO is removed => remove the link as well if it is not created by stlport-devel package (bnc#458952)
if test -L %{_libdir}/libstlport_gcc.so -a ! -r %{_includedir}/stlport/ctime ; then
rm -f %{_libdir}/libstlport_gcc.so
fi
fi
%endif
exit 0
%posttrans
%ifarch %{ix86}
# the compat link was %%ghost in old OOo-ure packages, so it might be removed also during OOo-ure update (bnc#458952)
if test -f %{lo_prefix}/%{lo_home}/ure/bin/javaldx ; then
%{lo_prefix}/%{lo_home}/ure/bin/create-libstlport-compat-links || true;
fi
%endif
%ifarch %{ix86}
%triggerin -- mysql-connector-java
%{lo_prefix}/%{lo_home}/program/java-set-classpath %{_datadir}/java/mysql-connector-java.jar || true
%triggerpostun -- mysql-connector-java
%{lo_prefix}/%{lo_home}/program/java-set-classpath %{_datadir}/java/mysql-connector-java.jar || true
%triggerin -- libstlport_gcc4
# create compat link needed to run upstream extensions (bnc#458952)
%{lo_prefix}/%{lo_home}/ure/bin/create-libstlport-compat-links || true;
%triggerpostun -- libstlport_gcc4-devel
# create compat link needed to run upstream extensions (bnc#458952)
%{lo_prefix}/%{lo_home}/ure/bin/create-libstlport-compat-links || true;
%triggerpostun -- libstlport_gcc4
# remove compat link needed to run upstream extensions (bnc#458952)
if test $2 = 0 ; then
if test -L %{_libdir}/libstlport_gcc.so -a ! -r %{_libdir}/libstlport_gcc.so ; then
rm -f %{_libdir}/libstlport_gcc.so
fi
fi
exit 0
%endif
%post base
%desktop_database_post
%postun base
%desktop_database_postun
%post calc
%desktop_database_post
%postun calc
%desktop_database_postun
%post draw
%desktop_database_post
%postun draw
%desktop_database_postun
%post math
%desktop_database_post
%postun math
%desktop_database_postun
%post impress
%desktop_database_post
%postun impress
%desktop_database_postun
%post writer
%desktop_database_post
%postun writer
%desktop_database_postun
%files -f file-lists/common_list.txt
%defattr(-,root,root)
# ignore helper files for brp-symlink check
%exclude %{_datadir}/%{lo_home}/program/sofficerc
%exclude %{_datadir}/%{lo_home}/program/flat_logo.svg
%exclude %{_datadir}/%{lo_home}/program/*.png
%exclude %{_datadir}/%{lo_home}/program/shell/*.png
%exclude %{_datadir}/%{lo_home}/program/shell/*.svg
# such a big icons are not provided by other packages
# FIXME: last time checked on openSUSE-12.2
%dir %{_datadir}/icons/hicolor/512x512
%dir %{_datadir}/icons/hicolor/512x512/apps
%dir %{_datadir}/icons/hicolor/512x512/mimetypes
%files -f file-lists/base_list.txt base
%defattr(-,root,root)
%files -f file-lists/calc_list.txt calc
%defattr(-,root,root)
%files -f file-lists/draw_list.txt draw
%defattr(-,root,root)
%files -f file-lists/math_list.txt math
%defattr(-,root,root)
%files -f file-lists/impress_list.txt impress
%defattr(-,root,root)
%files -f file-lists/writer_list.txt writer
%defattr(-,root,root)
%files -f file-lists/postgresql_list.txt base-drivers-postgresql
%defattr(-,root,root)
%files -f file-lists/filters_list.txt filters-optional
%defattr(-,root,root)
%files -f file-lists/mailmerge_list.txt mailmerge
%defattr(-,root,root)
%files -f file-lists/pyuno_list.txt pyuno
%defattr(-,root,root)
%{python_sitelib}/uno.py
%{python_sitelib}/unohelper.py
%files -f file-lists/gnome_list.txt gnome
%defattr(-,root,root)
%files -f file-lists/kde4_list.txt kde4
%defattr(-,root,root)
%files -f file-lists/officebean_list.txt officebean
%defattr(-,root,root)
%files -f file-lists/sdk_list.txt sdk
%defattr(-,root,root)
%files -f file-lists/sdk_doc_list.txt sdk-doc
%defattr(-,root,root)
%files base-extensions
%defattr(-,root,root)
%files base-drivers-mysql
%defattr(-,root,root)
%{lo_prefix}/%{lo_home}/share/extensions/mysql-connector-ooo
%files calc-extensions
%defattr(-,root,root)
%doc README-scsolver.txt
%{lo_prefix}/%{lo_home}/share/extensions/ConvertTextToNumber
%{lo_prefix}/%{lo_home}/share/extensions/nlpsolver
%{lo_prefix}/%{lo_home}/share/extensions/numbertext
%files impress-extensions
%defattr(-,root,root)
%{lo_prefix}/%{lo_home}/share/extensions/presentation-minimizer
%files writer-extensions
%defattr(-,root,root)
%{lo_prefix}/%{lo_home}/share/extensions/gdocs
%{lo_prefix}/%{lo_home}/share/extensions/wiki-publisher
%files -n libreoffice-icon-theme-crystal
%defattr(-,root,root)
%dir %{_datadir}/%{lo_home}
%dir %{_datadir}/%{lo_home}/share
%dir %{_datadir}/%{lo_home}/share/config
%{_datadir}/%{lo_home}/share/config/images_crystal.zip
%files -n libreoffice-icon-theme-galaxy
%defattr(-,root,root)
%dir %{_datadir}/%{lo_home}
%dir %{_datadir}/%{lo_home}/share
%dir %{_datadir}/%{lo_home}/share/config
%{_datadir}/%{lo_home}/share/config/images.zip
%files -n libreoffice-icon-theme-hicontrast
%defattr(-,root,root)
%dir %{_datadir}/%{lo_home}
%dir %{_datadir}/%{lo_home}/share
%dir %{_datadir}/%{lo_home}/share/config
%{_datadir}/%{lo_home}/share/config/images_hicontrast.zip
%files -n libreoffice-icon-theme-oxygen
%defattr(-,root,root)
%dir %{_datadir}/%{lo_home}
%dir %{_datadir}/%{lo_home}/share
%dir %{_datadir}/%{lo_home}/share/config
%{_datadir}/%{lo_home}/share/config/images_oxygen.zip
%files -n libreoffice-icon-theme-tango
%defattr(-,root,root)
%dir %{_datadir}/%{lo_home}
%dir %{_datadir}/%{lo_home}/share
%dir %{_datadir}/%{lo_home}/share/config
%{_datadir}/%{lo_home}/share/config/images_tango.zip
%changelog