--- doc-linux-ja-2006.05.25.orig/debian/doc-linux-ja-html.doc-base
+++ doc-linux-ja-2006.05.25/debian/doc-linux-ja-html.doc-base
@@ -0,0 +1,11 @@
+Document: doc-linux-ja-html
+Title: Japanese Linux HOWTOs in HTML format
+Author: JF Project
+Abstract: This is a list of installed Japanese HOWTOs in HTML format.
+Section: HOWTO
+
+Format: HTML
+Index: /usr/share/doc/HOWTO/ja-html/INDEX-JF.html
+Files: /usr/share/doc/HOWTO/ja-html/*.html
+ /usr/share/doc/HOWTO/ja-html/*/*.html
+ /usr/share/doc/HOWTO/ja-html/*/*/*.html
--- doc-linux-ja-2006.05.25.orig/debian/compat
+++ doc-linux-ja-2006.05.25/debian/compat
@@ -0,0 +1 @@
+4
--- doc-linux-ja-2006.05.25.orig/debian/doc-linux-ja-text.prerm
+++ doc-linux-ja-2006.05.25/debian/doc-linux-ja-text.prerm
@@ -0,0 +1,40 @@
+#! /bin/sh
+# prerm script for doc-linux-ja
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see /usr/share/doc/packaging-manual/
+
+case "$1" in
+    remove|upgrade|deconfigure)
+#       install-info --quiet --remove /usr/info/doc-linux-ja.info.gz
+	if [ -L /usr/doc/HOWTO ]; then
+		rm -f /usr/doc/HOWTO
+	fi
+        ;;
+    failed-upgrade)
+        ;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- doc-linux-ja-2006.05.25.orig/debian/doc-linux-ja-html.prerm
+++ doc-linux-ja-2006.05.25/debian/doc-linux-ja-html.prerm
@@ -0,0 +1,40 @@
+#! /bin/sh
+# prerm script for doc-linux-ja
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see /usr/share/doc/packaging-manual/
+
+case "$1" in
+    remove|upgrade|deconfigure)
+#       install-info --quiet --remove /usr/info/doc-linux-ja.info.gz
+	if [ -L /usr/doc/HOWTO ]; then
+		rm -f /usr/doc/HOWTO
+	fi
+        ;;
+    failed-upgrade)
+        ;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- doc-linux-ja-2006.05.25.orig/debian/copyright
+++ doc-linux-ja-2006.05.25/debian/copyright
@@ -0,0 +1,37 @@
+This package was debianized by GOTO Masanori <gotom@debian.or.jp> on
+Sun, 23 Sep 2001 14:49:52 +0900.
+
+  This is the Debian GNU/Linux 'doc-linux-ja' package. It provides the
+  current Linux HOWTOs, mini-HOWTOs and FAQs in Japanese version. 
+  This package contains JF Project documents. JF Projects maintains original
+  documents and LDP translated documents. No changes other than adding the 
+  Debian package maintenance system were made.
+
+It was downloaded from http://www.linux.or.jp/JF/
+
+Upstream Authors: JF Project, LDP, and many contributors.
+
+Copyright statement for the HOWTOs:
+
+  Unless otherwise stated, Linux HOWTO documents are copyrighted by their
+  respective authors. Linux HOWTO documents may be reproduced and distributed 
+  in whole or in part, in any medium physical or electronic, as long as
+  this copyright notice is retained on all copies. Commercial redistribution 
+  is allowed and encouraged; however, the author would like to be notified of 
+  any such distributions. 
+  
+  All translations, derivative works, or aggregate works incorporating 
+  any Linux HOWTO documents must be covered under this copyright notice. 
+  That is, you may not produce a derivative work from a HOWTO and impose
+  additional restrictions on its distribution. Exceptions to these rules
+  may be granted under certain conditions; please contact the Linux HOWTO
+  coordinator at the address given below.
+  
+  In short, we wish to promote dissemination of this information through as
+  many channels as possible. However, we do wish to retain copyright on the
+  HOWTO documents, and would like to be notified of any plans to redistribute
+  the HOWTOs. 
+  
+  If you have questions, please contact Greg Hankins, the Linux HOWTO 
+  coordinator, at gregh@sunsite.unc.edu via email.
+
--- doc-linux-ja-2006.05.25.orig/debian/doc-linux-ja-text.doc-base
+++ doc-linux-ja-2006.05.25/debian/doc-linux-ja-text.doc-base
@@ -0,0 +1,8 @@
+Document: doc-linux-ja-text
+Title: Japanese Linux HOWTOs in text format
+Author: JF Project
+Abstract: This is a list of installed Japanese HOWTOs in text format.
+Section: HOWTO
+
+Format: text
+Files: /usr/share/doc/HOWTO/ja-txt/INDEX-JF.txt.gz
--- doc-linux-ja-2006.05.25.orig/debian/changelog
+++ doc-linux-ja-2006.05.25/debian/changelog
@@ -0,0 +1,137 @@
+doc-linux-ja (2006.05.25-1.1.4.201403201051) ucs4-0-0-0; urgency=low
+
+  * UCS auto build. No patches were applied to the original source package
+
+ -- Univention builddaemon <buildd@univention.de>  Thu, 20 Mar 2014 10:51:11 +0100
+
+doc-linux-ja (2006.05.25-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * debian/rules: Fix bashisms in glob/variable expansion, so that builds
+    with dash now work. (Closes: #459183)
+
+ -- Marc 'HE' Brockschmidt <he@debian.org>  Sun, 09 Mar 2008 11:16:13 +0100
+
+doc-linux-ja (2006.05.25-1) unstable; urgency=low
+
+  * New upstream version 2006-05-25.
+  * Add kernel-docs-2.2 from JF Project.
+  * debian/rules: Add kernel-docs-2.2 rules.
+  * debian/control: Update Standards-Version.  Seperate Build-Depends
+    and Build-Depends-Indep.
+  * debian/control: Remove Build-Depends-Indep: nkf.
+  * debian/rules: Don't generate and install menu file because it was
+    depreciated.
+  * debian/listremove: Update to remove deleted entries from INDEX-JF.txt.
+    Fix some entries are not deleted.  Fix it couldn't handle with small
+    capital letters.
+  * debian/doc-linux-ja-html.doc-base: Added.
+  * debian/doc-linux-ja-text.doc-base: Added.
+  * debian/rules: Add binary-arch target.
+
+ -- GOTO Masanori <gotom@debian.org>  Thu, 25 May 2006 12:40:28 +0900
+
+doc-linux-ja (2005.05.02-1) unstable; urgency=low
+
+  * New upstream version 2005-05-02.
+  * Add kernel-docs-2.4 and kernel-docs-2.6 from JF Project.
+  * debian/rules: Add kernel-docs rules.
+  * debian/rules: Change links: /usr/share/doc/doc-linux-ja-*/HOWTO.
+  * debian/control: Fix a small wording.
+
+ -- GOTO Masanori <gotom@debian.org>  Mon,  2 May 2005 14:03:16 +0900
+
+doc-linux-ja (2004.06.15-2) unstable; urgency=low
+
+  * debian/control: correctly change maintainer address.
+
+ -- GOTO Masanori <gotom@debian.org>  Thu, 17 Jun 2004 22:49:07 +0900
+
+doc-linux-ja (2004.06.15-1) unstable; urgency=low
+
+  * New upstream version 2004-06-15.
+  * Maintainer address is changed.
+  * debian/html2docs: Minor changes for handling small capital html tags.
+  * debian/gif: Remove unneeded gif files.
+
+ -- GOTO Masanori <gotom@debian.org>  Tue, 15 Jun 2004 22:47:43 +0900
+
+doc-linux-ja (2003.09.13-1) unstable; urgency=low
+
+  * New upstream version 2003-09-13.
+  * dhelp_parse warning error during dhelp running is fixed.
+    (Closes: #131971)
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Sun, 14 Sep 2003 10:07:37 +0900
+
+doc-linux-ja (2002.12.21-1) unstable; urgency=low
+
+  * New upstream version 2002-12-21.
+  * debian/html2docs: update to parse the latest format.
+  * debian/except.list: add non-free documents removal list.
+  * debian/listremove: add to remove files which is written in except.list.
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Sat, 21 Dec 2002 23:27:14 +0900
+
+doc-linux-ja (2002.04.14-1) unstable; urgency=low
+
+  * New upstream version 2002-04-14.
+  * changes .orig compression format from .gz to .bz2.
+  * chmod +x debian/html2docs during building (closes: Bug#140135).
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Tue, 16 Apr 2002 19:06:27 +0900
+
+doc-linux-ja (2002.01.10-1) unstable; urgency=low
+
+  * New upstream version 2002-01-10.
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Sun, 20 Jan 2002 02:54:17 +0900
+
+doc-linux-ja (2001.12.06-1) unstable; urgency=low
+
+  * debian/control: fixed some typo
+  * New upstream versions 2001-12-06.
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Sun, 25 Nov 2001 12:03:39 +0900
+
+doc-linux-ja (2001.10.30-1) unstable; urgency=low
+
+  * New maintainer (closes: Bug#111274).
+  * New upstream versions 2001-10-30 (closes: Bug#66614).
+  * Update standards version 3.5.2.
+  * License file updates.
+  * Move from dwww to doc-base (closes: Bug#96022).
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Sun, 23 Sep 2001 14:53:48 +0900
+
+doc-linux-ja (1999.12-1) unstable frozen; urgency=low
+
+  * new upstream versions
+  * my email address
+  * FHS
+  * policy 3.1.0.0
+	
+ -- Marco Budde <budde@debian.org>  Sun, 26 Dec 1999 17:11:34 +0100
+	
+doc-linux-ja (98.05-1) unstable; urgency=low
+
+  * new upstream versions
+  * debian/sgml2dhelp
+
+ -- Marco Budde <Budde@tu-harburg.de>  Mon, 18 Jan 1998 18:54:00 +0200
+
+doc-linux-ja (97.12-2) unstable; urgency=low
+
+  * dhelp 0.2 support
+
+ -- Marco Budde <Budde@tu-harburg.d400.de>  Sat, 3 Jan 1998 20:15:32 +0100
+
+doc-linux-ja (97.12-1) unstable; urgency=low
+
+  * Initial release.
+
+ -- Marco Budde <Budde@tu-harburg.d400.de>  Sun, 14 Dec 1997 15:53:34 +0100
+
+Local variables:
+mode: debian-changelog
+End:
--- doc-linux-ja-2006.05.25.orig/debian/listremove
+++ doc-linux-ja-2006.05.25/debian/listremove
@@ -0,0 +1,53 @@
+#!/usr/bin/perl -w
+#
+# Copyright (c) 2002, 2003, 2006 GOTO Masanori <gotom@debian.org>
+#
+# Remove HOWTO section from INDEX-JF.{html,text} using brute force matching.
+#
+# usage: listremove <filename> <remove HOWTO name> <HTML|TEXT>
+
+$filename = shift;
+$howto = shift;
+$mode = shift;
+
+if ($mode eq "html" || $mode eq "HTML") {
+    $mode="html";
+} elsif ($mode eq "text" || $mode eq "TEXT") {
+    $mode="text";
+} else {
+    die "invalid mode";
+}
+
+open(INPUTFILE, "< $filename") || die "can't open $filename!\n";
+$status = 0;
+
+while (<INPUTFILE>) {
+    if ($status == 1) {
+	if ($mode eq "text") {
+	    if ($_ =~ /Translator:.*/) {
+		$status = 0;
+	    }
+	} else {
+	    if ($_ =~ /<\/(DD|dd)>/) {
+		$status = 0;
+	    }
+	}
+    } else {
+	if ($mode eq "text") {
+	    if ($_ =~ /Filename:\s*(.*\/)*$howto.*Updated.*/) {
+		$status = 1;
+	    } else {
+		print $_;
+	    }
+	} else {
+	    if ($_ =~ /<(DT|dt)><(A|a)\s*(HREF|href)="(.*\/)*$howto.*">/) {
+		$status = 1;
+	    } else {
+		print $_;
+	    }
+	}
+    }
+}
+
+close(INPUTFILE);
+
--- doc-linux-ja-2006.05.25.orig/debian/doc-linux-ja-html.README.Debian
+++ doc-linux-ja-2006.05.25/debian/doc-linux-ja-html.README.Debian
@@ -0,0 +1,7 @@
+doc-linux-html-ja for Debian
+-----------------------
+
+This package contains the HTML versions of the Linux HOWTO documents from
+the JF Project. They can be found in /usr/share/doc/HOWTO/ja-html.
+
+ -- GOTO Masanori <gotom@debian.or.jp>, Wed,  7 Nov 2001 23:47:35 +0900
--- doc-linux-ja-2006.05.25.orig/debian/except.list
+++ doc-linux-ja-2006.05.25/debian/except.list
@@ -0,0 +1,12 @@
+# NO-COM
+# COM-PERM
+Chinese-HOWTO
+Offline-Mailing
+Scanner-HOWTO-mtekscan
+Securing-X-Windows
+StarOffice
+# OTHER
+Astronomy-HOWTO
+Ftape-HOWTO
+Quota
+Term-HOWTO
--- doc-linux-ja-2006.05.25.orig/debian/control
+++ doc-linux-ja-2006.05.25/debian/control
@@ -0,0 +1,43 @@
+Source: doc-linux-ja
+Section: doc
+Priority: optional
+Maintainer: GOTO Masanori <gotom@debian.org>
+Build-Depends: debhelper (>> 4.0.0)
+Build-Depends-Indep: bzip2
+Standards-Version: 3.7.0
+
+Package: doc-linux-ja-html
+Priority: optional
+Architecture: all
+Conflicts: doc-linux-ja, doc-linux-html-ja
+Replaces: doc-linux-ja, doc-linux-html-ja
+Suggests: doc-linux-ja-text, doc-base, menu, www-browser
+Description: Linux HOWTOs and FAQs in Japanese (HTML format)
+ The doc-linux-ja-html package provides the current Linux HOWTOs,
+ mini-HOWTOs, and FAQs in HTML format for Japanese. Alternatively,
+ TEXT versions are provided in the doc-linux-ja-text package.
+ .
+ The version number reflects the date when doc-linux-ja-text
+ was created.
+ .
+ All files are also available at JF Project (http://www.linux.or.jp/JF/)
+
+Package: doc-linux-ja-text
+Priority: optional
+Architecture: all
+Conflicts: doc-linux-ja, doc-linux-text-ja
+Replaces: doc-linux-ja, doc-linux-text-ja
+Suggests: doc-linux-ja-html
+Description: Linux HOWTOs and FAQs in Japanese (TEXT format)
+ The doc-linux-ja-text package provides the current Linux HOWTOs, 
+ mini-HOWTOs, and FAQs in TEXT format for Japanese. Alternatively, 
+ HTML versions are provided in the doc-linux-ja-html package.
+ .
+ The version number reflects the date when doc-linux-ja-text
+ was created.
+ .
+ This package additionally includes kernel 2.4/2.6 Documentation
+ text translation.
+ .
+ All files are also available at JF Project (http://www.linux.or.jp/JF/)
+
--- doc-linux-ja-2006.05.25.orig/debian/doc-linux-ja-text.dirs
+++ doc-linux-ja-2006.05.25/debian/doc-linux-ja-text.dirs
@@ -0,0 +1,2 @@
+usr/share/doc/HOWTO/ja-txt
+usr/share/doc/doc-linux-ja-text
--- doc-linux-ja-2006.05.25.orig/debian/doc-linux-ja-html.dirs
+++ doc-linux-ja-2006.05.25/debian/doc-linux-ja-html.dirs
@@ -0,0 +1,2 @@
+usr/share/doc/HOWTO/ja-html
+usr/share/doc/doc-linux-ja-html
--- doc-linux-ja-2006.05.25.orig/debian/doc-linux-ja-text.README.Debian
+++ doc-linux-ja-2006.05.25/debian/doc-linux-ja-text.README.Debian
@@ -0,0 +1,7 @@
+doc-linux-text-ja for Debian
+-----------------------
+
+This package contains the text versions of the Linux HOWTO documents from
+the JF Project. They can be found in /usr/share/doc/HOWTO/ja-txt.
+
+ -- GOTO Masanori <gotom@debian.or.jp>, Wed,  7 Nov 2001 23:47:35 +0900
--- doc-linux-ja-2006.05.25.orig/debian/html2docs
+++ doc-linux-ja-2006.05.25/debian/html2docs
@@ -0,0 +1,178 @@
+#!/usr/bin/perl -w
+
+# Copyright (c) 1998 by Marco Budde (Budde@tu-harburg.de)
+# Copyright (c) 2001 by Colin Watson (cjwatson@debian.org)
+# Copyright (c) 2001, 2002 by GOTO Masanori (gotom@debian.org)
+# GNU General Public License
+
+################################################################
+# HOWTO-INDEX -> dhelp / dwww / doc-base                       #
+#                                                              # 
+# usage:  html2docbase <dhelp section> <dwww section>          #
+#                      <dhelp file> <dwww file> <files>        #
+################################################################
+
+my $dhelp_section = shift;
+my $dwww_section  = shift;
+my $dhelp_file    = shift;
+my $dwww_file     = shift;
+
+my $root = '/usr/share/doc/HOWTO/ja-html';
+
+##############################
+#  get abstract of document  #
+##############################
+
+sub get_abstracts ($)
+{
+    my $filename = shift;
+    my %docs;
+    my $index;
+
+    open IN, "< $filename" or die "can't open $filename!\n";
+    {
+	local $/ = undef;
+	$index = scalar <IN>;
+    }
+    close IN;
+
+    # Transform silly DocBook-generated HTML into something more easily
+    # parseable.
+    $index =~ s/\n>/>/g;
+    $index =~ s/\n/ /g;
+
+    # JF-INDEX format
+    while ($index =~ m!<dt><a\s*href="(.*?)">     # link
+		       <strong>(.*?)</strong></a> .*? # title
+		       <dd>(.*?)			    # abstract
+		       <small> .*? !gx)
+    {
+	my ($link, $title, $abstract) = ($1, $2, $3);
+	# JF un-neccesary link
+	$JFdocsDIR  = 'http://www.linux.or.jp/JF/JFdocs/';
+	$contribDIR = 'http://www.linux.or.jp/JF/';
+	$link =~ s/$JFdocsDIR//;
+	$link =~ s/$contribDIR//;
+	# Clean up whitespace.
+	$abstract =~ s/^\s+//;
+	$abstract =~ s/\s+$//;
+	$abstract =~ s/\s\s+/ /g;
+	# Dispose of some HTMLisms.
+	$title =~ s/&#(\d+);/chr $1/eg;
+	$abstract =~ s/&#(\d+);/chr $1/eg;
+	$abstract =~ s!<em>!!;
+	$abstract =~ s!</em>!!;
+	$abstract =~ s!<i .*?>!!;
+	$abstract =~ s!</i>!!;
+	$abstract =~ s!<a .*?>!!;
+	$abstract =~ s!</a>!!;
+	$title =~ s/&/&amp;/g;
+	$title =~ s/</&lt;/g;
+	$title =~ s/>/&gt;/g;
+	$title =~ s/"/&quot;/g;
+	$abstract =~ s/&/&amp;/g;
+	$abstract =~ s/</&lt;/g;
+	$abstract =~ s/>/&gt;/g;
+	$abstract =~ s/"/&quot;/g;
+	$docs{$link} = {title => $title, abstract => $abstract};
+    }
+
+    return %docs;
+}
+
+
+##################
+#  write .dhelp  #
+##################
+
+sub write_dhelp (*$$$)
+{
+    my ($dhelp, $filename, $linkname, $abstract) = @_;
+    print $dhelp <<EOF;
+<item>
+<directory>$dhelp_section
+<linkname>$linkname
+<filename>$filename
+<description>
+$abstract
+</description>
+</item>
+
+EOF
+}
+
+##################################
+#  dwww support (via menu file)  #
+##################################
+
+sub write_dwww (*$$$$)
+{
+    my ($dwww, $filename, $docid, $linkname, $abstract) = @_;
+    print $dwww <<EOF;
+?package(doc-linux-ja-html):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, "> $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;
+#}
+
+
+################
+#     main     #
+################
+
+open DHELP, "> $dhelp_file";
+open DWWW, "> $dwww_file";
+
+for my $filename (@ARGV)
+{
+    my %abstracts = get_abstracts $filename;
+    for my $docfile (sort keys %abstracts)
+    {
+	my $docid = $docfile;
+	$docid =~ s!mini/!!;
+	$docid =~ s!(?:-HOWTO)?(?:/index)?\.html!!;
+	$docid = "ldp-ja-$docid";
+	if (defined $ENV{DEB_BUILD_OPTIONS} and
+	    $ENV{DEB_BUILD_OPTIONS} =~ /debug/)
+	{
+	    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};
+    }
+}
+
+close DHELP;
+close DWWW;
--- doc-linux-ja-2006.05.25.orig/debian/rules
+++ doc-linux-ja-2006.05.25/debian/rules
@@ -0,0 +1,179 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper. 
+# GNU copyright 1997 by Joey Hess.
+#
+# This version is for a hypothetical package that builds an
+# architecture-dependant package, as well as an architecture-independent
+# package.
+
+# Uncomment this to turn on verbose mode. 
+#export DH_VERBOSE=1
+
+# This is the debhelper compatability version to use.
+#export DH_COMPAT=3
+
+HTMLDIR=$(CURDIR)/debian/doc-linux-ja-html/usr/share/doc/HOWTO/ja-html
+TEXTDIR=$(CURDIR)/debian/doc-linux-ja-text/usr/share/doc/HOWTO/ja-txt
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	# Add here commands to configure the package.
+
+	tar -jxf HOWTO/JFhtml.tar.bz2
+	mv JFdocs JFdocs.html
+	tar -jxf HOWTO/JFtxt.tar.bz2
+	mv JFdocs JFdocs.text
+	tar -zxf HOWTO/kernel-docs-2.2.tar.gz
+	tar -zxf HOWTO/kernel-docs-2.4.tar.gz
+	tar -zxf HOWTO/kernel-docs-2.6.tar.gz
+
+	touch configure-stamp
+
+build: configure-stamp build-stamp
+build-stamp:
+	dh_testdir
+
+	# Add here commands to compile the package.
+	#$(MAKE)
+
+	# chmod +x is needed...?
+	chmod +x debian/html2docs debian/listremove
+
+	# nkf -e JFdocs.html/INDEX-JF.html > debian/INDEX-JF.html
+	cp JFdocs.html/INDEX-JF.html debian/INDEX-JF.html
+	cp JFdocs.text/INDEX-JF.txt debian/INDEX-JF.txt
+
+	# delete inappropriate files to distribute.
+	cat debian/except.list |				\
+	while read delfile; do					\
+		case $$delfile in \#*) continue;; esac;		\
+		echo "deleting:" JFdocs.html/$$delfile*;	\
+		rm -rf JFdocs.html/$$delfile*;		\
+		echo "deleting:" JFdocs.html/archive/$$delfile*; \
+		rm -rf JFdocs.html/archive/$$delfile*;	\
+		echo "deleting:" JFdocs.text/$$delfile*;	\
+		rm -rf JFdocs.text/$$delfile*;		\
+		echo "deleting:" JFdocs.text/archive/$$delfile*; \
+		rm -rf JFdocs.text/archive/$$delfile*;	\
+	done
+
+	cat debian/except.list |					\
+	while read delfile; do						\
+		case $$delfile in \#*) continue;; esac; 		\
+		debian/listremove debian/INDEX-JF.html $$delfile HTML	\
+			> debian/INDEX-JF.html.tmp;			\
+		mv debian/INDEX-JF.html.tmp debian/INDEX-JF.html;	\
+		debian/listremove debian/INDEX-JF.txt $$delfile TEXT	\
+			> debian/INDEX-JF.txt.tmp;			\
+		mv debian/INDEX-JF.txt.tmp debian/INDEX-JF.txt;		\
+	done
+
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+
+	# Add here commands to clean up after the build process.
+	#-$(MAKE) clean
+	rm -rf JFdocs.html JFdocs.text
+	rm -rf kernel-docs-2.2 kernel-docs-2.4 kernel-docs-2.6
+	rm -rf JFdocs
+	rm -f	debian/doc-linux-ja-html.menu	\
+		debian/INDEX-JF.html		\
+		debian/INDEX-JF.html.tmp	\
+		debian/INDEX-JF.txt		\
+		debian/INDEX-JF.txt.tmp
+
+	dh_clean
+
+install: DH_OPTIONS=
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# Add here commands to install the package into debian/doc-linux-ja.
+	#$(MAKE) install DESTDIR=$(CURDIR)/debian/doc-linux-ja
+
+	cp -a JFdocs.html/* $(HTMLDIR)
+	cp -a JFdocs.text/* $(TEXTDIR)
+	cp -a kernel-docs-2.2 $(TEXTDIR)
+	cp -a kernel-docs-2.4 $(TEXTDIR)
+	cp -a kernel-docs-2.6 $(TEXTDIR)
+	# install -m 644 gif/* $(HTMLDIR)
+	#debian/html2docs ja/HOWTO HOWTO \
+	#	$(HTMLDIR)/.dhelp debian/doc-linux-ja-html.menu \
+	#	debian/INDEX-JF.html
+	cd debian/doc-linux-ja-html/usr/share/doc/doc-linux-ja-html/ && \
+		ln -sf ../HOWTO/ja-html HOWTO
+	cd debian/doc-linux-ja-text/usr/share/doc/doc-linux-ja-text/ && \
+		ln -sf ../HOWTO/ja-txt HOWTO
+
+#	dh_movefiles
+
+# Build architecture-independent files here.
+# Pass -i to all debhelper commands in this target to reduce clutter.
+binary-indep: build install
+	dh_testdir -i
+	dh_testroot -i
+#	dh_installdebconf -i
+	dh_installdocs -i
+	dh_installexamples -i
+#	dh_installmenu -i
+#	dh_installlogrotate -i
+#	dh_installemacsen -i
+#	dh_installpam -i
+#	dh_installmime -i
+#	dh_installinit -i
+	dh_installcron -i
+#	dh_installman -i
+	dh_installinfo -i
+#	dh_undocumented -i
+	dh_installchangelogs  -i
+	dh_link -i
+	dh_compress -i -X.dhelp
+	dh_fixperms -i
+	dh_installdeb -i
+#	dh_perl -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+# Build architecture-dependent files here.
+binary-arch: 
+
+#	dh_testdir -a
+#	dh_testroot -a
+##	dh_installdebconf -a
+#	dh_installdocs -a
+#	dh_installexamples -a
+#	dh_installmenu -a
+##	dh_installlogrotate -a
+##	dh_installemacsen -a
+##	dh_installpam -a
+##	dh_installmime -a
+##	dh_installinit -a
+#	dh_installcron -a
+##	dh_installman -a
+#	dh_installinfo -a
+##	dh_undocumented -a
+#	dh_installchangelogs  -a
+#	dh_strip -a
+#	dh_link -a
+#	dh_compress -a
+#	dh_fixperms -a
+##	dh_makeshlibs -a
+#	dh_installdeb -a
+##	dh_perl -a
+#	dh_shlibdeps -a
+#	dh_gencontrol -a
+#	dh_md5sums -a
+#	dh_builddeb -a
+
+binary: binary-indep binary-arch
+#.PHONY: build clean binary-indep binary-arch binary install configure
+.PHONY: build clean binary-indep binary install configure
