File OpenOffice_org-l10n-extras.spec of Package OpenOffice_org-l10n-extras

#
# spec file for package OpenOffice_org-l10n-extras (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-l10n-extras
Version:        3.1.1.4
Release:        1.<RELEASE1>
%define         ooo_build_version 3.1.1.4
%define         piece      extras
#!BuildIgnore:  OpenOffice_org
BuildRequires:  java-devel unzip zip
BuildRequires:  OpenOffice_org-artwork-devel = %version
BuildRequires:  OpenOffice_org-libs-core-devel = %version
%define	      ooo_prefix	%_libdir
%define	      ooo_home		ooo3
%define	      ooo_basis_dir	basis3.1
%define	      ooo_build_tag     ooo310-m19
License:        Artistic License .. ; BSD 3-clause (or similar) ; GPL v2 or later ; LPPL .. ; LGPL v2.1 or later ; LGPL v3 only ; MPL .. ; MIT License (or similar)
Group:          Productivity/Office/Suite
AutoReqProv:    on
PreReq:         OpenOffice_org-ure = %version
Requires:       OpenOffice_org = %version
Summary:        OpenOffice.org Extras
Url:            http://www.openoffice.org/
Source0:        %ooo_build_tag-%piece.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
#!ExclusiveArch:  %ix86 x86_64 ppc
BuildArch:      noarch

%description
This package provides the ususal OpenOffice.org extra stuff, for
example autocorrection definitions, a letter wizard, a basic gallery.



%package devel
PreReq:         OpenOffice_org-ure = %version
Requires:       %name = %version
Requires:       OpenOffice_org-libs-core-devel = %version
License:        Artistic License .. ; BSD 3-clause (or similar) ; GPL v2 or later ; LPPL .. ; LGPL v2.1 or later ; LGPL v3 only ; MPL .. ; MIT License (or similar)
Summary:        OpenOffice.org Extras
Group:          Productivity/Office/Suite
AutoReqProv:    off

%description devel
This package provides localizations of the basic stuff used by the
OpenOffice.org development.



%package prebuilt
PreReq:         OpenOffice_org-ure = %version
License:        Artistic License .. ; BSD 3-clause (or similar) ; GPL v2 or later ; LPPL .. ; LGPL v2.1 or later ; LGPL v3 only ; MPL .. ; MIT License (or similar)
Summary:        Prebuilt OpenOffice.org Extras Localizations
Group:          Productivity/Office/Suite
AutoReqProv:    off

%description prebuilt
This package includes the prebuilt localization of OpenOffice.org
Extras. 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 OpenOffice.org localizations separately.



%prep
%setup -q -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}"
$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
$OO_TOOLSDIR/piece/install-generic %piece %ooo_build_tag
# 
# FIXME: fast hack to solve a customer issue, n#364523 
#        we need a more generic solution 
ln -sf acor_fr-FR.dat $RPM_BUILD_ROOT%_datadir/%ooo_home/%ooo_basis_dir/share/autocorr/acor_fr-CA.dat
echo "%_datadir/%ooo_home/%ooo_basis_dir/share/autocorr/acor_fr-CA.dat" \
    >>$RPM_BUILD_ROOT%_datadir/%ooo_home/files-extras.txt
# 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
# main

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

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

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

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

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

%postun prebuilt
test "$1" = "0" && %_datadir/%ooo_home/link-to-ooo-home --unlink %_datadir/%ooo_home/files-%piece-prebuilt.txt.postun || true
rm -f %_datadir/%ooo_home/files-%piece-prebuilt.txt.postun 2>/dev/null
# 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.txt
%defattr(-,root,root)
# FIXME: fast hack to solve a customer issue, n#364523 
%_datadir/%ooo_home/%ooo_basis_dir/share/autocorr/acor_fr-CA.dat

%files -f files-%piece-prebuilt.txt prebuilt
%defattr(-,root,root)
%dir %_datadir/%ooo_home
%dir %_datadir/%ooo_home/solver

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

%changelog
openSUSE Build Service is sponsored by