File libreoffice-templates-presentation-layouts.spec of Package libreoffice-templates-presentation-layouts

# spec file for package libreoffice-templates-presentation-layouts
# Copyright (c) 2012 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

Name:           libreoffice-templates-presentation-layouts
%if %suse_version > 1000
Supplements:    libreoffice
Supplements:    OpenOffice_org
# compat stuff
Provides:       OpenOffice_org-templates-presentation-layouts = %version
Obsoletes:      OpenOffice_org-templates-presentation-layouts <= %version
Version:        3.3
Release:        0
Summary:        Presentation Layout Templates for LibreOffice
License:        BSD-4-Clause and LGPL-2.1+
Group:          Productivity/Office/Suite
Source0:        ooo-templates-presentation-layouts-2.0.4.tar.bz2
Source1:        Sun_ODF_Template_Pack_en-US-layout.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

This package contains a collection of presentation layout templates for

%setup -c -q -b1
# update the Sun templates dir
mv $sun_dir/LICENSE $sun_dir/LICENSE.$sun_name
# generate README about Sun templates
cat >$sun_dir/README.$sun_name <<EOF
The following list of templates comes from the Sun_ODF_Template_Pack_en-US.oxt
that is originaly available at
See LICENSE.$sun_name for more details.
echo >>$sun_dir/README.$sun_name
find $sun_dir/template -type f | sed "s|$sun_dir/template/||" >>$sun_dir/README.$sun_name


install -m 755 -d $RPM_BUILD_ROOT/usr/share/templates/libreoffice/
cp -a ooo-templates-presentation-layouts-*/common $RPM_BUILD_ROOT/usr/share/templates/libreoffice/
cp -a Sun_ODF_Template_Pack_en-US-layout/template/* $RPM_BUILD_ROOT/usr/share/templates/libreoffice/common
# compat stuff
install -m 755 -d $RPM_BUILD_ROOT/usr/share/templates/ooo/
for dir in `find $RPM_BUILD_ROOT/usr/share/templates/libreoffice/ -type d -printf "%%P \n"` ; do
    echo "~$RPM_BUILD_ROOT/usr/share/templates/ooo/$dir~"
    mkdir -p $RPM_BUILD_ROOT/usr/share/templates/ooo/$dir
for file in `find $RPM_BUILD_ROOT/usr/share/templates/libreoffice/ -type f -printf "%%P "` ; do
    ln -sf /usr/share/templates/libreoffice/$file $RPM_BUILD_ROOT/usr/share/templates/ooo/$file


%defattr(-, root, root)
%doc ooo-templates-presentation-layouts-*/README.txt Sun*/{README.*,LICENSE.*}

openSUSE Build Service is sponsored by