File OpenOffice_org-help-en-US.spec of Package OpenOffice_org-help-en-US

#
# spec file for package OpenOffice_org-help-en-US (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-en-US
Version:        3.1.1.4
Release:        1.<RELEASE1>
%define         ooo_build_version 3.1.1.4
%define         piece      help
%define         ooo_langs		"en-US"
%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
Provides:       locale(OpenOffice_org:en_US)
Provides:       OpenOffice_org:%_prefix/ooo-2.0/help/en/default.css
PreReq:         OpenOffice_org-ure = %version
Supplements:    OpenOffice_org-l10n-en-US
Summary:        American Help Localization for OpenOffice.org
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-en-US.spec.in
Source101:      ooo-help-gen-spec
Source102:      ooo-help-en-US
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
#!ExclusiveArch:  %ix86 x86_64 ppc
BuildArch:      noarch

%description
American help localization for OpenOffice.org. The other localized
stuff is in OpenOffice.org-l10n-en-US.


%package devel
PreReq:         OpenOffice_org-ure = %version
License:        LGPL v3 only
Summary:        A Source Package for OpenOffice.org Help Localizations
Group:          Productivity/Office/Suite
AutoReqProv:    off
# Build Service does not like devel packages without the main package
Provides:       OpenOffice_org-help-devel = %version
Obsoletes:      OpenOffice_org-help-devel <= %version

%description devel
This source package is used to build OpenOffice.org help localizations.



%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"

%clean
rm -rf $RPM_BUILD_ROOT
# en-US

%posttrans -n OpenOffice_org-help-en-US
%_datadir/%ooo_home/link-to-ooo-home %_datadir/%ooo_home/files-help-en_US.txt || true

%preun -n OpenOffice_org-help-en-US
test "$1" = "0" && cp %_datadir/%ooo_home/files-help-en_US.txt %_datadir/%ooo_home/files-help-en_US.txt.postun || true

%postun -n OpenOffice_org-help-en-US
test "$1" = "0" && %_datadir/%ooo_home/link-to-ooo-home --unlink %_datadir/%ooo_home/files-help-en_US.txt.postun || true
rm -f %_datadir/%ooo_home/files-help-en_US.txt.postun 2>/dev/null

%files -f files-help-en_US.txt -n OpenOffice_org-help-en-US
%defattr(-,root,root)
# devel

%posttrans devel
%_datadir/%ooo_home/link-to-ooo-home %_datadir/%ooo_home/files-%piece-devel.txt || true

%preun devel
test "$1" = "0" && cp %_datadir/%ooo_home/files-%piece-devel.txt %_datadir/%ooo_home/files-%piece-devel.txt.postun || true

%postun devel
test "$1" = "0" && %_datadir/%ooo_home/link-to-ooo-home --unlink %_datadir/%ooo_home/files-%piece-devel.txt.postun || true
rm -f %_datadir/%ooo_home/files-%piece-devel.txt.postun 2>/dev/null

%files -f files-%piece-devel.txt devel
%defattr(-,root,root)

%changelog
openSUSE Build Service is sponsored by