diff --git a/docbook-utils.spec b/docbook-utils.spec index 55df16f..3e8f531 100644 --- a/docbook-utils.spec +++ b/docbook-utils.spec @@ -1,12 +1,12 @@ Name: docbook-utils Version: 0.6.14 -Release: 13%{?dist} +Release: 14%{?dist} Group: Applications/Text Summary: Shell scripts for managing DocBook documents URL: ftp://sources.redhat.com/pub/docbook-tools/new-trials/ -License: GPL+ +License: GPLv2+ Requires: docbook-style-dsssl >= 1.72 Requires: docbook-dtds @@ -21,6 +21,9 @@ BuildArch: noarch Source0: ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/%{name}-%{version}.tar.gz Source1: db2html Source2: gdp-both.dsl +#We will ship newer version of docbook2man-spec.pl for better handling of docbook2man conversion +#You could check it at http://sourceforge.net/projects/docbook2x/ +Source3: docbook2man-spec.pl Obsoletes: stylesheets <= %{version}-%{release} Provides: stylesheets = %{version}-%{release} @@ -74,6 +77,7 @@ done rm -f $RPM_BUILD_ROOT%{_bindir}/db2html install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/db2html install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/sgml/docbook/utils-%{version}/docbook-utils.dsl +install -p -m 755 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/sgml/docbook/utils-%{version}/helpers/docbook2man-spec.pl rm -rf $RPM_BUILD_ROOT/tmp @@ -122,6 +126,12 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/*/docbook2ps.* %changelog +* Mon Sep 08 2008 Ondrej Vasik 0.6-14-14 +- ship new version of docbook2man-spec.pl to avoid issues + with the old one +- dropped funcsynopsis patch - docbook2man-spec.pl from + tarball used no longer + * Thu Nov 22 2007 Ondrej Vasik 0.6.14-13 - fix of w3m params while converting to txt diff --git a/docbook2man-spec.pl b/docbook2man-spec.pl new file mode 100644 index 0000000..c620cce --- /dev/null +++ b/docbook2man-spec.pl @@ -0,0 +1,1546 @@ +=head1 NAME + +docbook2man-spec.pl - convert DocBook RefEntries to Unix manpages + +=head1 SYNOPSIS + +The sgmlspl script from the SGMLSpm Perl module must be used to run +this script. Use it like this: + +nsgmls some-docbook-document.sgml | sgmlspl docbook2man-spec.pl + +See man page or included DocBook documentation for details. + +=head1 DESCRIPTION + +This is a sgmlspl spec file that produces Unix-style +man pages from DocBook RefEntry markup. + +=head1 COPYRIGHT + +Copyright (C) 1998-2001 Steve Cheng + +Copyright (C) 1999 Thomas Lockhart + +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +You should have received a copy of the GNU General Public License along with +this program; see the file COPYING. If not, please write to the Free +Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + +=cut + +# $Id$ + +use SGMLS; # Use the SGMLS package. +use SGMLS::Output; # Use stack-based output. +use SGMLS::Refs; + + +######################################################################## +# SGMLSPL script produced automatically by the script sgmlspl.pl +# +# Document Type: any, but processes only RefEntries +# Edited by: me :) +######################################################################## + + +$write_manpages = 0; +$blank_xrefs = 0; + +$default_sect = "1"; +$default_date = `date "+%d %B %Y"`; +$cite_numeral_only = 1; + +while (@ARGV) { + my $arg = shift @ARGV; + if ($arg eq "--section") { + $default_sect = shift @ARGV || die "$arg requires an argument\n"; + } elsif ($arg eq "--date") { + $default_date = shift @ARGV || die "$arg requires an argument\n"; + } elsif ($arg eq "--lowercase") { + $lowercase_names = 1; + } elsif ($arg eq "--preserve-case") { + $lowercase_names = 0; + } elsif ($arg eq "--cite-numeral-only") { + $cite_numeral_only = 1; + } elsif ($arg eq "--nocite-numeral-only") { + $cite_numeral_only = 0; + } elsif ($arg eq "--help") { + print "Usage: $0", + " [ --section