Summary: A tool for converting XML files to various formats
-Summary(pl): Narzêdzie do konwersji plików XML do ró¿nych formatów
+Summary(pl.UTF-8): Narzędzie do konwersji plików XML do różnych formatów
Name: xmlto
-Version: 0.0.15
-Release: 1
-Epoch: 0
-License: GPL
+Version: 0.0.22
+Release: 5
+License: GPL v2
Group: Applications/System
-Source0: http://cyberelk.net/tim/data/xmlto/stable/%{name}-%{version}.tar.bz2
-# Source0-md5: c11226c3c0dabb245c191cbf39c6fcd8
-URL: http://cyberelk.net/tim/xmlto/
+Source0: https://fedorahosted.org/releases/x/m/xmlto/%{name}-%{version}.tar.bz2
+# Source0-md5: 12f297dc7051e4fef08339980f88a1dd
+Patch0: %{name}-no_which.patch
+URL: http://cyberelk.net/tim/software/xmlto/
BuildRequires: autoconf
-BuildRequires: automake
+BuildRequires: automake >= 1.6
BuildRequires: docbook-dtd42-xml
BuildRequires: docbook-style-xsl >= 1.56.0
+BuildRequires: libpaper
BuildRequires: libxslt-progs
BuildRequires: util-linux
Requires: docbook-dtd42-xml
Requires: docbook-style-xsl >= 1.56.0
-Requires: passivetex >= 1.20
+Requires: libxslt-progs
+Requires: mktemp >= 1.5-19
+Requires: xmltex
+# for getopt
+Requires: util-linux
+# fop is required for --with-fop. It is quite rare usecase. Moreover fop is
+# have dependency (written in Java, requires several Java libs, takes long time
+# to execute %post), so we don't want user to force to install it.
+Suggests: fop
+Suggests: libpaper
+Obsoletes: refentry2man
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
This is a package for converting XML files to various formats using
XSL stylesheets.
-%description -l pl
-Jest to pakiet do konwersji plików w formacie XML do innych formatów
-przy u¿yciu styli XSL.
+%description -l pl.UTF-8
+Jest to pakiet do konwersji plików w formacie XML do innych formatów
+przy użyciu styli XSL.
%prep
%setup -q
+%patch0 -p1
%build
%{__aclocal}
%configure
%{__make}
+cat > refentry2man <<'EOF'
+#!/bin/sh
+XMLTO_TMPFILE=$(mktemp -t xmltoXXXXXX)
+XMLTO_TMPDIR=$(mktemp -d -t xmltodirXXXXXX)
+cat - > $XMLTO_TMPFILE
+xmlto -o $XMLTO_TMPDIR man $XMLTO_TMPFILE >/dev/null
+cat $XMLTO_TMPDIR/*
+rm -f $XMLTO_TMPFILE
+rm -rf $XMLTO_TMPDIR
+EOF
+
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+install refentry2man $RPM_BUILD_ROOT%{_bindir}
+
%clean
rm -rf $RPM_BUILD_ROOT