File libreoffice-help-group2.spec of Package libreoffice-help-group2.import5253

#
# spec file for package libreoffice-help-group2
#
# 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-help-group2
###################################################################
## DO NOT EDIT THIS SPEC FILE
## Generated by:
## perl lo-help-gen-spec libreoffice-help-groupX.spec.in lo-help-groupX
###################################################################
Version:        3.4.2.6
Release:        2.<RELEASE2>
%define         piece             help
%define         lo_build_version 3.4.2.6
%define         lo_piece_version 3.4.2.6
%define         lo_sourcedirname libreoffice-build-%lo_piece_version
%define         lo_home          libreoffice
%define         lo_basis_dir     basis3.4
# test_build_langs:   	   1 = de and cs
#			   2 = all supported languages 
%define		test_build_langs 	2
# build_module_in_parallel 0 = no
#			   1 = yes (the number is defined be the number of cpus)
#			   2,3,4... = yes (force the number of modules to be built in parallel)
%define		build_module_in_parallel	1
# prepare_build:	   0 = no
#			   1 = yes (just build, install and create packages; without %%prep section and configure)
%define		prepare_build 		1
#
%if %test_build_langs == 0
%define       lo_langs		""
%else
%if %test_build_langs == 1
%define       lo_langs		""
%else
%define       lo_langs		"en-ZA es et fr gl"
%endif
%endif
#!BuildIgnore:  libreoffice
# both zip and perl-Archive-Zip are needed; tested with ooo320-m3, 2009-10-22
BuildRequires:  ant ant-apache-regexp bison boost-devel db-devel flac-devel flex freetype2-devel gcc-c++ gperf icu java-devel libcppunit-devel libexpat-devel libicu-devel libxml2-devel libxslt-devel openssl-devel perl-Archive-Zip perl-Compress-Zlib pkg-config python-devel unzip xorg-x11-devel zip
%if 0%{?suse_version} == 01010
# is not required by Java SDKs by mistake on SLED10
BuildRequires:  update-alternatives
%endif
License:        LGPLv3
Group:          Productivity/Office/Suite
AutoReqProv:    on
# compat stuff
Provides:       OpenOffice_org-help-group2 = %version
Obsoletes:      OpenOffice_org-help-group2 <= %version
Summary:        LibreOffice Help Development
Url:            http://www.documentfoundation.org/
Source0:        libreoffice-bootstrap-%version.tar.bz2
Source1:        libreoffice-artwork-%version.tar.bz2
Source2:        libreoffice-help-%version.tar.bz2
Source3:        libreoffice-libs-core-%version.tar.bz2
Source4:        libreoffice-libs-extern-sys-%version.tar.bz2
Source5:        libreoffice-libs-extern-%version.tar.bz2
Source6:        libreoffice-libs-gui-%version.tar.bz2
Source7:        libreoffice-testing-%version.tar.bz2
Source8:        libreoffice-translations-%version.tar.bz2
Source9:        libreoffice-ure-%version.tar.bz2
# SUSE config files
Source100:      SUSE.conf
Source101:      SUSE-10.1.conf
Source102:      SUSE-11.1.conf
Source103:      SUSE-11.2.conf
Source104:      SUSE-11.3.conf
Source105:      SUSE-11.4.conf
# helper stuff to produce pieces of the spec file
Source200:      libreoffice-help-groupX.spec.in
Source201:      lo-help-gen-spec
Source202:      lo-help-groupX
#
Patch0:         libreoffice-configure-typo-fontconfig.diff
# OBJEXT variable was not set correctly if AC_PROC_CC was not called early
# I think that it worked only by chance when there was checks for more system librarires
Patch1:         libreoffice-cc-detection.diff
# it created 3.8GB build log; Build Service refused to build such package
Patch2:         translations-no-warnigns-from-po2oo.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
#!ExclusiveArch:  %ix86 x86_64 ppc
BuildArch:      noarch

%description
This package provides files related to the LibreOffice help
development.


%if %test_build_langs >= 2

%package -n libreoffice-help-en-ZA
License:        LGPLv3
Summary:        South Africa English Help Localization for LibreOffice
Group:          Productivity/Office/Suite
Provides:       locale(libreoffice:en_ZA)
PreReq:         libreoffice = %version
%if 0%{?suse_version}
Supplements:    libreoffice-l10n-en-ZA
%endif
# compat stuff
Provides:       OpenOffice_org-help-en-ZA = %version
Obsoletes:      OpenOffice_org-help-en-ZA <= %version
Provides:       OpenOffice_org-en-ZA:%_prefix/ooo-2.0/help/en-ZA/default.css

%description -n libreoffice-help-en-ZA
South Africa English help localization for LibreOffice. The other localized stuff
is in libreoffice-l10n-en-ZA.



%package -n libreoffice-help-es
License:        LGPLv3
Summary:        Spanish Help Localization for LibreOffice
Group:          Productivity/Office/Suite
Provides:       locale(libreoffice:es)
PreReq:         libreoffice = %version
%if 0%{?suse_version}
Supplements:    libreoffice-l10n-es
%endif
# compat stuff
Provides:       OpenOffice_org-help-es = %version
Obsoletes:      OpenOffice_org-help-es <= %version
Provides:       OpenOffice_org-es:%_prefix/ooo-2.0/help/es/default.css

%description -n libreoffice-help-es
Spanish help localization for LibreOffice. The other localized stuff
is in libreoffice-l10n-es.



%package -n libreoffice-help-et
License:        LGPLv3
Summary:        Estonian Help Localization for LibreOffice
Group:          Productivity/Office/Suite
Provides:       locale(libreoffice:et)
PreReq:         libreoffice = %version
%if 0%{?suse_version}
Supplements:    libreoffice-l10n-et
%endif
# compat stuff
Provides:       OpenOffice_org-help-et = %version
Obsoletes:      OpenOffice_org-help-et <= %version
Provides:       OpenOffice_org-et:%_prefix/ooo-2.0/help/et/default.css

%description -n libreoffice-help-et
Estonian help localization for LibreOffice. The other localized stuff
is in libreoffice-l10n-et.



%package -n libreoffice-help-fr
License:        LGPLv3
Summary:        French Help Localization for LibreOffice
Group:          Productivity/Office/Suite
Provides:       locale(libreoffice:fr)
PreReq:         libreoffice = %version
%if 0%{?suse_version}
Supplements:    libreoffice-l10n-fr
%endif
# compat stuff
Provides:       OpenOffice_org-help-fr = %version
Obsoletes:      OpenOffice_org-help-fr <= %version
Provides:       OpenOffice_org-fr:%_prefix/ooo-2.0/help/fr/default.css

%description -n libreoffice-help-fr
French help localization for LibreOffice. The other localized stuff
is in libreoffice-l10n-fr.



%package -n libreoffice-help-gl
License:        LGPLv3
Summary:        Galician Help Localization for LibreOffice
Group:          Productivity/Office/Suite
Provides:       locale(libreoffice:gl)
PreReq:         libreoffice = %version
%if 0%{?suse_version}
Supplements:    libreoffice-l10n-gl
%endif
# compat stuff
Provides:       OpenOffice_org-help-gl = %version
Obsoletes:      OpenOffice_org-help-gl <= %version
Provides:       OpenOffice_org-gl:%_prefix/ooo-2.0/help/gl/default.css

%description -n libreoffice-help-gl
Galician help localization for LibreOffice. The other localized stuff
is in libreoffice-l10n-gl.


%endif

%prep
%if %prepare_build == 0
%setup -D -T -q -n libreoffice-bootstrap-%version
%else
%setup -q -n libreoffice-bootstrap-%version
bin/unpack-sources `pwd` \
     %{S:1}  %{S:2}  %{S:3}  %{S:4}  %{S:5} \
     %{S:6}  %{S:7}  %{S:8}  %{S:9}
# SUSE config files
cp %{S:100} %{S:101} %{S:102} %{S:103} %{S:104} %{S:105} distro-configs
# extra fixes
%patch0
%patch1
%patch2
%endif

%build
%if %prepare_build != 0
#
# Parallel build settings ...
# parallel build of modules; it makes sense on machines with more CPUs
PARALLEL_BUILD="-P`grep ^processor /proc/cpuinfo | wc -l`"
# parallel build for files per module
if test -n "%{?jobs:%jobs}" -a -e "/opt/icecream/bin/gcc" -a -e "/opt/icecream/bin/g++" ; then
    PARALLEL_BUILD="$PARALLEL_BUILD -- -P%jobs"
fi
#
# Distro settings ...
%if 0%{?meego_version}
    with_distro="SUSE-11.1"
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01110
    suse_major_ver=$((%{?suse_version} / 100))
    suse_minor_ver=$((%{?suse_version} / 10 - $suse_major_ver * 10))
    with_distro="SUSE-$suse_major_ver.$suse_minor_ver"
%endif
%if 0%{?suse_version} > 01110 && 0%{?suse_version} <= 01120
    with_distro="SUSE-11.2"
%endif
%if 0%{?suse_version} > 01120
    with_distro="SUSE"
%endif
#
# disable KDE4 on openSUSE-11.1-Evergreen but not on SLED11
%define libkde4_devel_ver %(rpm -q --queryformat '%{VERSION}' libkde4-devel)
DISABLE_KDE4=
test "%{libkde4_devel_ver}" = "4.1.3" && DISABLE_KDE4="--disable-kde4"
%endif
# make sure that JAVA_HOME is set correctly
%if 0%{?suse_version}
source /etc/profile.d/alljava.sh
%endif
%if 0%{?meego_version}
export JAVA_HOME=%{java_home}
%endif
# use RPM_OPT_FLAGS, ...
export ARCH_FLAGS="`echo $RPM_OPT_FLAGS | sed -e 's/\-O[0-9s]//g' -e 's/\-fexceptions//g'` -fno-strict-aliasing"
# FIXME: genccode from the system icu is in /usr/sbin
export PATH="$PATH:/usr/sbin"
%if %prepare_build != 0
./autogen.sh \
        --with-external-tar="$RPM_SOURCE_DIR" \
	--with-arch-flags="$ARCH_FLAGS" \
	--libdir=%{_libdir} \
	--prefix=%{_prefix} \
	--mandir=%{_mandir} \
	--sysconfdir=/etc \
	--docdir=%{_docdir}/%{name} \
	--with-distro="$with_distro" \
	--without-git \
	--without-download \
	--with-lang=%lo_langs \
	--with-poor-help-localizations=%lo_poor_help_localizations \
	--with-jdk-home=$JAVA_HOME \
	--disable-cups \
	--disable-fontconfig \
	--without-junit \
        --without-system-jpeg \
        --disable-python \
        --disable-mozilla  \
        --disable-mono \
        --without-system-curl \
        --disable-ldap \
        --without-system-odbc \
        --without-system-mozilla \
        --without-system-neon \
        --without-system-hunspell \
        --without-system-lpsolve \
        --disable-gtk \
        --disable-kde \
        --disable-kde4 \
        --disable-gconf \
        --disable-gnome-vfs \
        --without-system-cairo \
        --disable-gstreamer \
        --disable-opengl \
        --without-system-poppler \
        --disable-evolution2
%endif
./bootstrap
. ./*[Ee]nv.[Ss]et.sh
cd helpcontent2
build --all $PARALLEL_BUILD

%install
. ./*Env.Set.sh
test -z %lo_langs && langs="en-US" || langs=%lo_langs
mkdir -p file-lists
for lang in $langs ; do
    test "$lang" = "en-US" && langdir="en" || langdir="$lang"
    mkdir -p $RPM_BUILD_ROOT/%_datadir/%lo_home/%lo_basis_dir/help/$langdir
    for pack in helpcontent2/$INPATH/bin/s*$lang.zip ; do
        unzip $pack -d $RPM_BUILD_ROOT/%_datadir/%lo_home/%lo_basis_dir/help/$langdir
    done
    lang_underscore=`echo $lang | sed "s/-/_/g"`
    filelist=help_${lang_underscore}_list.txt
    echo "%dir %_datadir/%lo_home"                     >file-lists/$filelist
    echo "%dir %_datadir/%lo_home/%lo_basis_dir"      >>file-lists/$filelist
    echo "%dir %_datadir/%lo_home/%lo_basis_dir/help" >>file-lists/$filelist
    find $RPM_BUILD_ROOT/%_datadir/%lo_home/%lo_basis_dir/help/$langdir -type d -printf "%%%%dir %_datadir/%lo_home/%lo_basis_dir/help/$langdir/%%P\n" >>file-lists/$filelist
    find $RPM_BUILD_ROOT/%_datadir/%lo_home/%lo_basis_dir/help/$langdir -type f -printf "%_datadir/%lo_home/%lo_basis_dir/help/$langdir/%%P\n"         >>file-lists/$filelist
    # the file list is needed to create compat symlinks
    cp file-lists/$filelist $RPM_BUILD_ROOT/%_datadir/%lo_home
    echo "%_datadir/%lo_home/$filelist" >>file-lists/$filelist
done

%clean
rm -rf $RPM_BUILD_ROOT

%if %test_build_langs >= 2
# en-ZA

%posttrans -n libreoffice-help-en-ZA
%_datadir/%lo_home/link-to-ooo-home %_datadir/%lo_home/help_en_ZA_list.txt || true

%preun -n libreoffice-help-en-ZA
test "$1" = "0" && cp %_datadir/%lo_home/help_en_ZA_list.txt %_datadir/%lo_home/help_en_ZA_list.txt.postun || true

%postun -n libreoffice-help-en-ZA
test "$1" = "0" && %_datadir/%lo_home/link-to-ooo-home --unlink %_datadir/%lo_home/help_en_ZA_list.txt.postun || true
rm -f %_datadir/%lo_home/help_en_ZA_list.txt.postun 2>/dev/null
# es

%posttrans -n libreoffice-help-es
%_datadir/%lo_home/link-to-ooo-home %_datadir/%lo_home/help_es_list.txt || true

%preun -n libreoffice-help-es
test "$1" = "0" && cp %_datadir/%lo_home/help_es_list.txt %_datadir/%lo_home/help_es_list.txt.postun || true

%postun -n libreoffice-help-es
test "$1" = "0" && %_datadir/%lo_home/link-to-ooo-home --unlink %_datadir/%lo_home/help_es_list.txt.postun || true
rm -f %_datadir/%lo_home/help_es_list.txt.postun 2>/dev/null
# et

%posttrans -n libreoffice-help-et
%_datadir/%lo_home/link-to-ooo-home %_datadir/%lo_home/help_et_list.txt || true

%preun -n libreoffice-help-et
test "$1" = "0" && cp %_datadir/%lo_home/help_et_list.txt %_datadir/%lo_home/help_et_list.txt.postun || true

%postun -n libreoffice-help-et
test "$1" = "0" && %_datadir/%lo_home/link-to-ooo-home --unlink %_datadir/%lo_home/help_et_list.txt.postun || true
rm -f %_datadir/%lo_home/help_et_list.txt.postun 2>/dev/null
# fr

%posttrans -n libreoffice-help-fr
%_datadir/%lo_home/link-to-ooo-home %_datadir/%lo_home/help_fr_list.txt || true

%preun -n libreoffice-help-fr
test "$1" = "0" && cp %_datadir/%lo_home/help_fr_list.txt %_datadir/%lo_home/help_fr_list.txt.postun || true

%postun -n libreoffice-help-fr
test "$1" = "0" && %_datadir/%lo_home/link-to-ooo-home --unlink %_datadir/%lo_home/help_fr_list.txt.postun || true
rm -f %_datadir/%lo_home/help_fr_list.txt.postun 2>/dev/null
# gl

%posttrans -n libreoffice-help-gl
%_datadir/%lo_home/link-to-ooo-home %_datadir/%lo_home/help_gl_list.txt || true

%preun -n libreoffice-help-gl
test "$1" = "0" && cp %_datadir/%lo_home/help_gl_list.txt %_datadir/%lo_home/help_gl_list.txt.postun || true

%postun -n libreoffice-help-gl
test "$1" = "0" && %_datadir/%lo_home/link-to-ooo-home --unlink %_datadir/%lo_home/help_gl_list.txt.postun || true
rm -f %_datadir/%lo_home/help_gl_list.txt.postun 2>/dev/null
%endif

%if %test_build_langs >= 2

%files -f file-lists/help_en_ZA_list.txt -n libreoffice-help-en-ZA
%defattr(-,root,root)

%files -f file-lists/help_es_list.txt -n libreoffice-help-es
%defattr(-,root,root)

%files -f file-lists/help_et_list.txt -n libreoffice-help-et
%defattr(-,root,root)

%files -f file-lists/help_fr_list.txt -n libreoffice-help-fr
%defattr(-,root,root)

%files -f file-lists/help_gl_list.txt -n libreoffice-help-gl
%defattr(-,root,root)
%endif

%changelog
openSUSE Build Service is sponsored by