File libreoffice-converter.spec of Package libreoffice-converter

#
# spec file for package libreoffice-converter
#
# Copyright (c) 2011 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:           libreoffice-converter
%define	      	ooo_home	libreoffice
Version:        3.3
Release:        1.<RELEASE4>
License:        LGPLv2.1+
Group:          Productivity/Office/Other
AutoReqProv:    on
Requires:       libreoffice-pyuno >= 2.99
Requires:       procps
# compat stuff
Provides:       OpenOffice_org-converter = %version
Obsoletes:      OpenOffice_org-converter <= %version
Summary:        Commandline Document Converter Using LibreOffice
Url:            http://www.artofsolving.com/files/DocumentConverter.py
Source0:        DocumentConverter.py
Source1:        loconvert
Source2:        loconvert.1
Patch0:         DocumentConverter.py-more-types.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
This package includes a simple script ooconvert that can be used to
convert various document file formats on the commandline. It uses
OpenOffice.org that guarantees the quality and the variety of available
document file formats.



%prep
%setup -c -T
cp %{S:0} %{S:1} %{S:2} .
%patch0

%build

%install
install -m 755 -d $RPM_BUILD_ROOT%_datadir/%ooo_home/program
install -m 755 -d $RPM_BUILD_ROOT%_bindir
install -m 755 -d $RPM_BUILD_ROOT%_mandir/man1
install -m 644 DocumentConverter.py $RPM_BUILD_ROOT%_datadir/%ooo_home/program
install -m 755 loconvert $RPM_BUILD_ROOT%_bindir
install -m 644 loconvert.1 $RPM_BUILD_ROOT%_mandir/man1
# compat stuff
ln -sf loconvert $RPM_BUILD_ROOT%_bindir/ooconvert
echo ".so man1/loconvert.1" >| $RPM_BUILD_ROOT%_mandir/man1/ooconvert.1

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%dir %_datadir/%ooo_home
%dir %_datadir/%ooo_home/program
%_datadir/%ooo_home/program/*
%_bindir/*
%_mandir/man1/*

%changelog
openSUSE Build Service is sponsored by