File OpenOffice_org-help-group5.spec of Package OpenOffice_org-help-en-US
#
# spec file for package OpenOffice_org-help-group5 (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-help-group5
Version: 3.1.1.4
Release: 1.<RELEASE1>
%define ooo_build_version 3.1.1.4
%define piece help
# 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 ooo_langs ""
%else
%if %test_build_langs == 1
%define ooo_langs ""
%else
%define ooo_langs "pt-BR ru sl sv zh-CN zh-TW"
%endif
%endif
%define ooo_basis_dir basis3.1
%define ooo_home ooo3
#!BuildIgnore: OpenOffice_org
BuildRequires: java-devel unzip zip
BuildRequires: OpenOffice_org-artwork-devel = %version
BuildRequires: OpenOffice_org-libs-core-devel = %version
%if %suse_version == 1010
# is not required by Java SDKs by mistake on SLED10
BuildRequires: update-alternatives
%endif
%define ooo_prefix %_libdir
%define ooo_home ooo3
%define ooo_build_tag ooo310-m19
License: LGPL v3 only
Group: Productivity/Office/Suite
AutoReqProv: on
Summary: OpenOffice.org Help Development
Url: http://www.openoffice.org/
Source0: %ooo_build_tag-%piece.tar.bz2
Source1: ooo-sdf-%piece.tar.bz2
# helper stuff to produce pieces of the spec file
Source100: OpenOffice_org-help-groupX.spec.in
Source101: ooo-help-gen-spec
Source102: ooo-help-groupX
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#!ExclusiveArch: %ix86 x86_64 ppc
BuildArch: noarch
%description
This package provides files related to the OpenOffice.org help
development.
%if %test_build_langs >= 2
%package -n OpenOffice_org-help-pt-BR
License: LGPL v3 only
Summary: Brazilian Portuguese Help Localization for OpenOffice.org
Group: Productivity/Office/Suite
Provides: locale(OpenOffice_org:pt_BR)
Provides: OpenOffice_org-pt-BR:%_prefix/ooo-2.0/help/cs/default.css
PreReq: OpenOffice_org-ure = %version
Supplements: OpenOffice_org-l10n-pt-BR
%description -n OpenOffice_org-help-pt-BR
Brazilian Portuguese help localization for OpenOffice.org. The other localized stuff
is in OpenOffice.org-l10n-pt-BR.
%package -n OpenOffice_org-help-ru
License: LGPL v3 only
Summary: Russian Help Localization for OpenOffice.org
Group: Productivity/Office/Suite
Provides: locale(OpenOffice_org:ru)
Provides: OpenOffice_org-ru:%_prefix/ooo-2.0/help/cs/default.css
PreReq: OpenOffice_org-ure = %version
Supplements: OpenOffice_org-l10n-ru
%description -n OpenOffice_org-help-ru
Russian help localization for OpenOffice.org. The other localized stuff
is in OpenOffice.org-l10n-ru.
%package -n OpenOffice_org-help-sl
License: LGPL v3 only
Summary: Slovene Help Localization for OpenOffice.org
Group: Productivity/Office/Suite
Provides: locale(OpenOffice_org:sl)
Provides: OpenOffice_org-sl:%_prefix/ooo-2.0/help/cs/default.css
PreReq: OpenOffice_org-ure = %version
Supplements: OpenOffice_org-l10n-sl
%description -n OpenOffice_org-help-sl
Slovene help localization for OpenOffice.org. The other localized stuff
is in OpenOffice.org-l10n-sl.
%package -n OpenOffice_org-help-sv
License: LGPL v3 only
Summary: Swedish Help Localization for OpenOffice.org
Group: Productivity/Office/Suite
Provides: locale(OpenOffice_org:sv)
Provides: OpenOffice_org-sv:%_prefix/ooo-2.0/help/cs/default.css
PreReq: OpenOffice_org-ure = %version
Supplements: OpenOffice_org-l10n-sv
%description -n OpenOffice_org-help-sv
Swedish help localization for OpenOffice.org. The other localized stuff
is in OpenOffice.org-l10n-sv.
%package -n OpenOffice_org-help-zh-CN
License: LGPL v3 only
Summary: Chinese Simplified Help Localization for OpenOffice.org
Group: Productivity/Office/Suite
Provides: locale(OpenOffice_org:zh_CN)
Provides: OpenOffice_org-zh-CN:%_prefix/ooo-2.0/help/cs/default.css
PreReq: OpenOffice_org-ure = %version
Supplements: OpenOffice_org-l10n-zh-CN
%description -n OpenOffice_org-help-zh-CN
Chinese Simplified help localization for OpenOffice.org. The other localized stuff
is in OpenOffice.org-l10n-zh-CN.
%package -n OpenOffice_org-help-zh-TW
License: LGPL v3 only
Summary: Chinese Traditional Help Localization for OpenOffice.org
Group: Productivity/Office/Suite
Provides: locale(OpenOffice_org:zh_TW)
Provides: OpenOffice_org-zh-TW:%_prefix/ooo-2.0/help/cs/default.css
PreReq: OpenOffice_org-ure = %version
Supplements: OpenOffice_org-l10n-zh-TW
%description -n OpenOffice_org-help-zh-TW
Chinese Traditional help localization for OpenOffice.org. The other localized stuff
is in OpenOffice.org-l10n-zh-TW.
%endif
%prep
%setup -q -a1 -n %ooo_build_tag-%piece
%build
# setup env.
export OO_INSTDIR=%{_libdir}/%ooo_home
export OO_TOOLSDIR=$OO_INSTDIR/ooo-build/bin
export VERBOSE=1
# don't build help 8x since - well - it needs a shed load of memory.
export EXTRA_BUILD_FLAGS=%{?jobs:-P2}
export EXTRA_DMAKE_FLAGS="%{?jobs:-- -P2}"
# no help content in this package
export BUILD_HELP_SEPARATELY=YES
# this spec file is only for few selected localitions to speed the build in BS
export FORCE_OOO_LANGS=%ooo_langs
$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
# this spec file is only for few selected localitions to speed the build in BS
export FORCE_OOO_LANGS=%ooo_langs
$OO_TOOLSDIR/piece/install-generic %piece %ooo_build_tag
# prune redundant files the scp2 likes to make for us
rm -Rf \
"$DESTDIR/$OO_INSTDIR/basis-link" \
"$DESTDIR/$OO_INSTDIR/ure"
# prune devel files; they are packageg when building en-US help
rm -Rf \
"$DESTDIR/%{_datadir}/%ooo_home/files-help-prebuilt.txt" \
"$DESTDIR/%{_datadir}/%ooo_home/files-help-devel.txt" \
"$DESTDIR/%{_datadir}/%ooo_home/solver"
%clean
rm -rf $RPM_BUILD_ROOT
%if %test_build_langs >= 2
# pt-BR
%posttrans -n OpenOffice_org-help-pt-BR
%_datadir/%ooo_home/link-to-ooo-home %_datadir/%ooo_home/files-help-pt_BR.txt || true
%preun -n OpenOffice_org-help-pt-BR
test "$1" = "0" && cp %_datadir/%ooo_home/files-help-pt_BR.txt %_datadir/%ooo_home/files-help-pt_BR.txt.postun || true
%postun -n OpenOffice_org-help-pt-BR
test "$1" = "0" && %_datadir/%ooo_home/link-to-ooo-home --unlink %_datadir/%ooo_home/files-help-pt_BR.txt.postun || true
rm -f %_datadir/%ooo_home/files-help-pt_BR.txt.postun 2>/dev/null
# ru
%posttrans -n OpenOffice_org-help-ru
%_datadir/%ooo_home/link-to-ooo-home %_datadir/%ooo_home/files-help-ru.txt || true
%preun -n OpenOffice_org-help-ru
test "$1" = "0" && cp %_datadir/%ooo_home/files-help-ru.txt %_datadir/%ooo_home/files-help-ru.txt.postun || true
%postun -n OpenOffice_org-help-ru
test "$1" = "0" && %_datadir/%ooo_home/link-to-ooo-home --unlink %_datadir/%ooo_home/files-help-ru.txt.postun || true
rm -f %_datadir/%ooo_home/files-help-ru.txt.postun 2>/dev/null
# sl
%posttrans -n OpenOffice_org-help-sl
%_datadir/%ooo_home/link-to-ooo-home %_datadir/%ooo_home/files-help-sl.txt || true
%preun -n OpenOffice_org-help-sl
test "$1" = "0" && cp %_datadir/%ooo_home/files-help-sl.txt %_datadir/%ooo_home/files-help-sl.txt.postun || true
%postun -n OpenOffice_org-help-sl
test "$1" = "0" && %_datadir/%ooo_home/link-to-ooo-home --unlink %_datadir/%ooo_home/files-help-sl.txt.postun || true
rm -f %_datadir/%ooo_home/files-help-sl.txt.postun 2>/dev/null
# sv
%posttrans -n OpenOffice_org-help-sv
%_datadir/%ooo_home/link-to-ooo-home %_datadir/%ooo_home/files-help-sv.txt || true
%preun -n OpenOffice_org-help-sv
test "$1" = "0" && cp %_datadir/%ooo_home/files-help-sv.txt %_datadir/%ooo_home/files-help-sv.txt.postun || true
%postun -n OpenOffice_org-help-sv
test "$1" = "0" && %_datadir/%ooo_home/link-to-ooo-home --unlink %_datadir/%ooo_home/files-help-sv.txt.postun || true
rm -f %_datadir/%ooo_home/files-help-sv.txt.postun 2>/dev/null
# zh-CN
%posttrans -n OpenOffice_org-help-zh-CN
%_datadir/%ooo_home/link-to-ooo-home %_datadir/%ooo_home/files-help-zh_CN.txt || true
%preun -n OpenOffice_org-help-zh-CN
test "$1" = "0" && cp %_datadir/%ooo_home/files-help-zh_CN.txt %_datadir/%ooo_home/files-help-zh_CN.txt.postun || true
%postun -n OpenOffice_org-help-zh-CN
test "$1" = "0" && %_datadir/%ooo_home/link-to-ooo-home --unlink %_datadir/%ooo_home/files-help-zh_CN.txt.postun || true
rm -f %_datadir/%ooo_home/files-help-zh_CN.txt.postun 2>/dev/null
# zh-TW
%posttrans -n OpenOffice_org-help-zh-TW
%_datadir/%ooo_home/link-to-ooo-home %_datadir/%ooo_home/files-help-zh_TW.txt || true
%preun -n OpenOffice_org-help-zh-TW
test "$1" = "0" && cp %_datadir/%ooo_home/files-help-zh_TW.txt %_datadir/%ooo_home/files-help-zh_TW.txt.postun || true
%postun -n OpenOffice_org-help-zh-TW
test "$1" = "0" && %_datadir/%ooo_home/link-to-ooo-home --unlink %_datadir/%ooo_home/files-help-zh_TW.txt.postun || true
rm -f %_datadir/%ooo_home/files-help-zh_TW.txt.postun 2>/dev/null
%endif
%if %test_build_langs >= 2
%files -f files-help-pt_BR.txt -n OpenOffice_org-help-pt-BR
%defattr(-,root,root)
%files -f files-help-ru.txt -n OpenOffice_org-help-ru
%defattr(-,root,root)
%files -f files-help-sl.txt -n OpenOffice_org-help-sl
%defattr(-,root,root)
%files -f files-help-sv.txt -n OpenOffice_org-help-sv
%defattr(-,root,root)
%files -f files-help-zh_CN.txt -n OpenOffice_org-help-zh-CN
%defattr(-,root,root)
%files -f files-help-zh_TW.txt -n OpenOffice_org-help-zh-TW
%defattr(-,root,root)
%endif
%changelog