File libreoffice-components.spec of Package libreoffice-components

#
# spec file for package libreoffice-components
#
# Copyright (c) 2011 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/
#

# norootforbuild


Name:           libreoffice-components
# allow to use xulrunner191 on SLED11-SP1 (bnc#540726)
%define		use_xulrunner191	no
Version:        3.3.1.2
Release:        1.<RELEASE2>
%define         piece             components
%define         ooo_build_version 3.3.1.2
%define         ooo_piece_version 3.3.1.2
%define         ooo_sourcedirname libreoffice-build-%ooo_piece_version
%define         ooo_prefix        %_libdir
%define         ooo_home          libreoffice
#!BuildIgnore:  libreoffice
BuildRequires:  libreoffice-testing = %version
BuildRequires:  libreoffice-artwork-devel = %version
BuildRequires:  libreoffice-libs-core-devel = %version
BuildRequires:  ImageMagick ant ant-apache-regexp bison boost-devel ccache cups-devel curl-devel flac-devel flex gcc-c++ gnome-vfs2-devel gperf gtk2-devel icu java-devel libexif libxml2-devel mono-devel neon-devel pam-devel perl-Archive-Zip perl-Compress-Zlib python-devel recode unixODBC-devel unzip xml-commons-apis zip
############################
# basic stuff
%if 0%{?suse_version}
BuildRequires:  db-devel krb5 openldap2-devel xorg-x11
%endif
%if 0%{?meego_version}
BuildRequires:  db4-devel krb5-devel openldap-devel
BuildRequires:  xorg-x11-server-devel
BuildRequires:  xorg-x11-proto-xproto
BuildRequires:  xorg-x11-utils
BuildRequires:  libICE-devel libSM-devel
BuildRequires:  pkgconfig(xt) pkgconfig(xtst)
BuildRequires:  libjpeg-devel libxslt-devel openssl-devel pkgconfig(gl) pkgconfig(glu) pkgconfig(xau) pkgconfig(xaw7)
%endif
############################
# KDE3 stuff
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
BuildRequires:  kdelibs3-devel
%endif
############################
# icu stuff
%if 0%{?suse_version} >= 01110 
BuildRequires:  libicu-devel
%endif
############################
# mozilla stuff
%if 0%{?suse_version} > 01130 
BuildRequires:  mozilla-xulrunner192-devel
%endif
%if 0%{?suse_version} <= 01130
%if 0%{?suse_version} > 01110 || %use_xulrunner191 == yes
BuildRequires:  mozilla-xulrunner191-devel
%endif 
%endif
%if 0%{?suse_version} > 01100 && 0%{?suse_version} <= 01110 && %use_xulrunner191 != yes
BuildRequires:  mozilla-xulrunner190-devel
%endif 
%if 0%{?suse_version} > 01010 && 0%{?suse_version} <= 01100
BuildRequires:  mozilla-xulrunner181-devel
%endif
%if 0%{?suse_version} > 01000 && 0%{?suse_version} <= 01010
BuildRequires:  gecko-sdk mozilla-xulrunner
%endif
%if 0%{?meego_version}
BuildRequires:  xulrunner-devel
%endif
############################
# openSUSE 10.3 features
%if 0%{?suse_version} > 01020 || 0%{?meego_version}
BuildRequires:  libicu-devel
%endif
############################
# openSUSE 11.0 features
%if 0%{?suse_version} > 01030 || 0%{?meego_version}
BuildRequires:  hunspell-devel libwpd-devel libwpg-devel libwps-devel
%endif
License:        LGPLv3
Group:          Productivity/Office/Suite
AutoReqProv:    on
Requires:       libreoffice-libs-core = %version
# compat stuff
Provides:       OpenOffice_org-components = %version
Obsoletes:      OpenOffice_org-components <= %version
Summary:        LibreOffice Components
Url:            http://www.documentfoundation.org/
Source0:        libreoffice-%piece-%ooo_piece_version.tar.bz2
Patch1000:      hotfix-bean-openjdk-ppc.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %ix86 x86_64 ppc

%description
This package provides functionality used by all the LibreOffice
modules.



%package -n libreoffice-officebean
License:        LGPLv3
Summary:        OfficeBean Java Bean component for LibreOffice
Group:          Productivity/Office/Suite
Requires:       libreoffice = %version
# compat stuff
Provides:       OpenOffice_org-officebean = %version
Obsoletes:      OpenOffice_org-officebean <= %version
Provides:       OpenOffice_org2-officebean = %version
Obsoletes:      OpenOffice_org2-officebean <= %version
Provides:       OpenOffice_org:/usr/lib/ooo-2.0/program/libofficebean.so

%description -n libreoffice-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 -n libreoffice-testtool
License:        LGPLv3
Summary:        LibreOffice Test Tool
Group:          Productivity/Office/Suite
Requires:       libreoffice = %version
# compat stuff
Provides:       OpenOffice_org-testtool = %version
Obsoletes:      OpenOffice_org-testtool <= %version
Provides:       OpenOffice_org:%ooo_prefix/%ooo_home/program/testtool.bin

%description -n libreoffice-testtool
A Tool needed for automatic testing of LibreOffice office suite.



%package devel
Requires:       %name = %version
Requires:       libreoffice-officebean = %version
Requires:       libreoffice-testtool = %version
Requires:       libreoffice-ure-devel = %version
Requires:       libreoffice-libs-extern-devel = %version
# compat stuff
Provides:       OpenOffice_org-components-devel = %version
Obsoletes:      OpenOffice_org-components-devel <= %version
License:        Artistic ; BSD3c ; GPLv2+ ; LPPL .. ; LGPLv2.1+ ; LGPLv3 ; MPL .. ; MIT
Summary:        LibreOffice Components Development
Group:          Productivity/Office/Suite
AutoReqProv:    off

%description devel
This package allows developement based on the LibreOffice components
modules API.



%package l10n-prebuilt
License:        Artistic ; BSD3c ; GPLv2+ ; LPPL .. ; LGPLv2.1+ ; LGPLv3 ; MPL .. ; MIT
Summary:        Prebuilt LibreOffice Components Localizations
Group:          Productivity/Office/Suite
AutoReqProv:    off
# compat stuff
Provides:       OpenOffice_org-components-l10n-prebuilt = %version
Obsoletes:      OpenOffice_org-components-l10n-prebuilt <= %version

%description l10n-prebuilt
This package includes the prebuilt localization of LibreOffice
Componetns package. It is not intended for a real use. It needs to be
repacked to the real architecture independent package.

This is only a temporary solution until we have an easier way to build
the LibreOffice localizations separately.



%prep
%setup -q -n libreoffice-%piece-%ooo_piece_version
# hotfixes
mkdir -p ooo-build/hotfixes
cp %{P:1000} ooo-build/hotfixes

%build
# setup env.
export OO_INSTDIR=%{_libdir}/%ooo_home
export OO_TOOLSDIR=$OO_INSTDIR/build/bin
export VERBOSE=1
export PIECE_BUILD_NCPUS_AUTO=1
export PIECE_USE_JOBS="%{?jobs:%jobs}"
# FIXME: hack to avoid dependecy problem
$OO_TOOLSDIR/piece/build-generic %piece %ooo_sourcedirname || $OO_TOOLSDIR/piece/build-generic %piece %ooo_sourcedirname || $OO_TOOLSDIR/piece/build-generic %piece %ooo_sourcedirname

%install
# setup env.
export OO_INSTDIR=%{_libdir}/%ooo_home
export OO_TOOLSDIR=$OO_INSTDIR/build/bin
export DESTDIR=$RPM_BUILD_ROOT
$OO_TOOLSDIR/piece/install-generic %piece %ooo_sourcedirname

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post devel
/sbin/ldconfig

%postun devel
/sbin/ldconfig

%files -f files-%piece.txt
%defattr(-,root,root)

%files -f files-officebean.txt -n libreoffice-officebean
%defattr(-,root,root)

%files -f files-testtool.txt -n libreoffice-testtool
%defattr(-,root,root)

%files devel
%defattr(-,root,root)
%dir %ooo_prefix/%ooo_home/solver
%ooo_prefix/%ooo_home/solver/*
%exclude %ooo_prefix/%ooo_home/solver/noarch

%files l10n-prebuilt
%defattr(-,root,root)
%ooo_prefix/%ooo_home/solver/noarch

%changelog
openSUSE Build Service is sponsored by