File unoconv.spec of Package unoconv
#
# spec file for package unoconv
#
# Copyright (c) 2015 SUSE LINUX 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/
#
Name: unoconv
Version: 0.7
Release: 0
Summary: Tool to convert between any document format supported by LibreOffice
License: GPL-2.0
Group: Productivity/File utilities
Url: http://dag.wieers.com/home-made/unoconv/
Source: http://dag.wieers.com/home-made/unoconv/unoconv-%{version}.tar.gz
%if 0%{?suse_version} >= 1315
# PATCH-FIX-UPSTREAM unoconv-python3.patch dimstar@opensuse.org -- Port to python3, patch from Fedora
Patch0: python3-added-compatibility.patch
Requires: python >= 3.0
%endif
Patch1: make-LaTeX-export-usable-with-writer2latex-ext.patch
Patch2: libreoffice-or-OO.o-has-never-had-wps-export.patch
Patch3: remove-export-formats-dropped-by-LibreOffice.patch
Patch4: Updated-ChangeLog.patch
Requires: libreoffice-pyuno
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
unoconv converts between any document format that LibreOffice understands.
It uses LibreOffice's UNO bindings for non-interactive conversion of
documents.
Supported document formats include: Open Document Text (.odt),
Open Document Draw (.odd), Open Document Presentation (.odp),
Open Document calc (.odc), MS Word (.doc), MS PowerPoint (.pps/.ppt),
MS Excel (.xls), MS Office Open/OOXML (.xml),
Portable Document Format (.pdf), DocBook (.xml), LaTeX (.ltx),
HTML, XHTML, RTF, Docbook (.xml), GIF, PNG, JPG, SVG, BMP, EPS
and many more...
%prep
%setup -q
%if 0%{?suse_version} >= 1315
%patch0 -p1
%endif
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
# rpmlint: fix incorrect-fsf-address
find . -type f | xargs sed -i -e 's:59 Temple Place\, Suite 330\, Boston\, MA 02111-1307 USA:51 Franklin Street\, Fifth Floor\, Boston\, MA 02110-1301 USA:g'
find . -type f | xargs sed -i -e 's:59 Temple Place - Suite 330\, Boston\, MA 02111-1307\, USA:51 Franklin Street\, Fifth Floor\, Boston\, MA 02110-1301 USA:g'
%build
%install
make DESTDIR=%{buildroot} install
make DESTDIR=%{buildroot} install-links
rm -v %{buildroot}%{_bindir}/odt2txt
%files
%defattr(-, root, root, 0755)
%doc AUTHORS ChangeLog COPYING README.adoc doc/*.adoc
%doc %{_mandir}/man1/unoconv.1*
%{_bindir}/*
%changelog