File OpenOffice_org-templates-labels.spec of Package OpenOffice_org-templates-labels

#
# spec file for package OpenOffice_org-templates-labels (Version 1.0)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           OpenOffice_org-templates-labels
License:        GPL v2 or later
Group:          Productivity/Office/Suite
AutoReqProv:    on
Version:        1.0
Release:        2
Summary:        Label Templates for OpenOffice.org
Url:            http://sourceforge.net/projects/ooolabels
Source:         OOoLabel-Templates-20061106.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
This source package includes a collection of label templates for
OpenOffice.org.



%package a4
License:        GPL v2 or later
Version:        1.0
Release:        5
Group:          Productivity/Office/Suite
Summary:        A4 Size Label Templates for OpenOffice.org
%if %suse_version > 1000
Supplements:    OpenOffice_org
%endif

%description a4
A collection of A4 size label templates for OpenOffice.org. They are
intended for Europe and Asia.



%package letter
License:        GPL v2 or later
Version:        1.0
Release:        5
Group:          Productivity/Office/Suite
Summary:        Letter Size Label Templates for OpenOffice.org
%if %suse_version > 1000
Supplements:    OpenOffice_org
%endif

%description letter
A collection of letter size label templates for OpenOffice.org. They
are intended for US.



%prep
%setup -c -q

%build

%install
install -m 755 -d $RPM_BUILD_ROOT/usr/share/templates/ooo2/common/labels/
cp -a Europe-Asia-a4-sizes-OOolabels/* $RPM_BUILD_ROOT/usr/share/templates/ooo2/common/labels/
cp -a USA-a5-sizes-OOolabels/* $RPM_BUILD_ROOT/usr/share/templates/ooo2/common/labels/
#
# move documentation
install -m 755 -d $RPM_BUILD_ROOT/%{_docdir}/%{name}-a4
install -m 755 -d $RPM_BUILD_ROOT/%{_docdir}/%{name}-letter
mv "$RPM_BUILD_ROOT/usr/share/templates/ooo2/common/labels/Europe-Asia-a4-Sizes-README.ott" $RPM_BUILD_ROOT/%{_docdir}/%{name}-a4
mv "$RPM_BUILD_ROOT/usr/share/templates/ooo2/common/labels/USA-sizes-A5-README-OOoLabels.ott" $RPM_BUILD_ROOT/%{_docdir}/%{name}-letter
mv "$RPM_BUILD_ROOT/usr/share/templates/ooo2/common/labels/Worldlabel.com Label Configurations.ods" $RPM_BUILD_ROOT/%{_docdir}/%{name}-letter
#
# create file lists
ls Europe-Asia-a4-sizes-OOolabels/* | \
    grep -v -e "Europe-Asia-a4-Sizes-README.ott" | \
    sed "s|^Europe-Asia-a4-sizes-OOolabels/\(.*\)$|\"/usr/share/templates/ooo2/common/labels/\1\"|" >a4.list
echo "%doc \"%{_docdir}/%{name}-a4/Europe-Asia-a4-Sizes-README.ott\"" >>a4.list
#
ls USA-a5-sizes-OOolabels/* | \
    grep -v -e "USA-sizes-A5-README-OOoLabels.ott" -e "Worldlabel.com Label Configurations.ods" | \
    sed "s|^USA-a5-sizes-OOolabels/\(.*\)$|\"/usr/share/templates/ooo2/common/labels/\1\"|" >letter.list
echo "%doc \"%{_docdir}/%{name}-letter/USA-sizes-A5-README-OOoLabels.ott\"" >>letter.list
echo "%doc \"%{_docdir}/%{name}-letter/Worldlabel.com Label Configurations.ods\"" >>letter.list
#
# README and COPYING
for file in README COPYING ; do
    cp -a $file $RPM_BUILD_ROOT/%{_docdir}/%{name}-a4/
    cp -a $file $RPM_BUILD_ROOT/%{_docdir}/%{name}-letter/
    echo "%doc \"%{_docdir}/%{name}-a4/$file\"" >>a4.list
    echo "%doc \"%{_docdir}/%{name}-letter/$file\"" >>letter.list
done

%clean
rm -rf $RPM_BUILD_ROOT

%files -f a4.list a4
%defattr(-, root, root)
%doc %dir %{_docdir}/%{name}-a4
%dir /usr/share/templates/ooo2/
%dir /usr/share/templates/ooo2/common/
%dir /usr/share/templates/ooo2/common/labels/

%files -f letter.list letter
%defattr(-, root, root)
%doc %dir %{_docdir}/%{name}-letter
%dir /usr/share/templates/
%dir /usr/share/templates/ooo2/
%dir /usr/share/templates/ooo2/common/
%dir /usr/share/templates/ooo2/common/labels/

%changelog
* Mon May 05 2008 ro@suse.de
- add Version and Release lines for subpackages as there is no
  main package built
* Wed Apr 25 2007 stbinner@suse.de
- fix build on SUSE Linux 10.0
* Mon Nov 06 2006 pmladek@suse.cz
- updated to snapshot 20061106:
  * use tables instead of frames for A4 lables; it solves many issues with
  adjusting them if there are printer alignment problems
  * better titles and file names
  * add README and COPYING files
* Mon Oct 23 2006 pmladek@suse.cz
- new package, version 1.0