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

djpig at alioth.debian.org djpig at alioth.debian.org
Thu May 29 23:00:59 UTC 2008


Author: djpig
Date: 2008-05-29 23:00:58 +0000 (Thu, 29 May 2008)
New Revision: 282

Removed:
   trunk/doc-linux/debian/doc-linux-html.postinst
   trunk/doc-linux/debian/doc-linux-html.prerm
Modified:
   trunk/doc-linux/debian/doc-linux-nonfree.changelog
   trunk/doc-linux/debian/doc-linux-nonfree.control
   trunk/doc-linux/debian/doc-linux.changelog
   trunk/doc-linux/debian/doc-linux.control
   trunk/doc-linux/debian/html2docs
   trunk/doc-linux/debian/rules
Log:
 * Return to registering all HOWTOs individually with
   doc-base. Improvements in doc-base and the introduction
   of triggers make this reasonable. The change was pushed
   by dhelp changing so that we can't register directly for
   it anymore. This introduces a conflict with
   doc-base (<< 0.8.4). (Closes: #482807)
 * Remove the conflict with dhelp from older than oldstable.


Deleted: trunk/doc-linux/debian/doc-linux-html.postinst
===================================================================
--- trunk/doc-linux/debian/doc-linux-html.postinst	2008-05-24 16:07:10 UTC (rev 281)
+++ trunk/doc-linux/debian/doc-linux-html.postinst	2008-05-29 23:00:58 UTC (rev 282)
@@ -1,10 +0,0 @@
-#!/bin/sh -e
-
-# At the moment, dh_dhelp is too broken to do this properly.
-if [ "$1" = configure ] && [ -x /usr/sbin/dhelp_parse ]; then
-	/usr/sbin/dhelp_parse -a /usr/share/doc/HOWTO/en-html
-fi
-
-#DEBHELPER#
-
-exit 0

Deleted: trunk/doc-linux/debian/doc-linux-html.prerm
===================================================================
--- trunk/doc-linux/debian/doc-linux-html.prerm	2008-05-24 16:07:10 UTC (rev 281)
+++ trunk/doc-linux/debian/doc-linux-html.prerm	2008-05-29 23:00:58 UTC (rev 282)
@@ -1,9 +0,0 @@
-#!/bin/sh -e
-
-#DEBHELPER#
-
-if [ "$1" = remove ] || [ "$1" = upgrade ] && [ -x /usr/sbin/dhelp_parse ]; then
-	/usr/sbin/dhelp_parse -d /usr/share/doc/HOWTO/en-html
-fi
-
-exit 0

Modified: trunk/doc-linux/debian/doc-linux-nonfree.changelog
===================================================================
--- trunk/doc-linux/debian/doc-linux-nonfree.changelog	2008-05-24 16:07:10 UTC (rev 281)
+++ trunk/doc-linux/debian/doc-linux-nonfree.changelog	2008-05-29 23:00:58 UTC (rev 282)
@@ -1,3 +1,14 @@
+doc-linux-nonfree (2008.05-2) unstable; urgency=low
+
+  * Return to registering all HOWTOs individually with
+    doc-base. Improvements in doc-base and the introduction
+    of triggers make this reasonable. The change was pushed
+    by dhelp changing so that we can't register directly for
+    it anymore. This introduces a conflict with
+    doc-base (<< 0.8.4).
+
+ -- Frank Lichtenheld <djpig at debian.org>  Fri, 30 May 2008 00:00:11 +0200
+
 doc-linux-nonfree (2008.05-1) unstable; urgency=low
 
   * new upstream release (20080524)

Modified: trunk/doc-linux/debian/doc-linux-nonfree.control
===================================================================
--- trunk/doc-linux/debian/doc-linux-nonfree.control	2008-05-24 16:07:10 UTC (rev 281)
+++ trunk/doc-linux/debian/doc-linux-nonfree.control	2008-05-29 23:00:58 UTC (rev 282)
@@ -13,7 +13,7 @@
 Package: doc-linux-nonfree-html
 Priority: optional
 Architecture: all
-Conflicts: doc, doc-linux
+Conflicts: doc, doc-linux, doc-base (<< 0.8.4)
 Replaces: doc-linux, doc-linux-text (<< 98.06-1), doc-linux-html (<< 2008.05-1)
 Recommends: doc-linux-html
 Suggests: doc-base, menu, www-browser

Modified: trunk/doc-linux/debian/doc-linux.changelog
===================================================================
--- trunk/doc-linux/debian/doc-linux.changelog	2008-05-24 16:07:10 UTC (rev 281)
+++ trunk/doc-linux/debian/doc-linux.changelog	2008-05-29 23:00:58 UTC (rev 282)
@@ -1,3 +1,15 @@
+doc-linux (2008.05-2) unstable; urgency=low
+
+  * Return to registering all HOWTOs individually with
+    doc-base. Improvements in doc-base and the introduction
+    of triggers make this reasonable. The change was pushed
+    by dhelp changing so that we can't register directly for
+    it anymore. This introduces a conflict with
+    doc-base (<< 0.8.4). (Closes: #482807)
+  * Remove the conflict with dhelp from older than oldstable.
+
+ -- Frank Lichtenheld <djpig at debian.org>  Fri, 30 May 2008 00:00:11 +0200
+
 doc-linux (2008.05-1) unstable; urgency=low
 
   * new upstream release (20080524)

Modified: trunk/doc-linux/debian/doc-linux.control
===================================================================
--- trunk/doc-linux/debian/doc-linux.control	2008-05-24 16:07:10 UTC (rev 281)
+++ trunk/doc-linux/debian/doc-linux.control	2008-05-29 23:00:58 UTC (rev 282)
@@ -13,7 +13,7 @@
 Package: doc-linux-html
 Priority: optional
 Architecture: all
-Conflicts: doc, dhelp (<< 0.3.14), doc-linux
+Conflicts: doc, doc-linux, doc-base (<< 0.8.4)
 Replaces: doc-linux, doc-linux-text (<< 98.06-1), doc-linux-nonfree-html (<< 2005.07-1)
 Suggests: doc-base, menu, www-browser
 Description: Linux HOWTOs and FAQs in HTML format

Modified: trunk/doc-linux/debian/html2docs
===================================================================
--- trunk/doc-linux/debian/html2docs	2008-05-24 16:07:10 UTC (rev 281)
+++ trunk/doc-linux/debian/html2docs	2008-05-29 23:00:58 UTC (rev 282)
@@ -1,23 +1,22 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
+use strict;
+use warnings;
+
 # Copyright (c) 1998 by Marco Budde (Budde at tu-harburg.de)
 # Copyright (c) 2001, 2002, 2003 by Colin Watson (cjwatson at debian.org)
+# Copyright (c) 2008 Frank Lichtenheld (djpig at debian.org)
 # GNU General Public License
 
 ################################################################
-# HOWTO-INDEX -> dhelp / dwww / doc-base                       #
+# HOWTO-INDEX -> doc-base                                      #
 #                                                              #
-# usage:  html2docs <package name>                             #
-#                   <dhelp section> <dwww section>             #
-#                   <dhelp file> <dwww file>                   #
+# usage:  html2docs <package name> <doc-base section>          #
 #                   <unpacked HOWTOs directory> <files>        #
 ################################################################
 
 my $package       = shift;
-my $dhelp_section = shift;
-my $dwww_section  = shift;
-my $dhelp_file    = shift;
-my $dwww_file     = shift;
+my $section       = shift;
 my $unpacked_dir  = shift;
 
 my $root = '/usr/share/doc/HOWTO/en-html';
@@ -32,7 +31,7 @@
     my %docs;
     my $index;
 
-    open IN, "< $filename" or die "can't open $filename!\n";
+    open IN, '<', $filename or die "can't open $filename: $!\n";
     {
 	local $/ = undef;
 	$index = scalar <IN>;
@@ -85,99 +84,40 @@
 }
 
 
-sub htmlencode ($)
-{
-    my $in = shift;
-    $in =~ s/&/&amp;/g;
-    $in =~ s/</&lt;/g;
-    $in =~ s/>/&gt;/g;
-    $in =~ s/"/&quot;/g;
-    $in =~ s/\xE7/&ccedil;/g;
-    return $in;
-}
-
-
-##################
-#  write .dhelp  #
-##################
-
-sub write_dhelp (*$$$)
-{
-    my ($dhelp, $filename, $linkname, $abstract) = @_;
-    $linkname = htmlencode($linkname);
-    $abstract = htmlencode($abstract);
-    print $dhelp <<EOF;
-<item>
-<directory>$dhelp_section
-<linkname>$linkname
-<filename>$filename
-<description>
-$abstract
-</description>
-</item>
-
-EOF
-}
-
-##################################
-#  dwww support (via menu file)  #
-##################################
-
-# dwww in menu file seems deprecated
-
-#sub write_dwww (*$$$$)
-#{
-#    my ($dwww, $filename, $docid, $linkname, $abstract) = @_;
-#    $linkname =~ s/"/\\"/g;
-#    $abstract =~ s/"/\\"/g;
-#    print $dwww <<EOF;
-#?package($package):needs="dwww" section="$dwww_section" \\
-# title="$docid" \\
-# longtitle="$linkname" \\
-# description="$abstract" \\
-# command="$root/$filename"
-#EOF
-#}
-
 ####################
 #  write doc-base  #
 ####################
 
-# Commented out until bug #114692 is fixed.
+sub write_doc_base ($$$$)
+{
+    my ($filename, $docid, $linkname, $abstract) = @_;
+    open DOCBASE, '>', "debian/$package.doc-base.$docid"
+	or die "can't write to debian/$package.doc-base.$docid: $!";
+    print DOCBASE <<EOF;
+Document: $docid
+Title: $linkname
+Abstract: $abstract
+Section: $section
 
-#sub write_doc_base ($$$$)
-#{
-#    my ($filename, $docid, $linkname, $abstract) = @_;
-#    open DOCBASE, "> $outdir/$docid"
-#	or die "can't write to $outdir/$docid: $!";
-#    print DOCBASE <<EOF;
-#Document: $docid
-#Title: $linkname
-#Abstract: $abstract
-#Section: $section
-#
-#Format: HTML
-#Index: $root/$filename
-#Files: $root/$filename
-#
-#EOF
-#    close DOCBASE;
-#}
+Format: HTML
+Index: $root/$filename
+Files: $root/$filename
 
+EOF
+    close DOCBASE;
+}
 
 ################
 #     main     #
 ################
 
-open DHELP, "> $dhelp_file";
-#open DWWW, "> $dwww_file";
-
+my @docids;
 for my $filename (@ARGV)
 {
     my %abstracts = get_abstracts $filename;
     for my $docfile (sort grep { -e "$unpacked_dir/$_" } keys %abstracts)
     {
-	my $docid = $docfile;
+	my $docid = lc $docfile;
 	$docid =~ s!(?:/index)?\.html!!;
 	$docid = "ldp-en-$docid";
 	if (defined $ENV{DEB_BUILD_OPTIONS} and
@@ -186,14 +126,48 @@
 	    print "$docid: $abstracts{$docfile}{title}\n";
 	    print "$abstracts{$docfile}{abstract}\n\n";
 	}
-	write_dhelp DHELP, $docfile, $abstracts{$docfile}{title},
-		    $abstracts{$docfile}{abstract};
-#	write_dwww DWWW, $docfile, $docid, $abstracts{$docfile}{title},
-#		   $abstracts{$docfile}{abstract};
-#	write_doc_base $docfile, $docid, $abstracts{$docfile}{title},
-#		       $abstracts{$docfile}{abstract};
+	write_doc_base $docfile, $docid, $abstracts{$docfile}{title},
+		       $abstracts{$docfile}{abstract};
+	push @docids, $docid;
     }
 }
 
-close DHELP;
-#close DWWW;
+unshift @docids, "linux-howtos", "linux-faq"
+    unless $package =~ /nonfree/;
+
+open PRERM, '>', "debian/$package.prerm"
+    or die "can't open debian/$package.prerm: $!\n";
+print PRERM <<EOF;
+#!/bin/sh
+
+set -e
+
+#DEBHELPER#
+
+if if [ "\$1" = remove ] || [ "\$1" = upgrade ] && which install-docs >/dev/null 2>&1; then
+        install-docs -r @docids
+fi
+
+exit 0
+EOF
+
+close PRERM;
+
+my @docbasefiles = map { "/usr/share/doc-base/$_" } @docids;
+open POSTINST, '>', "debian/$package.postinst"
+    or die "can't open debian/$package.postinst: $!\n";
+print POSTINST <<EOF;
+#!/bin/sh
+
+set -e
+
+if [ "\$1" = configure ] && which install-docs >/dev/null 2>&1; then
+        install-docs -i @docbasefiles
+fi
+
+#DEBHELPER#
+
+exit 0
+EOF
+
+close POSTINST;

Modified: trunk/doc-linux/debian/rules
===================================================================
--- trunk/doc-linux/debian/rules	2008-05-24 16:07:10 UTC (rev 281)
+++ trunk/doc-linux/debian/rules	2008-05-29 23:00:58 UTC (rev 282)
@@ -14,12 +14,6 @@
 HTML_BUILD = $(R)/usr/share/doc/HOWTO/en-html
 TEXT_BUILD = $(R2)/usr/share/doc/HOWTO/en-txt
 
-ifeq ($(SOURCE),doc-linux)
-DHELPOUT := $(HTML_BUILD)/.dhelp
-else
-DHELPOUT := /dev/null
-endif
-
 BZTAR = tar --bzip2
 
 source = $(shell dpkg-parsechangelog | grep '^Source:' | sed 's/^Source: //')
@@ -103,7 +97,9 @@
 	dh_testroot
 	rm -rf $(R) $(R2)
 #	rm -f xml/$(SOURCE).list xml/$(SOURCE).omf
-	dh_clean build-stamp debian/$(SOURCE)-html.menu
+	find debian -name '*.doc-base.ldp-en-*' -print0 | xargs -r0 rm -v
+	dh_clean build-stamp debian/$(SOURCE)-html.menu \
+		debian/$(SOURCE)-html.postinst debian/$(SOURCE)-html.prerm
 
 # Build a new .orig.tar.gz.
 orig: clean
@@ -133,11 +129,10 @@
 endif
 
 	chmod +x debian/html2docs	# diffs don't preserve permissions
-	debian/html2docs $(SOURCE)-html HOWTO HOWTO \
-		$(DHELPOUT) debian/$(SOURCE)-html.menu \
-		$(HTML_BUILD) \
-		$(HTML_BUILD)/HOWTO-INDEX/howtos.html
+	debian/html2docs $(SOURCE)-html Help/HOWTO \
+		$(HTML_BUILD) $(HTML_BUILD)/HOWTO-INDEX/howtos.html
 
+
 ifeq ($(SOURCE),doc-linux-nonfree)
 	rm -rf $(HTML_BUILD)/HOWTO-INDEX*
 endif
@@ -156,7 +151,7 @@
 		$(R)/usr/share/doc-base/linux-howtos
 endif
 
-	dh_installdocs
+	dh_installdocs -n
 	dh_installchangelogs
 	gzip -9 $(R)/usr/share/doc/$(SOURCE)-html/changelog.Debian
 	ln -s ../HOWTO/en-html $(R)/usr/share/doc/$(SOURCE)-html/HOWTO




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