LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File OpenOffice_org-libs-core.spec of Package OpenOffice_org-libs-core (Project DISCONTINUED:openSUSE:11.2)

#
# spec file for package OpenOffice_org-libs-core (Version 3.1.1.4)
#
# Copyright (c) 2009 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:           OpenOffice_org-libs-core
Version:        3.1.1.4
Release:        1.<RELEASE1>
%define         ooo_build_version 3.1.1.4
%define         piece      libs-core
# version of the postgresql driver
%define         postgresql_version 0.7.6
#!BuildIgnore:  OpenOffice_org
BuildRequires:  OpenOffice_org-artwork-devel = %version
BuildRequires:  OpenOffice_org-libs-gui-devel = %version
BuildRequires:  ImageMagick ant ant-apache-regexp bison boost-devel ccache cups-devel curl-devel db-devel flac-devel flex gnome-vfs2-devel gperf gtk2-devel icu java-devel kdelibs3-devel krb5 libexif mono-devel neon-devel openldap2-devel pam-devel perl-Archive-Zip perl-Compress-Zlib python-devel recode unixODBC-devel unzip xml-commons-apis xorg-x11 zip
BuildRequires:  postgresql-devel
%if %suse_version > 1100
# libexpat-devel is explicitely needed since openSUSE-11.1
BuildRequires:  libexpat-devel
%endif
# 10.3 features
%if %suse_version > 1020
BuildRequires:  libicu-devel
%endif
# 11.2 features
%if %suse_version > 1110
BuildRequires:  libkde4-devel
%endif
# CODE10 features
%if %suse_version > 1000
BuildRequires:  gstreamer010-plugins-base-devel sablot-devel xalan-j2 xerces-j2 xml-commons-apis
%endif
%define	      ooo_prefix	%_libdir
%define	      ooo_home		ooo3
%define	      ooo_build_tag     ooo310-m19
License:        Artistic License .. ; BSD 3-clause (or similar) ; GPL v2 or later ; LPPL .. ; LGPL v2.1 or later ; LGPL v3 only ; MPL .. ; MIT License (or similar)
Group:          Productivity/Office/Suite
AutoReqProv:    on
Requires:       OpenOffice_org-libs-gui = %version
Summary:        OpenOffice.org Core Libraries
Url:            http://www.openoffice.org/
Source0:        %ooo_build_tag-%piece.tar.bz2
Source1:        ooo-sdf-%piece.tar.bz2
# FIXME: temporary hack to fix split build
Patch990:       field-patch-split-build.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %ix86 x86_64 ppc

%description
This package provides core libraries used by all OpenOffice.org
modules.



%package -n OpenOffice_org-gnome
License:        LGPL v3 only
Summary:        GNOME Extensions for OpenOffice.org
Group:          Productivity/Office/Suite
Provides:       ooo:/usr/lib/ooo-1.9/program/libevoab2.so
Provides:       OpenOffice_org17-gnome
Requires:       OpenOffice_org = %version
Obsoletes:      OpenOffice_org17-gnome
Provides:       OpenOffice_org2-gnome
Obsoletes:      OpenOffice_org2-gnome

%description -n OpenOffice_org-gnome
This package contains some GNOME extensions for OpenOffice.org.



%package -n OpenOffice_org-kde
License:        LGPL v3 only
Summary:        KDE Extensions for OpenOffice.org
Group:          Productivity/Office/Suite
Provides:       OpenOffice_org17-kde
Requires:       OpenOffice_org = %version
Obsoletes:      OpenOffice_org17-kde
Provides:       OpenOffice_org2-kde
Obsoletes:      OpenOffice_org2-kde

%description -n OpenOffice_org-kde
This package contains some KDE extensions for OpenOffice.org.

%if %suse_version > 1110

%package -n OpenOffice_org-kde4
License:        LGPL v3 only
Summary:        KDE4 Extensions for OpenOffice.org
Group:          Productivity/Office/Suite
Requires:       OpenOffice_org = %version

%description -n OpenOffice_org-kde4
This package contains some KDE4 extensions for OpenOffice.org.
%endif

%package -n OpenOffice_org-mailmerge
License:        LGPL v3 only
Summary:        Mail Merge Functionality for OpenOffice.org
Group:          Productivity/Office/Suite
Provides:       OpenOffice_org:%ooo_prefix/%ooo_home/program/mailmerge.py
Requires:       OpenOffice_org-pyuno = %version
%if %suse_version > 1000
Supplements:    OpenOffice_org
%endif

%description -n OpenOffice_org-mailmerge
This module allows you to create form letters or send E-mail messages
to many recipients using OpenOffice.org office suite.



%package -n OpenOffice_org-base-drivers-postgresql
License:        LGPL v2.1 or later
Summary:        PostgreSQL Database Driver for OpenOffice.org
Group:          Productivity/Office/Suite
Requires:       OpenOffice_org-base = %version
Requires:       postgresql

%description -n OpenOffice_org-base-drivers-postgresql
This package allows to access PostgreSQL databases from OpenOffice.org
Base.



%package devel
Requires:       %name = %version
Requires:       OpenOffice_org-gnome = %version
Requires:       OpenOffice_org-kde = %version
Requires:       OpenOffice_org-mailmerge = %version
Requires:       OpenOffice_org-ure-devel = %version
Requires:       OpenOffice_org-libs-gui-devel = %version
License:        Artistic License .. ; BSD 3-clause (or similar) ; GPL v2 or later ; LPPL .. ; LGPL v2.1 or later ; LGPL v3 only ; MPL .. ; MIT License (or similar)
Summary:        OpenOffice.org Core Libraries Development
Group:          Productivity/Office/Suite
AutoReqProv:    off

%description devel
This package allows developement based on the OpenOffice.org core
libraries API.



%package l10n-prebuilt
License:        LGPL v3 only
Summary:        Prebuilt OpenOffice.org Core Libraries Localizations
Group:          Productivity/Office/Suite
AutoReqProv:    off

%description l10n-prebuilt
This package includes the prebuilt localization of OpenOffice.org core
libraries. 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 OpenOffice.org localizations separately.



%prep
%setup -q -a1 -n %ooo_build_tag-%piece
# hotfixes
mkdir -p ooo-build/hotfixes
cp %{P:990} ooo-build/hotfixes

%build
# setup env.
export OO_INSTDIR=%{_libdir}/%ooo_home
export OO_TOOLSDIR=$OO_INSTDIR/ooo-build/bin
export VERBOSE=1
export EXTRA_BUILD_FLAGS=%{?jobs:-P%jobs}
export EXTRA_DMAKE_FLAGS="%{?jobs:-- -P%jobs}"
# FIXME: -Wl,--as-needed is enabled by default for openSUSE-11.2
# there are missing symbols when linking kde libraries now
# See http://fourier.suse.de/mlarch/SuSE/development-gcc/2009/development-gcc.2009.07/msg00024.html
export SUSE_ASNEEDED=0
# FIXME: start it several times to avoid strange paralel build problem in basic
#        missing org/openoffice/vba/XErrObject.hpp
#        same problem happens also in linguistic
$OO_TOOLSDIR/piece/build-generic %piece %ooo_build_tag || $OO_TOOLSDIR/piece/build-generic %piece %ooo_build_tag || $OO_TOOLSDIR/piece/build-generic %piece %ooo_build_tag

%install
# setup env.
export OO_INSTDIR=%{_libdir}/%ooo_home
export OO_TOOLSDIR=$OO_INSTDIR/ooo-build/bin
export DESTDIR=$RPM_BUILD_ROOT
$OO_TOOLSDIR/piece/install-generic %piece %ooo_build_tag
%suse_update_desktop_file ooo-extension-manager
# prune redundant files the scp2 likes to make for us
rm -Rf \
    "$DESTDIR/$OO_INSTDIR/basis-link" \
    "$DESTDIR/$OO_INSTDIR/ure" \
    "$DESTDIR/$OO_INSTDIR/basis3.1/program/services.rdb"
# FIXME: hack to install postgresql driver
mkdir -p $RPM_BUILD_ROOT%ooo_prefix/%ooo_home/share/extension/install
cp connectivity/unxlng*.pro/lib/postgresql-sdbc-%postgresql_version.zip \
   $RPM_BUILD_ROOT%ooo_prefix/%ooo_home/share/extension/install

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post devel
/sbin/ldconfig

%postun devel
/sbin/ldconfig

%pre -n OpenOffice_org-base-drivers-postgresql
if test $1 = 2 ; then
    echo "Unregistering the older PostgreSQL driver from OpenOffice.org..."
    unopkg remove --shared org.openoffice.legacy.postgresql-sdbc-%postgresql_version.zip || true;
fi

%post -n OpenOffice_org-base-drivers-postgresql
echo "Registering the PostgreSQL driver in OpenOffice.org..."
unopkg add --shared %ooo_prefix/%ooo_home/share/extension/install/postgresql-sdbc-%postgresql_version.zip || true;

%preun -n OpenOffice_org-base-drivers-postgresql
if test $1 = 0 ; then
    echo "Unregistering the PostgreSQL driver from OpenOffice.org..."
    unopkg remove --shared org.openoffice.legacy.postgresql-sdbc-%postgresql_version.zip || true;
fi

%files -f files-%piece.txt
%defattr(-,root,root)
#%dir %ooo_prefix/%ooo_home/basis3.0
#%dir %ooo_prefix/%ooo_home/program
#%dir %ooo_prefix/%ooo_home/share
#%ooo_prefix/%ooo_home/basis3.0/*
#%ooo_prefix/%ooo_home/program/*
#%ooo_prefix/%ooo_home/share/*

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

%files -f files-gnome.txt -n OpenOffice_org-gnome
%defattr(-,root,root)

%files -f files-kde.txt -n OpenOffice_org-kde
%defattr(-,root,root)
%if %suse_version > 1110

%files -f files-kde4.txt -n OpenOffice_org-kde4
%defattr(-,root,root)
%endif

%files -f files-mailmerge.txt -n OpenOffice_org-mailmerge
%defattr(-,root,root)

%files -n OpenOffice_org-base-drivers-postgresql
%defattr(-,root,root)
%dir %ooo_prefix/%ooo_home
%dir %ooo_prefix/%ooo_home/share
%dir %ooo_prefix/%ooo_home/share/extension
%dir %ooo_prefix/%ooo_home/share/extension/install
%ooo_prefix/%ooo_home/share/extension/install/postgresql-sdbc-%postgresql_version.zip

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

%changelog