[Pkg-doc-linux-devel] r283 - trunk/doc-linux/debian

djpig at alioth.debian.org djpig at alioth.debian.org
Thu May 29 23:55:03 UTC 2008


Author: djpig
Date: 2008-05-29 23:55:01 +0000 (Thu, 29 May 2008)
New Revision: 283

Modified:
   trunk/doc-linux/debian/html2docs
Log:
html2docs:
 + Fix spelling mistakes in the abstract so that lintian doesn't
   complain
 + Fix encoding issues (index is in iso-8859-1)
 + Don't include doc-base file for index in nonfree package
 + Fix syntax error in prerm template


Modified: trunk/doc-linux/debian/html2docs
===================================================================
--- trunk/doc-linux/debian/html2docs	2008-05-29 23:00:58 UTC (rev 282)
+++ trunk/doc-linux/debian/html2docs	2008-05-29 23:55:01 UTC (rev 283)
@@ -31,7 +31,7 @@
     my %docs;
     my $index;
 
-    open IN, '<', $filename or die "can't open $filename: $!\n";
+    open IN, '<:encoding(iso-8859-1)', $filename or die "can't open $filename: $!\n";
     {
 	local $/ = undef;
 	$index = scalar <IN>;
@@ -91,7 +91,11 @@
 sub write_doc_base ($$$$)
 {
     my ($filename, $docid, $linkname, $abstract) = @_;
-    open DOCBASE, '>', "debian/$package.doc-base.$docid"
+    # Fix spelling errors since lintian complains otherwise
+    $abstract =~ s/\blinux\b/Linux/g;
+    $abstract =~ s/\busefull\b/useful/g;
+    $abstract =~ s/\bseperate\b/separate/g;
+    open DOCBASE, '>:utf8', "debian/$package.doc-base.$docid"
 	or die "can't write to debian/$package.doc-base.$docid: $!";
     print DOCBASE <<EOF;
 Document: $docid
@@ -119,6 +123,7 @@
     {
 	my $docid = lc $docfile;
 	$docid =~ s!(?:/index)?\.html!!;
+	next if $docid eq 'howto-index' and ($package =~ /nonfree/);
 	$docid = "ldp-en-$docid";
 	if (defined $ENV{DEB_BUILD_OPTIONS} and
 	    $ENV{DEB_BUILD_OPTIONS} =~ /debug/)
@@ -144,7 +149,7 @@
 
 #DEBHELPER#
 
-if if [ "\$1" = remove ] || [ "\$1" = upgrade ] && which install-docs >/dev/null 2>&1; then
+if [ "\$1" = remove ] || [ "\$1" = upgrade ] && which install-docs >/dev/null 2>&1; then
         install-docs -r @docids
 fi
 




More information about the Pkg-doc-linux-devel mailing list