LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File libreoffice-help-group2.spec of Package libreoffice-icon-themes (Project LibreOffice:Stable)

#
# spec file for package libreoffice-help-group2
#
# Copyright (c) 2013 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/
#


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:        4.1.5.3
Release:        0
%define         gnu_make_version  3.82
%define         gnu_make_snapshot 20120301
%define         zip_version       3.0
%define         lo_home           libreoffice
# test_build_langs:     1 = de and cs
#                       2 = all supported languages 
%define         test_build_langs  2
# debug_build:          0 = no
#                       1 = yes (enable depency tracking, ccache)
%define         debug_build       0
# 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          "el en-ZA es et eu fi fr"
%endif
%endif
#!BuildIgnore:  libreoffice
# both zip and perl-Archive-Zip are needed; tested with ooo320-m3, 2009-10-22
BuildRequires:  ant
BuildRequires:  ant-apache-regexp
BuildRequires:  automake
BuildRequires:  bison
BuildRequires:  boost-devel
BuildRequires:  db-devel
BuildRequires:  flac-devel
BuildRequires:  flex
BuildRequires:  freetype2-devel
BuildRequires:  gcc-c++
BuildRequires:  gperf
BuildRequires:  icu
BuildRequires:  java-devel >= 1.6
BuildRequires:  libcppunit-devel
BuildRequires:  libexpat-devel
BuildRequires:  libicu-devel
BuildRequires:  libxml2-devel
BuildRequires:  libxslt-devel
BuildRequires:  openssl-devel
BuildRequires:  perl-Archive-Zip
BuildRequires:  perl-Compress-Zlib
BuildRequires:  pkg-config
BuildRequires:  procps
BuildRequires:  unzip
BuildRequires:  xorg-x11-devel
BuildRequires:  xz
BuildRequires:  zip
%if 0%{?suse_version} == 01010
# is not required by Java SDKs by mistake on SLED10
BuildRequires:  update-alternatives
%endif
# compat stuff
Provides:       OpenOffice_org-help-group2 = %version
Obsoletes:      OpenOffice_org-help-group2 <= %version
Summary:        LibreOffice Help Development
License:        LGPL-3.0
Group:          Productivity/Office/Suite
Url:            http://www.documentfoundation.org/
Source0:        libreoffice-%version.tar.xz
Source1:        libreoffice-help-%version.tar.xz
Source2:        libreoffice-translations-%version.tar.xz
Source10:       build_prepare.inc
# make-3.82 is needed for parallel build
# this version extends plain make-3.82 with --warn-undefined-functions option
# URL: http://cgit.freedesktop.org/libreoffice/contrib/dev-tools/tree/make-3.82-gbuild, snapshot 2011-08-17
Source30:       make-%gnu_make_version-gbuild-%gnu_make_snapshot.tar.bz2
# zip-3.0 or newer is required because of the --filesync feature
Source31:       zip-%zip_version.tar.bz2
# 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:         split-help-buildhack-no-vcl.diff
#
# Patches against zip-3.0
Patch2000:      zip-3.0-iso8859_2.patch
Patch2001:      zip-3.0-add_options_to_help.patch
Patch2002:      zip-3.0-nonexec-stack.patch
Patch2003:      zip-3.0-optflags.patch
Patch2004:      zip-3.0-tempfile.patch
Patch2005:      zip-notimestamp.patch
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-el
Summary:        Greek Help Localization for LibreOffice
Group:          Productivity/Office/Suite
Provides:       locale(libreoffice:el)
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice = %{version}
# compat stuff
Provides:       OpenOffice_org-help-el = %version
Obsoletes:      OpenOffice_org-help-el <= %version
Provides:       OpenOffice_org-el:%_prefix/ooo-2.0/help/el/default.css

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

%package -n libreoffice-help-en-ZA
Summary:        South Africa English Help Localization for LibreOffice
Group:          Productivity/Office/Suite
Provides:       locale(libreoffice:en_ZA)
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice = %{version}
# 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
Summary:        Spanish Help Localization for LibreOffice
Group:          Productivity/Office/Suite
Provides:       locale(libreoffice:es)
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice = %{version}
# 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
Summary:        Estonian Help Localization for LibreOffice
Group:          Productivity/Office/Suite
Provides:       locale(libreoffice:et)
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice = %{version}
# 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-eu
Summary:        Basque Help Localization for LibreOffice
Group:          Productivity/Office/Suite
Provides:       locale(libreoffice:eu)
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice = %{version}
# compat stuff
Provides:       OpenOffice_org-help-eu = %version
Obsoletes:      OpenOffice_org-help-eu <= %version
Provides:       OpenOffice_org-eu:%_prefix/ooo-2.0/help/eu/default.css

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

%package -n libreoffice-help-fi
Summary:        Finnish Help Localization for LibreOffice
Group:          Productivity/Office/Suite
Provides:       locale(libreoffice:fi)
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice = %{version}
# compat stuff
Provides:       OpenOffice_org-help-fi = %version
Obsoletes:      OpenOffice_org-help-fi <= %version
Provides:       OpenOffice_org-fi:%_prefix/ooo-2.0/help/fi/default.css

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

%package -n libreoffice-help-fr
Summary:        French Help Localization for LibreOffice
Group:          Productivity/Office/Suite
Provides:       locale(libreoffice:fr)
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice = %{version}
# 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.

%endif

%prep
%if %prepare_build == 0
%setup -D -T -q -n libreoffice-%version
%else
%setup -q -a30 -a31 -b1 -b2 -n libreoffice-%version
#
# patch zip-3.0
%if %suse_version < 1140
tar -xjf %{S:31}
cd zip30
%patch2000
%patch2001
%patch2002
%patch2003
%patch2004
%patch2005
cd -
%endif
%endif
%patch0 -p1

%build
%{expand:%(cat %_sourcedir/build_prepare.inc)}
# hack to pass configure check for python; it is not really needed to build the help
export PYTHON_FOR_BUILD=no
%if %prepare_build != 0
./autogen.sh $PARALLEL_BUILD \
        --libdir=%{_libdir} \
        --prefix=%{_prefix} \
        --mandir=%{_mandir} \
        --sysconfdir=/etc \
        --docdir=%{_docdir}/%{name} \
        --with-vendor=SUSE \
        --with-lang=%lo_langs \
        --disable-fetch-external \
        --with-external-tar="$RPM_SOURCE_DIR" \
        --with-alloc=system \
        --with-jdk-home=$JAVA_HOME \
        --with-ant-home=/usr/share/ant \
        --without-fonts \
        --without-myspell-dicts \
        --disable-kde \
        --disable-kde4 \
        --disable-gtk \
        --disable-gconf \
        --disable-gnome-vfs \
        --disable-evolution2 \
        --disable-gstreamer \
        --disable-opengl \
        --disable-dbus \
        --disable-gstreamer-0-10 \
        --disable-python \
        --disable-odk \
        --without-junit \
%if %debug_build == 0
        --disable-ccache \
%endif
%if %suse_version < 1210
        --without-system-icu \
%endif
        --disable-postgresql-sdbc \
        --disable-cups \
        --with-system-dicts \
        --with-system-libxml \
        --with-system-openssl \
        --with-system-cppunit \
        --with-system-expat \
        --with-system-boost \
        --without-system-jpeg
%endif
# build helpcontent2 module and all its pre-requisites
make helpcompiler.all
make xmlhelp.all
make helpcontent2.all
make l10ntools.all
make helpcontent2

%install
sed '/SOLARVER/!d' config_host.mk > "${RPM_BUILD_ROOT}/config_host.mk.parsed"
sed '/INPATH/!d' config_host.mk >> "${RPM_BUILD_ROOT}/config_host.mk.parsed"
. "${RPM_BUILD_ROOT}/config_host.mk.parsed"
rm -rf "${RPM_BUILD_ROOT}/config_host.mk.parsed"
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/help/$langdir
    for dir in workdir/$INPATH/HelpTarget/*; do
        cp -r $dir/$lang/s* $RPM_BUILD_ROOT/%_datadir/%lo_home/help/$langdir
    done
    # copy also html and css
    cp -r workdir/$INPATH/HelpTarget/shared/$lang/*.{html,css} $RPM_BUILD_ROOT/%_datadir/%lo_home/help/$langdir
    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/help" >>file-lists/$filelist
    find $RPM_BUILD_ROOT/%_datadir/%lo_home/help/$langdir -type d -printf "%%%%dir %_datadir/%lo_home/help/$langdir/%%P\n" >>file-lists/$filelist
    find $RPM_BUILD_ROOT/%_datadir/%lo_home/help/$langdir -type f -printf "%_datadir/%lo_home/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
# el

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

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

%postun -n libreoffice-help-el
test "$1" = "0" && %_datadir/%lo_home/link-to-ooo-home --unlink %_datadir/%lo_home/help_el_list.txt.postun || true
rm -f %_datadir/%lo_home/help_el_list.txt.postun 2>/dev/null
# 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
# eu

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

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

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

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

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

%postun -n libreoffice-help-fi
test "$1" = "0" && %_datadir/%lo_home/link-to-ooo-home --unlink %_datadir/%lo_home/help_fi_list.txt.postun || true
rm -f %_datadir/%lo_home/help_fi_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
%endif

%if %test_build_langs >= 2
%files -f file-lists/help_el_list.txt -n libreoffice-help-el
%defattr(-,root,root)

%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_eu_list.txt -n libreoffice-help-eu
%defattr(-,root,root)

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

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

%endif

%changelog