File libreoffice-base.spec of Package libreoffice-base

# spec file for package libreoffice-base
# 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

# norootforbuild

Name:           libreoffice-base
Release:        1.<RELEASE2>
%define         piece             base
%define         ooo_build_version
%define         ooo_piece_version
%define         ooo_sourcedirname libreoffice-build-%ooo_piece_version
%define         ooo_prefix        %_libdir
%define         ooo_home          libreoffice
#!BuildIgnore:  libreoffice
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
%if 0%{?suse_version}
BuildRequires:  db-devel krb5 openldap2-devel update-desktop-files xorg-x11
%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:  libreoffice-testing = %version
BuildRequires:  libreoffice-artwork-devel = %version
BuildRequires:  libreoffice-components-devel = %version
BuildRequires:  libreoffice-libs-core-devel = %version
# KDE3 stuff
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
BuildRequires:  kdelibs3-devel
License:        LGPLv3
Group:          Productivity/Office/Suite
AutoReqProv:    on
Requires:       libreoffice = %version
%if 0%{?suse_version}
Supplements:    libreoffice
# base is not usable without java
%if 0%{?suse_version}
# the gcj is required by the main package on 10.2 and lower
%if 0%{?suse_version} > 01020
%ifarch %ix86 ppc
# the 32-bit build requires 32-bit JRE, bnc#222708
Recommends:     jre-32 >= 1.6
%if 0%{?suse_version} > 01110
# jre-32 is not provided by the preferred openjdk until openSUSE-11.2
Requires:       jre-32 > 1.5
# ---
%ifarch x86_64
Recommends:     jre-64 >= 1.6
%if 0%{?suse_version} > 01110
# jre-64 is not provided by the preferred openjdk until openSUSE-11.2
Requires:       jre-64 > 1.5
%if 0%{?meego_version}
Requires:       jre >= 1.5
# compat stuff
Provides:       OpenOffice_org-base = %version
Obsoletes:      OpenOffice_org-base <= %version
Summary:        LibreOffice Base
Source0:        libreoffice-%piece-%ooo_piece_version.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %ix86 x86_64 ppc

This module allows you to manage databases, create queries and reports
to track and manage your information by using LibreOffice office

%package devel
Requires:       %name = %version
Requires:       libreoffice-ure-devel
Requires:       libreoffice-libs-extern-devel
# compat stuff
Provides:       OpenOffice_org-base-devel = %version
Obsoletes:      OpenOffice_org-base-devel <= %version
License:        LGPLv3
Summary:        LibreOffice Base Development
Group:          Productivity/Office/Suite
AutoReqProv:    off

%description devel
This package allows developement based on the LibreOffice database
module API.

%package l10n-prebuilt
License:        LGPLv3
Summary:        Prebuilt LibreOffice Base Lolizations
Group:          Productivity/Office/Suite
AutoReqProv:    off
# compat stuff
Provides:       OpenOffice_org-base-l10n-prebuilt = %version
Obsoletes:      OpenOffice_org-base-l10n-prebuilt <= %version

%description l10n-prebuilt
This package includes the prebuilt localization of LibreOffice Base.
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.

%setup -q -n libreoffice-%piece-%ooo_piece_version

# setup env.
export OO_INSTDIR=%{_libdir}/%ooo_home
export OO_TOOLSDIR=$OO_INSTDIR/build/bin
export VERBOSE=1
export PIECE_USE_JOBS="%{?jobs:%jobs}"
# call more times to pass a random build error
$OO_TOOLSDIR/piece/build-generic %piece %ooo_sourcedirname || $OO_TOOLSDIR/piece/build-generic %piece %ooo_sourcedirname || $OO_TOOLSDIR/piece/build-generic %piece %ooo_sourcedirname || $OO_TOOLSDIR/piece/build-generic %piece %ooo_sourcedirname

# setup env.
export OO_INSTDIR=%{_libdir}/%ooo_home
export OO_TOOLSDIR=$OO_INSTDIR/build/bin
$OO_TOOLSDIR/piece/install-generic %piece %ooo_sourcedirname
%if 0%{?suse_version}
%suse_update_desktop_file base


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post devel

%postun devel

%files -f files-%piece.txt

%files devel
%dir %ooo_prefix/%ooo_home/solver
%exclude %ooo_prefix/%ooo_home/solver/noarch

%files l10n-prebuilt

openSUSE Build Service is sponsored by