File xmlto.spec of Package xmlto

# spec file for package xmlto
# 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

%if 0%{?suse_version} < 1030
%define dist_has_fdupes 0
%define dist_has_fdupes 1

# support SLE 11
%if !0%{?make_install:1}
%define make_install %{makeinstall} 

Name:           xmlto
Summary:        Tool for Converting XML Files to Various Formats
License:        GPL-2.0+
Group:          Productivity/Publishing/XML
Version:        0.0.25
Release:        0
Source10:       %{name}-README.SuSE
Patch0:         xmlto-nonvoid.patch
Patch1:         xmlto-overflow.patch
Patch3:         xmlto-xsltopts.patch
Patch4:         xmlto-codecleanup.patch
Patch5:         xmlto-lynx-empty-file.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  docbook-xsl-stylesheets
BuildRequires:  flex
BuildRequires:  sgml-skel

%if %{dist_has_fdupes}
BuildRequires:  fdupes

# We rely entirely on the DocBook XSL stylesheets!
Requires:       docbook-xsl-stylesheets >= 1.56.0
Requires:       docbook_4
%if 0%{?suse_version} > 1210
Requires:       libxslt-tools
BuildRequires:  libxslt-tools
%if 0%{?suse_version} >= 1210
Requires:       libxslt1
BuildRequires:  libxslt1
%if 0%{?suse_version} > 0
Requires:       libxslt
BuildRequires:  libxslt
BuildRequires:  xsltproc
Requires:       xsltproc
# For full functionality, we need passivetex.
Recommends:     texlive-xmltex >= 2007

This is a package for converting XML files to various formats using XSL
stylesheets.  As a processor it depends on xsltproc and as a formatter
for print output it makes use of passivetex.

%setup -q
rm -f xmlif/xmlif.c

# make sure the buildrequires pulled in xsltproc
test -x /usr/bin/xsltproc || {
    echo "ERROR: buildrequires didn't install xsltproc" >&2
    exit 1

make %{?_smp_mflags}

make check

%__install -d %{buildroot}%{_datadir}/xmlto/xsl
%if %{dist_has_fdupes}
%{fdupes '%{buildroot}%{_datadir}/xmlto'}

%doc %{_mandir}/man1/xmlto.1*
%doc %{_mandir}/man1/xmlif.1*