File xlhtml.spec of Package xlhtml

#
# spec file for package xlhtml
#
# 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 http://bugs.opensuse.org/
#

Name:           xlhtml
Version:        0.5
Release:        0
License:        GPL-2.0+
Summary:        Excel 95 and later file converter
Url:            http://chicago.sourceforge.net/xlhtml/
Group:          Productivity/Text/Convertors
Source0:        http://downloads.sourceforge.net/chicago/%{name}-%{version}.tgz
# PATCH-FIX-OPENSUSE xlhtml-0.5.patch -- Make cole a shared library and link xlhtml against it
Patch0:         xlhtml-0.5.patch
# PATCH-FIX-OPENSUSE xlhtml-0.5_header.patch bnc#338094 pgajdos@suse.cz -- Fix missing body and html tag
Patch1:         xlhtml-0.5_header.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
xlHtml is an Excel 95 and later file converter. Its html output can be
used as a Netscape Plug-in to let you view xls e-mail attachments. It
can also extract regions of a spreadsheet and convert the spreadsheet
to pure text rather than html.

The pptHtml program converts PowerPoint files to HTML.

%package -n libcole2
Summary:        Free C OLE library
Group:          System/Libraries
Obsoletes:      xlhtml-cole
Provides:       xlhtml-cole

%description -n libcole2
Using cole, you can access Microsoft "Structured Storage" files. The
most popular Microsoft programs generate "Structured Storage" files,
including the Microsoft suite for offices. StarDivision's suite
(StarOffice) generates "Structured Storage" files, too. FlashPix file
format is "Structured Storage", too.

%package -n libcole2-devel
Summary:        Development Files For COle
Group:          Development/Libraries/C and C++
Requires:       libcole2 = %{version}

%description -n libcole2-devel
Header and other files for building againist COle library.

%prep
%setup -q
%patch0
%patch1
mv ppthtml/ChangeLog ChangeLog-ppthtml
mv ppthtml/README README-ppthtml
mv ppthtml/THANKS THANKS-ppthtml
rm -rf xlhtml/contrib/CVS/
# Fix rpmlint warning doc-file-dependency
chmod 644 xlhtml/contrib/{xlv,convertXLS.cgi,uploader.pl,nsxlview,nsopen,excel2text}

%build
autoreconf -vif
%configure --with-pic --disable-static
make %{?_smp_mflags}

%install
%makeinstall

# Install cole files
install -pm 0755 cole/cole-config %{buildroot}%{_prefix}/bin
mkdir -p %{buildroot}%{_includedir}/cole
install -pm 0644 cole/cole.h %{buildroot}%{_includedir}/cole

# Remove libtool config files
rm -f %{buildroot}%{_libdir}/libcole.la

%post -n libcole2 -p /sbin/ldconfig

%postun -n libcole2 -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING
%doc xlhtml/{ChangeLog,README,THANKS,TODO}
%doc xlhtml/contrib/
%doc ChangeLog-ppthtml README-ppthtml THANKS-ppthtml
%{_bindir}/nsopen
%{_bindir}/nspptview
%{_bindir}/nsxlview
%{_bindir}/ppthtml
%{_bindir}/xlhtml
%{_mandir}/man1/ppthtml.1%{ext_man}
%{_mandir}/man1/xlhtml.1%{ext_man}

%files -n libcole2
%defattr(-,root,root,-)
%{_libdir}/libcole.so.2*

%files -n libcole2-devel
%defattr(-,root,root,-)
%doc cole/{AUTHORS,COPYING,ChangeLog,NEWS,THANKS,TODO}
%{_bindir}/cole-config
%{_includedir}/cole/
%{_libdir}/libcole.so

%changelog
openSUSE Build Service is sponsored by