File libreoffice-libs-gui.spec of Package libreoffice-libs-gui

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

%define         distro     SUSE

Name:           libreoffice-libs-gui
Version:        3.3.1.2
Release:        1.<RELEASE2>
%define         piece             libs-gui
%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-artwork-devel = %version
BuildRequires:  libreoffice-bootstrap = %version
BuildRequires:  libreoffice-libs-extern-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
# LO-3.3 fixed all most annoying KDE4-related bugs => time to enable KDE4 support for SLED11
BuildRequires:  libkde4-devel
%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:  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
############################
# cppunit stuff
%if 0%{?suse_version} >= 01100
BuildRequires:  libcppunit-devel
%endif
############################
# expat stuff
%if 0%{?suse_version} > 01100
# libexpat-devel is explicitely needed since openSUSE-11.1
BuildRequires:  libexpat-devel
%endif
%if 0%{?meego_version}
BuildRequires:  expat-devel
%endif
############################
# openSUSE 10.3 features
%if 0%{?suse_version} > 01020 || 0%{?meego_version}
BuildRequires:  libicu-devel
%endif
License:        Artistic ; BSD3c ; GPLv2+ ; LPPL .. ; LGPLv2.1+ ; LGPLv3 ; MPL .. ; MIT
Group:          Productivity/Office/Suite
AutoReqProv:    on
Requires:       libreoffice-ure = %version
Requires:       libreoffice-libs-extern = %version
# compat stuff
Provides:       OpenOffice_org-libs-gui = %version
Obsoletes:      OpenOffice_org-libs-gui <= %version
Summary:        LibreOffice GUI Libraries
Url:            http://www.documentfoundation.org/
Source0:        libreoffice-%piece-%ooo_piece_version.tar.bz2
Source1:        libreoffice-l10n-%ooo_piece_version.tar.bz2
# FIXME: hack the requires (bnc#444060)
# make sure external scripts are used
%define _use_internal_dependency_generator 0
%define __find_requires /bin/sh %_sourcedir/lo-libs-gui-req %name
Source101:      lo-libs-gui-req
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %ix86 x86_64 ppc

%description
This package provides the basic functionality for the LibreOffice
user interface.



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

%description devel
This package allows developement based on the LibreOffice graphics
user interface libraries API.



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

%description l10n-prebuilt
This package includes the prebuilt localization of LibreOffice
graphics user interface 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 LibreOffice localizations separately.



%prep
%setup -q -b1 -n libreoffice-%piece-%ooo_piece_version
# move l10n sources to the main build dir
mv ../libreoffice-l10n-%ooo_piece_version/* . && rmdir ../libreoffice-l10n-%ooo_piece_version

%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: -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
%if 0%{?suse_version}
export SUSE_ASNEEDED=0
%endif
%if 0%{?meego_version}
unset LD_AS_NEEDED
%endif
#FIXME: temporary hack because of dependency problem in toolkit
$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 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