diff --git a/docbook-utils.spec b/docbook-utils.spec index 2a05931..58af577 100644 --- a/docbook-utils.spec +++ b/docbook-utils.spec @@ -1,6 +1,6 @@ Name: docbook-utils Version: 0.6.14 -Release: 7mamba +Release: 8mamba Summary: Shell scripts to manage DocBook documents Group: Applications/Publishing Vendor: openmamba @@ -8,6 +8,8 @@ Distribution: openmamba Packager: Silvan Calarco URL: https://www.sourceware.org/docbook-tools/ Source: ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/docbook-utils-%{version}.tar.gz +Source1: gdp-both.dsl +Source2: docbook2man-spec.pl Patch0: %{name}-0.6.14-sgml_catalog.patch Patch2: docbook-utils-0.6.14-spaces.patch Patch3: docbook-utils-0.6.14-2ndspaces.patch @@ -20,6 +22,7 @@ Patch9: docbook-utils-0.6.14-nofinalecho.patch Patch10: docbook-utils-0.6.14-newgrep.patch License: GPL ## AUTOBUILDREQ-BEGIN +BuildRequires: perl-SGMLSpm BuildRequires: perl-devel ## AUTOBUILDREQ-END BuildRequires: OpenSP @@ -36,15 +39,13 @@ Requires: docbook-dsssl Requires: /usr/bin/sgmlspl Provides: docbook2man-sgmlspl Obsoletes: docbook2man-sgmlspl <= 0.6.14-5mamba -Provides: docbook2X -Obsoletes: docbook2X <= 0.6.14-5mamba %description Shell scripts to manage DocBook documents. %prep %setup -q -%patch0 -p1 +#%patch0 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 @@ -64,6 +65,15 @@ Shell scripts to manage DocBook documents. [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall docdir=%{_docdir} +for util in dvi html pdf ps rtf; do + ln -s docbook2$util %{buildroot}%{_bindir}/db2$util + ln -s jw.1.gz %{buildroot}%{_mandir}/man1/db2$util.1 +done +ln -s jw.1.gz %{buildroot}%{_mandir}/man1/docbook2txt.1 + +install -p -m 644 %{SOURCE1} %{buildroot}%{_datadir}/sgml/docbook/utils-%{version}/docbook-utils.dsl +install -p -m 755 %{SOURCE2} %{buildroot}%{_datadir}/sgml/docbook/utils-%{version}/helpers/docbook2man-spec.pl + %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" @@ -78,6 +88,7 @@ Shell scripts to manage DocBook documents. %{_bindir}/docbook2tex %{_bindir}/docbook2texi %{_bindir}/docbook2txt +%{_bindir}/db2* %{_bindir}/jw %{_bindir}/sgmldiff %{_datadir}/sgml/docbook/utils-%{version}/backends/* @@ -97,6 +108,8 @@ Shell scripts to manage DocBook documents. %{_mandir}/man1/docbook2texi.1.* %{_mandir}/man1/docbook2man-spec.pl.1* %{_mandir}/man1/docbook2texi-spec.pl.1* +%{_mandir}/man1/docbook2txt.1* +%{_mandir}/man1/db2*.1* %{_mandir}/man1/jw.1* %{_mandir}/man1/sgmldiff.1* %{_mandir}/man7/backend-spec.7* @@ -105,6 +118,9 @@ Shell scripts to manage DocBook documents. #ChangeLog NEWS README TODO %changelog +* Sun Oct 24 2021 Silvan Calarco 0.6.14-8mamba +- also replace docbook-utils.dsl and docbook2man-spec.pl from Fedora + * Wed Jun 30 2021 Silvan Calarco 0.6.14-7mamba - added fedora patches diff --git a/docbook2man-spec.pl b/docbook2man-spec.pl new file mode 100644 index 0000000..58939cb --- /dev/null +++ b/docbook2man-spec.pl @@ -0,0 +1,1564 @@ +=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: docbook2man-spec.pl,v 1.11 2010/10/04 10:23:31 ovasik Exp $ + +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