File catdoc.spec of Package catdoc.6985

#
# spec file for package catdoc
#
# Copyright (c) 2017 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:           catdoc
Version:        0.95
Release:        0
Summary:        Decodes MS Word files into plain text or TeX format
License:        GPL-2.0+
Group:          Productivity/Publishing/Other
Url:            http://www.wagner.pp.ru/~vitus/software/catdoc/
Source:         http://ftp.wagner.pp.ru/pub/catdoc/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE dont_build_xls2csv.patch -- xls2csv is provided by two other packages, so we don't need it built
Patch1:         dont_build_xls2csv.patch
Patch2:         CVE-2017-11110.patch
BuildRequires:  freetype2-devel
BuildRequires:  tcl
BuildRequires:  tk
BuildRequires:  update-desktop-files

%description
Catdoc is a MS Word file decoding tool that doesn't attempt to
analyze file formatting (it just extracts readable text), but
is able to handle all versions of Word and convert character
encodings. A Tcl/Tk graphical viewer is also included. It can
also read RTF files and convert Excel and PowerPoint files.

%prep
%setup -q
%patch1 -p1
%patch2 -p1

%build
export CXXFLAGS="$CXXFLAGS %{optflags}"
export CFLAGS="$CFLAGS %{optflags}"
%configure
make %{?_smp_mflags}

%install
make installroot=%{buildroot} install
mkdir -p %{buildroot}%{_datadir}/man
mkdir -p %{buildroot}%{_mandir}/man1
mv $RPM_BUILD_DIR/%{name}-%{version}/doc/*.1 %{buildroot}%{_mandir}/man1/

%files
%doc COPYING NEWS README TODO
%{_mandir}/man1/*
# Conflicts with xls2csv package
%exclude %{_mandir}/man1/xls2csv*
%{_bindir}/catdoc
%{_bindir}/catppt
%{_bindir}/wordview
%dir %{_datadir}/catdoc
%{_datadir}/catdoc/*.txt
%{_datadir}/catdoc/*.*chars

%changelog
openSUSE Build Service is sponsored by