[ntp/f14/master] generate ntp_decode(5) man page (#632300)

Miroslav Lichvar mlichvar at fedoraproject.org
Wed Sep 15 15:40:51 UTC 2010


commit 78e01c84ea1a2208a05e9ff447a0b9b69457b6e8
Author: Miroslav Lichvar <mlichvar at redhat.com>
Date:   Wed Sep 15 17:14:08 2010 +0200

    generate ntp_decode(5) man page (#632300)

 ...p1-html2man.patch => ntp-4.2.6p2-html2man.patch |   33 ++++++++++++--------
 ntp.spec                                           |    2 +-
 2 files changed, 21 insertions(+), 14 deletions(-)
---
diff --git a/ntp-4.2.6p1-html2man.patch b/ntp-4.2.6p2-html2man.patch
similarity index 86%
rename from ntp-4.2.6p1-html2man.patch
rename to ntp-4.2.6p2-html2man.patch
index f093130..a82bc98 100644
--- a/ntp-4.2.6p1-html2man.patch
+++ b/ntp-4.2.6p2-html2man.patch
@@ -1,8 +1,12 @@
-diff -up ntp-4.2.6p1/scripts/html2man.in.html2man ntp-4.2.6p1/scripts/html2man.in
---- ntp-4.2.6p1/scripts/html2man.in.html2man	2006-06-06 22:17:10.000000000 +0200
-+++ ntp-4.2.6p1/scripts/html2man.in	2010-03-12 12:27:32.000000000 +0100
-@@ -23,28 +23,28 @@ $MANDIR = "./man";
- 	     'ntpq' => ['ntpq', 8, 'ntpd(8), ntpdc(8)'],
+diff -up ntp-4.2.6p2/scripts/html2man.in.html2man ntp-4.2.6p2/scripts/html2man.in
+--- ntp-4.2.6p2/scripts/html2man.in.html2man	2006-06-06 22:17:10.000000000 +0200
++++ ntp-4.2.6p2/scripts/html2man.in	2010-09-15 16:56:55.000000000 +0200
+@@ -20,31 +20,33 @@ $MANDIR = "./man";
+ #   name of man page, man section, 'see also' section
+ %manfiles = (
+ 	     'ntpd' => ['ntpd', 8, 'ntp.conf(5), ntpq(8), ntpdc(8)'],
+-	     'ntpq' => ['ntpq', 8, 'ntpd(8), ntpdc(8)'],
++	     'ntpq' => ['ntpq', 8, 'ntp_decode(5), ntpd(8), ntpdc(8)'],
  	     'ntpdate' => ['ntpdate', 8, 'ntpd(8)'],
  	     'ntpdc' => ['ntpdc', 8, 'ntpd(8)'],
 -	     'ntptime' => ['ntpdtime', 8, 'ntpd(8), ntpdate(8)'],
@@ -14,15 +18,18 @@ diff -up ntp-4.2.6p1/scripts/html2man.in.html2man ntp-4.2.6p1/scripts/html2man.i
 +	     'tickadj' => ['tickadj', 8, 'ntpd(8)'],
 +	     'confopt' => ['ntp.conf', 5, 'ntpd(8), ntp_auth(5), ntp_mon(5), ntp_acc(5), ntp_clock(5), ntp_misc(5)'],
  	     'authopt' => ['ntp_auth', 5, 'ntp.conf(5), ntpd(8)'],
- 	     'monopt' => ['ntp_mon', 5, 'ntp.conf(5)'],
+-	     'monopt' => ['ntp_mon', 5, 'ntp.conf(5)'],
++	     'monopt' => ['ntp_mon', 5, 'ntp.conf(5), ntp_decode(5)'],
  	     'accopt' => ['ntp_acc', 5, 'ntp.conf(5)'],
  	     'clockopt' => ['ntp_clock', 5, 'ntp.conf(5)'],
++	     'decode' => ['ntp_decode', 5, 'ntpq(8), ntp_mon(5)'],
  	     'miscopt' => ['ntp_misc', 5, 'ntp.conf(5)']);
  
 +%table_headers = (
 +    'ntpd' => 'l l l l.',
 +    'ntpq' => 'l l.',
 +    'monopt' => 'l l l.',
++    'decode' => 'l l l l.',
 +    'authopt' => 'c c c c c c.'
 +);
 +
@@ -38,12 +45,12 @@ diff -up ntp-4.2.6p1/scripts/html2man.in.html2man ntp-4.2.6p1/scripts/html2man.i
 -# Disclaimer to go right at the top
 -$top_disclaimer = 'This file was automatically generated from HTML source, and may be ' .
 -    'incorrect.  See the SEE ALSO section at the end of this file for more info';
-+$seealso_disclaimer = "Primary source of documentation: /usr/share/doc/ntp-*\n\n" .
++$seealso_disclaimer = "HTML documentation in ntp-doc package.\n\n" .
 +    "This file was automatically generated from HTML source.\n";
  
  mkdir $MANDIR, 0777;
  mkdir "$MANDIR/man8", 0777;
-@@ -64,7 +64,8 @@ sub process {
+@@ -64,7 +66,8 @@ sub process {
      $fileinfo = $manfiles{$filename};
  
      $p = HTML::TokeParser->new("$filename.html") || die "Can't open $filename.html: $!";
@@ -53,7 +60,7 @@ diff -up ntp-4.2.6p1/scripts/html2man.in.html2man ntp-4.2.6p1/scripts/html2man.i
  	|| die "Can't open: $!";
  
      $p->get_tag("title");
-@@ -73,7 +74,6 @@ sub process {
+@@ -73,7 +76,6 @@ sub process {
  
      # Setup man header
      print MANOUT ".TH " . $fileinfo->[0] . " " . $fileinfo->[1] .  "\n";
@@ -61,7 +68,7 @@ diff -up ntp-4.2.6p1/scripts/html2man.in.html2man ntp-4.2.6p1/scripts/html2man.i
      print MANOUT ".SH NAME\n";
      $pat = $fileinfo->[0];
      if ($name =~ /$pat/) {
-@@ -81,10 +81,13 @@ sub process {
+@@ -81,10 +83,13 @@ sub process {
  	# Add the manpage name, if not in the HTML title already
  	print MANOUT "$fileinfo->[0] - ";
      }
@@ -78,7 +85,7 @@ diff -up ntp-4.2.6p1/scripts/html2man.in.html2man ntp-4.2.6p1/scripts/html2man.i
      # Now start scanning.  We basically print everything after translating some tags.
      # $token->[0] has "T", "S", "E" for Text, Start, End
      # $token->[1] has the tag name, or text (for "T" case)
-@@ -92,19 +95,37 @@ sub process {
+@@ -92,19 +97,37 @@ sub process {
      while (my $token = $p->get_token) {
  	if($token->[0] eq "T") {
  	    my $text = $token->[1];
@@ -122,7 +129,7 @@ diff -up ntp-4.2.6p1/scripts/html2man.in.html2man ntp-4.2.6p1/scripts/html2man.i
  	    }
  	    if($token->[1] eq "tt") {
  		push @fontstack, "tt";
-@@ -118,22 +139,42 @@ sub process {
+@@ -118,22 +141,42 @@ sub process {
  		my $text = $p->get_trimmed_text("/address");
  		print MANOUT "\n.SH AUTHOR\n$text\n";
  	    }
@@ -172,7 +179,7 @@ diff -up ntp-4.2.6p1/scripts/html2man.in.html2man ntp-4.2.6p1/scripts/html2man.i
  		$tag = 1;
  	    }
  	    if($token->[1] eq "tt") {
-@@ -157,15 +198,34 @@ sub process {
+@@ -157,15 +200,34 @@ sub process {
  		print MANOUT "$fontswitch";
  	    }
  	    if($token->[1] eq "dl") {
diff --git a/ntp.spec b/ntp.spec
index 2d25f00..ecb7552 100644
--- a/ntp.spec
+++ b/ntp.spec
@@ -60,7 +60,7 @@ Patch7: ntp-4.2.6p1-retcode.patch
 # ntpbz #992
 Patch8: ntp-4.2.6p1-rtnetlink.patch
 # fix script used to generate man pages
-Patch9: ntp-4.2.6p1-html2man.patch
+Patch9: ntp-4.2.6p2-html2man.patch
 # ntpbz #898
 Patch10: ntp-4.2.6p2-htmldoc.patch
 # add missing nanokernel macros


More information about the scm-commits mailing list