--- namazu2-2.0.10.orig/filter/win32/Makefile
+++ namazu2-2.0.10/filter/win32/Makefile
@@ -0,0 +1,281 @@
+# Generated automatically from Makefile.in by configure.
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = /bin/sh
+
+srcdir = .
+top_srcdir = ../..
+prefix = /usr
+exec_prefix = ${prefix}
+
+bindir = ${exec_prefix}/bin
+sbindir = ${exec_prefix}/sbin
+libexecdir = /usr/lib/cgi-bin
+datadir = ${prefix}/share
+sysconfdir = /etc
+sharedstatedir = ${prefix}/com
+localstatedir = /var/lib
+libdir = ${exec_prefix}/lib
+infodir = ${prefix}/share/info
+mandir = ${prefix}/share/man
+includedir = ${prefix}/include
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/namazu
+pkglibdir = $(libdir)/namazu
+pkgincludedir = $(includedir)/namazu
+
+top_builddir = ../..
+
+ACLOCAL = aclocal
+AUTOCONF = autoconf
+AUTOMAKE = automake
+AUTOHEADER = autoheader
+
+INSTALL = /usr/bin/install -c
+INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_SCRIPT = ${INSTALL_PROGRAM}
+transform = s,x,x,
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+ADDITIONAL_INC = .
+AS = @AS@
+CATALOGS =  ja.gmo ja_JP.SJIS.gmo es.gmo fr.gmo
+CATOBJEXT = .gmo
+CC = gcc
+CHASEN = /usr/bin/chasen
+COPYRIGHT = Copyright (C) 1997-1999 Satoru Takabayashi All rights reserved.\nCopyright (C) 2000,2001 Namazu Project All rights reserved.
+DATADIRNAME = share
+DLLTOOL = @DLLTOOL@
+DO_CHASEN = /usr/bin/chasen -j -F '\%m '
+DO_CHASEN_NOUN = /usr/bin/chasen -j -F '\%m %H\\n'
+DO_KAKASI = module_kakasi -ieuc -oeuc -w
+ECHO = printf %s\n
+EMACS = @EMACS@
+EXEEXT = 
+GENCAT = 
+GMOFILES =  ja.gmo ja_JP.SJIS.gmo es.gmo fr.gmo
+GMSGFMT = /usr/bin/msgfmt
+GT_NO = 
+GT_YES = #YES#
+INCLUDE_LOCALE_H = #include <locale.h>
+INSTOBJEXT = .mo
+INTLDEPS = 
+INTLLIBS = 
+INTLOBJS = 
+KAKASI = module_kakasi
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LN_S = ln -s
+LTALLOCA = 
+LTVERSION = 5:0:2
+LYNX = 
+MAILING_ADDRESS = bug-namazu@namazu.org
+MAINT = #
+MAKEINFO = makeinfo
+MKINSTALLDIRS = ./mkinstalldirs
+MSGFMT = /usr/bin/msgfmt
+NKF = module_nkf
+NMZ_LIBOBJS = 
+OBJDUMP = @OBJDUMP@
+OBJEXT = o
+OPT_ADMIN_EMAIL = webmaster@valkyrie.northeye.org
+OPT_NMZ_URI = http://www.namazu.org/
+OPT_WAKATI_DEFAULT = KAKASI
+PACKAGE = namazu
+PERL = /usr/bin/perl
+POFILES =  ja.po ja_JP.SJIS.po es.po fr.po
+POSUB = po
+RANLIB = ranlib
+STRIP = strip
+USE_INCLUDED_LIBINTL = no
+USE_NLS = yes
+VERSION = 2.0.10rc1
+WISH = 
+l = 
+lispdir = @lispdir@
+
+AUTOMAKE_OPTIONS = 1.4 no-dependencies
+
+filterdir = $(pkgdatadir)/filter/win32
+
+filter_DATA = olemsword.pl 	     oleexcel.pl 	     olepowerpoint.pl 	     ichitaro456.pl 	     oletaro.pl 	     olertf.pl
+
+
+EXTRA_DIST = $(filter_DATA)
+
+ETAGS_ARGS = $(filter_DATA) --lang=perl
+TAGS_DEPENDENCIES = $(filter_DATA)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = 
+DATA =  $(filter_DATA)
+
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: # Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu filter/win32/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+install-filterDATA: $(filter_DATA)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(filterdir)
+	@list='$(filter_DATA)'; for p in $$list; do \
+	  if test -f $(srcdir)/$$p; then \
+	    echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(filterdir)/$$p"; \
+	    $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(filterdir)/$$p; \
+	  else if test -f $$p; then \
+	    echo " $(INSTALL_DATA) $$p $(DESTDIR)$(filterdir)/$$p"; \
+	    $(INSTALL_DATA) $$p $(DESTDIR)$(filterdir)/$$p; \
+	  fi; fi; \
+	done
+
+uninstall-filterDATA:
+	@$(NORMAL_UNINSTALL)
+	list='$(filter_DATA)'; for p in $$list; do \
+	  rm -f $(DESTDIR)$(filterdir)/$$p; \
+	done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	here=`pwd` && cd $(srcdir) \
+	  && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+	-rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = filter/win32
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-filterDATA
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-filterDATA
+uninstall: uninstall-am
+all-am: Makefile $(DATA)
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+	$(mkinstalldirs)  $(DESTDIR)$(filterdir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-tags clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-tags distclean-generic clean-am
+	-rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-tags maintainer-clean-generic \
+		distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: uninstall-filterDATA install-filterDATA tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-am uninstall all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- namazu2-2.0.10.orig/lisp/namazu.el
+++ namazu2-2.0.10/lisp/namazu.el
@@ -575,7 +575,7 @@
 	  (set-buffer buffer)
 	  (goto-char (point-min))
 	  (let (directive value1 value2)
-	    (while (re-search-forward "\\(^[ \t]*\\(INDEX\\|BASE\\|\
+	    (while (re-search-forward "\\(^[ \t]*\\(Index\\|INDEX\\|BASE\\|\
 LOGGING\\|LANG\\|SCORING\\)[ \t]+\\([^ \t\n#]+\\)\\)\\|\
 \\(^[ \t]*\\(REPLACE\\)[ \t]+\\([^ \t\n#]+\\)[ \t]+\\([^ \t\n#]+\\)\\)" nil t)
 	      (cond ((match-string 1)   ; only 1 value
@@ -607,11 +607,11 @@
     (if config-file
 	(progn
 	  (setq conf-alist (namazu-read-config-file config-file))
-	  (setq cell (assoc "INDEX" conf-alist))
+	  (setq cell (assoc "Index" conf-alist))
 	  (and cell
 	       (setq dir (cdr cell)))
 	  dir)
-      "/usr/local/namazu/index")))
+      "/var/lib/namazu/index")))
 
 (defun namazu-mode ()
   "Namazu $B$N8!:w7k2L$r1\Mw$9$k$?$a$N%b!<%I$G$9!#(B
--- namazu2-2.0.10.orig/tknamazu/configure
+++ namazu2-2.0.10/tknamazu/configure
@@ -908,7 +908,7 @@
 if test "${with_wish+set}" = set; then
   withval="$with_wish"
   echo "$ac_t""using $with_wish for wish" 1>&6
-	WISH = $with_wish
+	WISH=$with_wish
 else
   	for ac_prog in wish8.0jp wish4.2jp wish8.3 wish8.2 wish8.1 wish
 do
--- namazu2-2.0.10.orig/debian/changelog
+++ namazu2-2.0.10/debian/changelog
@@ -0,0 +1,125 @@
+namazu2 (2.0.10-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Takuo KITAME <kitame@northeye.org>  Sun, 27 Jan 2002 21:31:38 +0900
+
+namazu2 (2.0.9+2.0.10rc1-1) unstable; urgency=low
+
+  * New upstream release
+  * lisp/namazu.el:
+    - search 'Index' instead of 'INDEX'
+    - default index directory is /var/lib/namazu/index
+  * use debian/emacsen-startup.el instead of namazu-init.el
+  * debian/rules:
+    - rm -rf usr/share/locale/ja_JP.SJIS (closes: #125643)
+
+ -- Takuo KITAME <kitame@northeye.org>  Tue, 18 Dec 2001 20:11:19 +0900
+
+namazu2 (2.0.9-1) unstable; urgency=high
+
+  * New upstream release
+    This includes security fix.
+
+ -- Takuo KITAME <kitame@northeye.org>  Sat,  1 Dec 2001 21:40:25 +0900
+
+namazu2 (2.0.7-2) unstable; urgency=low
+
+  * Fix bushism in emacsen-install
+
+ -- Takuo KITAME <kitame@northeye.org>  Wed, 19 Sep 2001 17:44:25 +0900
+
+namazu2 (2.0.7-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Takuo KITAME <kitame@northeye.org>  Fri, 14 Sep 2001 10:31:04 +0900
+
+namazu2 (2.0.6-2) unstable; urgency=low
+
+  * Added german template file (closes: #110085)
+  * Fix description (closes: #111927)
+
+ -- Takuo KITAME <kitame@northeye.org>  Wed, 12 Sep 2001 02:32:04 +0900
+
+namazu2 (2.0.6-1) unstable; urgency=low
+
+  * New upstream release
+  * fix build problem on hppa (closes: Bug#105005)
+  * cgi copying when upgrade (by debconf)
+
+ -- Takuo KITAME <kitame@northeye.org>  Tue, 21 Aug 2001 10:43:35 +0900
+
+namazu2 (2.0.5-3) unstable; urgency=low
+
+  * Maintainer Release, Thanks NMU fix (closes: Bug#94106, Bug#88217)
+  * Build with kakasi
+
+ -- Takuo KITAME <kitame@northeye.org>  Fri, 11 May 2001 06:49:29 +0900
+
+namazu2 (2.0.5-2.1) unstable; urgency=low
+
+  * debian/rules: use the just built namazu for tknamazu (closes: bug#88217)
+
+ -- Marcelo E. Magallon <mmagallo@debian.org>  Mon, 16 Apr 2001 00:44:33 +0200
+
+namazu2 (2.0.5-2) unstable; urgency=low
+
+  * debian/control: Suggests: libtext-kakasi-perl
+
+ -- Takuo KITAME <kitame@northeye.org>  Sat, 25 Nov 2000 00:42:02 +0900
+
+namazu2 (2.0.5-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Takuo KITAME <kitame@northeye.org>  Wed, 25 Oct 2000 03:20:18 +0900
+
+namazu2 (2.0.4-4) unstable; urgency=low
+
+  * install default tknamazurc in /etc/namazu/ as conffiles.
+    (/usr/share/tknamazu/tknamazurc as symlink)
+
+ -- Takuo KITAME <kitame@northeye.org>  Wed,  6 Sep 2000 22:36:51 +0900
+
+namazu2 (2.0.4-3) unstable; urgency=low
+
+  * debian/control: Package namazu2-doc, renamed to namazu2-common.
+  * including tknamazu into namazu2.
+
+ -- Takuo KITAME <kitame@northeye.org>  Sat,  2 Sep 2000 17:20:32 +0900
+
+namazu2 (2.0.4-2) unstable; urgency=low
+
+  * Include namazu.el
+
+ -- Takuo KITAME <kitame@northeye.org>  Mon,  8 May 2000 23:41:53 +0900
+
+namazu2 (2.0.4-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Takuo KITAME <kitame@northeye.org>  Mon, 10 Apr 2000 17:09:16 +0900
+
+namazu2 (2.0.3-1) unstable; urgency=low
+
+  * New upstream release.
+  * changed package structure
+     Added namazu2-index-tools (separated from namazu2)
+     Removed libfile-mmagic-perl, it is going it's own package, ITPed.
+  
+ -- Takuo KITAME <kitame@northeye.org>  Thu,  6 Apr 2000 10:00:57 +0900
+
+namazu2 (2.0-2) unstable; urgency=low
+
+  * debian/control: Added more dependency informations.
+
+ -- Takuo KITAME <kitame@northeye.org>  Wed, 23 Feb 2000 01:43:59 +0900
+
+namazu2 (2.0-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Takuo KITAME <kitame@northeye.org>  Mon, 21 Feb 2000 10:35:05 +0900
+
+
--- namazu2-2.0.10.orig/debian/templates.ja
+++ namazu2-2.0.10/debian/templates.ja
@@ -0,0 +1,8 @@
+Template: namazu2/install
+Type: string
+Description-ja: cgi をほかにどこへインストールしますか？(ディレクトリ)
+ なまずパッケージはデフォルトで /usr/lib/cgi-bin/namazu.cgi にインストールされます。
+ しかし、バーチャルホストの場合、別の場所へコピーする必要があるかもしれません。
+ この設定により、アップグレード/インストール時に自動的に特定の場所へ cgi をコピーします。
+ 複数のディレクトリは空白で区切ってください。
+ もし、必要ないのなら、何も入力しないでください。
--- namazu2-2.0.10.orig/debian/copyright
+++ namazu2-2.0.10/debian/copyright
@@ -0,0 +1,36 @@
+This package was debianized by Takuro KITAME kitame@debian.or.jp on
+Fri, 21 May 1999 03:43:59 +0900.
+
+It was downloaded from <http://openlab.ring.gr.jp/namazu/>
+
+Copyright:
+ 
+ (from one of source codes.)
+
+/*
+ * 
+ * namazu.c - search client of Namazu
+ * Version   1.3.0.10 [08/31/1999]
+ *
+ * Copyright (C) 1997-1999 Satoru Takabayashi  All rights reserved.
+ * This is free software with ABSOLUTELY NO WARRANTY.
+ * 
+ * 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 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA
+ * 
+ * This file must be encoded in EUC-JP encoding.
+ * 
+ */
+
--- namazu2-2.0.10.orig/debian/templates.de
+++ namazu2-2.0.10/debian/templates.de
@@ -0,0 +1,9 @@
+Template: namazu2/install
+Type: string
+Description-de: Wohin das CGI-Programm installieren (Verzeichnis)?
+ Namazu wird standardm=E4=DFig in /usr/lib/cgi-bin/namazu.cgi installiert.
+ F=FCr virtuelle Hosts m=FCssen Sie das Script m=F6glicherweise an eine
+ andere Stelle kopieren. Bei Upgrades wird das Script dann immer an
+ die von Ihnen angegebene Stelle kopiert. Mehrere Verzeichnisse sollten
+ mit einem Leerzeichen getrennt werden. Wenn Sie dies nicht brauchten,
+ dann geben Sie hier NULL ein.
--- namazu2-2.0.10.orig/debian/rules
+++ namazu2-2.0.10/debian/rules
@@ -0,0 +1,135 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This is the debhelper compatability version to use.
+export DH_COMPAT=3
+
+tmp = namazu2
+
+build: build-stamp
+build-stamp:
+	dh_testdir
+
+	# Namazu2
+	./configure --prefix=/usr \
+                --mandir=\$${prefix}/share/man \
+                --infodir=\$${prefix}/share/info \
+                --sysconfdir=/etc \
+                --localstatedir=/var/lib \
+                --libexecdir=/usr/lib/cgi-bin
+
+	# Add here commands to compile the package.
+	$(MAKE)
+	# TkNamazu
+	cd tknamazu && ./configure --prefix=/usr --with-wish=/usr/bin/wish --with-namazu=$(PWD)/src/namazu --with-mknmz=$(PWD)/scripts/mknmz && $(MAKE)
+
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+
+	# Add here commands to clean up after the build process.
+	-$(MAKE) distclean
+	-(cd tknamazu && $(MAKE) distclean)
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	$(MAKE) install \
+            prefix=`pwd`/debian/$(tmp)/usr \
+            sysconfdir=`pwd`/debian/$(tmp)/etc \
+            localstatedir=`pwd`/debian/$(tmp)/var \
+            libexecdir=`pwd`/debian/$(tmp)/usr/lib/cgi-bin
+
+	cd tknamazu && $(MAKE) install prefix=`pwd`/../debian/$(tmp)/usr
+
+	mv `pwd`/debian/$(tmp)/etc/namazu/namazurc-sample \
+       `pwd`/debian/$(tmp)/etc/namazu/namazurc
+	mv `pwd`/debian/$(tmp)/etc/namazu/mknmzrc-sample \
+       `pwd`/debian/$(tmp)/etc/namazu/mknmzrc
+	rm -f `pwd`/debian/$(tmp)/usr/share/namazu/filter/ole*
+
+	mv `pwd`/debian/$(tmp)/usr/share/namazu/doc/* \
+       `pwd`/debian/$(tmp)/usr/share/doc/namazu2-common/
+	mv `pwd`/debian/$(tmp)/usr/share/namazu/etc/* \
+       `pwd`/debian/$(tmp)/usr/share/doc/namazu2-common/
+	mv `pwd`/debian/$(tmp)/usr/share/tknamazu/tknamazurc \
+       `pwd`/debian/$(tmp)/etc/namazu/
+
+	touch `pwd`/debian/$(tmp)/etc/namazu/cgidirs
+
+	cp lisp/gnus*.el lisp/namazu.el `pwd`/debian/$(tmp)/usr/share/emacs/site-lisp/namazu/
+	cp debian/namazu-init.el `pwd`/debian/$(tmp)/usr/share/emacs/site-lisp/namazu/
+
+	dh_movefiles --sourcedir=debian/$(tmp)
+	-find debian/$(tmp)/usr -type d -empty | xargs rmdir -p > /dev/null 2>&1
+	rm -rf `pwd`/debian/$(tmp)/var/namazu
+
+	# Bug#125643
+	rm -rf `pwd`/debian/$(tmp)/usr/share/locale/ja_JP.SJIS
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+	dh_testdir
+	dh_testroot
+	dh_installdocs -i
+	dh_installchangelogs -pnamazu2-common ChangeLog
+	dh_undocumented -pnamazu2-index-tools gcnmz.1 kwnmz.1 mailutime.1 nmzgrep.1 rfnmz.1 vfnmz.1
+	rm -rf `pwd`/debian/namazu2-index-tools/usr/share/doc/namazu2-index-tools
+	dh_link -pnamazu2-index-tools /usr/share/doc/namazu2-common /usr/share/doc/namazu2-index-tools
+	dh_compress -i
+	dh_fixperms -i
+	# You may want to make some executables suid here.
+	dh_installdeb -i
+	dh_perl -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+# Build architecture-dependent files here.
+binary-arch: build install
+#	dh_testversion
+	dh_testdir
+	dh_testroot
+	dh_installdebconf -pnamazu2
+	dh_installdocs -a
+	dh_installchangelogs -plibnmz3 -plibnmz3-dev ChangeLog
+	dh_installexamples -a
+	dh_installemacsen -pnamazu2
+	dh_installmenu -a
+	dh_installcron -a
+	dh_installmanpages -pnamazu2 tests/data/en/man.1 tests/data/en/man.1 man/mknmz.1
+	dh_installinfo -a
+	dh_undocumented -plibnmz3-dev nmz-config.1
+	dh_undocumented -pnamazu2 bnamazu.1 tknamazu.1
+	rm -rf `pwd`/debian/namazu2/usr/share/doc/namazu2
+	dh_link -a -pnamazu2 /usr/share/doc/namazu2-common /usr/share/doc/namazu2
+	dh_link -a -pnamazu2 /usr/share/tknamazu/tknamazurc /etc/namazu/tknamazurc
+	dh_strip -a
+	dh_compress -a
+	dh_fixperms -a
+
+	# You may want to make some executables suid here.
+	dh_suidregister -a
+	dh_makeshlibs -a -plibnmz3
+	dh_installdeb -a
+	dh_perl -a
+	dh_shlibdeps -a -l`pwd`/debian/libnmz3/usr/lib -- -Ldebian/libnmz3/DEBIAN/shlibs
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- namazu2-2.0.10.orig/debian/libnmz3-dev.files
+++ namazu2-2.0.10/debian/libnmz3-dev.files
@@ -0,0 +1,5 @@
+usr/include
+usr/lib/*.a
+usr/lib/*.la
+usr/lib/*.so
+usr/bin/nmz-config
--- namazu2-2.0.10.orig/debian/ex.doc-base.package
+++ namazu2-2.0.10/debian/ex.doc-base.package
@@ -0,0 +1,22 @@
+Document: namazu2
+Title: Debian namazu2 Manual
+Author: <insert document author here>
+Abstract: This manual describes what namazu2 is
+ and how it can be used to
+ manage online manuals on Debian systems.
+Section: unknown
+
+Format: debiandoc-sgml
+Files: /usr/doc/namazu2/namazu2.sgml.gz
+
+Format: postscript
+Files: /usr/doc/namazu2/namazu2.ps.gz
+
+Format: text
+Files: /usr/doc/namazu2/namazu2.text.gz
+
+Format: HTML
+Index: /usr/doc/namazu2/html/index.html
+Files: /usr/doc/namazu2/html/*.html
+
+  
--- namazu2-2.0.10.orig/debian/control
+++ namazu2-2.0.10/debian/control
@@ -0,0 +1,67 @@
+Source: namazu2
+Section: text
+Priority: optional
+Maintainer: Takuo KITAME <kitame@northeye.org>
+Build-Depends: debhelper (>> 3.0.0), perl, kakasi, chasen, libnkf-perl, libfile-mmagic-perl, libtext-kakasi-perl, wish, lynx
+Standards-Version: 3.5.2.0
+
+Package: namazu2
+Architecture: any
+Depends: ${shlibs:Depends}, namazu2-common, debconf (>> 0.9)
+Suggests: www-browser, apache, namazu2-index-tools, emacsen-common, wish
+Conflicts: namazu (<< 2.0), namazu-el, tknamazu
+Provides: namazu
+Replaces: namazu (<< 2.0)
+Description: Full text search engine (namazu binary and cgi)
+ Namazu is a full text search engine with is usable via cgi. It features
+ a simple and easy setup, and is written in C and Perl. Namazu uses the
+ text utilities nkf and kakasi (or chasen, which is not available in
+ Debian).
+ .
+ This package includes binary only for search index.
+ To create indexes, please install namazu2-index-tools package.
+
+Package: namazu2-index-tools
+Architecture: all
+Depends: ${perl:Depends}, libfile-mmagic-perl, namazu2-common
+Suggests: namazu2, libnkf-perl, libtext-kakasi-perl|kakasi|chasen
+Conflicts: namazu (<< 2.0)
+Replaces: namazu (<< 2.0)
+Description: Full text search engine (Tools for index handling)
+ Namazu is a full text search engine with is usable via cgi. It features
+ a simple and easy setup, and is written in C and Perl. Namazu uses the
+ text utilities nkf and kakasi (or chasen, which is not available in
+ Debian).
+ .
+ This package including only index handling(ex, create) tools.
+ Index file format of namazu2 is incompatible with namazu1's one.
+ Actually, namazu2 packages is needed for searching.
+
+Package: namazu2-common
+Architecture: all
+Conflicts: namazu2-doc
+Replaces: namazu2-doc
+Suggests: namazu2, namazu2-index-tools
+Description: Full text search engine (Document files)
+ Namazu is a full text search engine with is usable via cgi. It features
+ a simple and easy setup, and is written in C and Perl. Namazu uses the
+ text utilities nkf and kakasi (or chasen, which is not available in
+ Debian).
+ .
+ This package including only document files, also message catalogue.
+
+Package: libnmz3
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Namazu shared library
+ Namazu shared library.
+ .
+ Namazu is a full text search engine with is usable via cgi. 
+
+Package: libnmz3-dev
+Architecture: any
+Depends: libnmz3
+Description: libnmz header files and static libraries.
+ libnmz header files and static libraries.
+ .
+ Namazu is a full text search engine with is usable via cgi. 
--- namazu2-2.0.10.orig/debian/docs
+++ namazu2-2.0.10/debian/docs
@@ -0,0 +1,6 @@
+INSTALL
+NEWS
+README
+README-ja
+TODO
+ChangeLog.1
--- namazu2-2.0.10.orig/debian/libfile-mmagic-perl.files
+++ namazu2-2.0.10/debian/libfile-mmagic-perl.files
@@ -0,0 +1,2 @@
+usr/lib/perl5
+usr/share/man/man3/File::MMagic.3pm
--- namazu2-2.0.10.orig/debian/shlibs.local
+++ namazu2-2.0.10/debian/shlibs.local
@@ -0,0 +1 @@
+libnmz 3 libnmz3
--- namazu2-2.0.10.orig/debian/conffiles
+++ namazu2-2.0.10/debian/conffiles
@@ -0,0 +1,2 @@
+/etc/namazu/namazurc
+/etc/namazu/cgidirs
--- namazu2-2.0.10.orig/debian/libnmz3.postinst
+++ namazu2-2.0.10/debian/libnmz3.postinst
@@ -0,0 +1,7 @@
+#!/bin/sh 
+
+set -e
+
+/sbin/ldconfig
+
+#DEBHELPER#
--- namazu2-2.0.10.orig/debian/libnmz3.files
+++ namazu2-2.0.10/debian/libnmz3.files
@@ -0,0 +1 @@
+usr/lib/*.so.*
--- namazu2-2.0.10.orig/debian/dirs
+++ namazu2-2.0.10/debian/dirs
@@ -0,0 +1,4 @@
+etc/namazu
+var/lib/namazu/index
+usr/share/doc/namazu2-common
+usr/share/emacs/site-lisp/namazu
--- namazu2-2.0.10.orig/debian/namazu2-index-tools.files
+++ namazu2-2.0.10/debian/namazu2-index-tools.files
@@ -0,0 +1,4 @@
+usr/bin/{gcnmz,kwnmz,mailutime,mknmz,nmzgrep,rfnmz,vfnmz}
+usr/share/man/man1/mknmz.1
+usr/share/namazu
+etc/namazu/mknmzrc
--- namazu2-2.0.10.orig/debian/namazu2-doc.files
+++ namazu2-2.0.10/debian/namazu2-doc.files
@@ -0,0 +1,2 @@
+usr/share/locale
+usr/share/doc/namazu2-doc
--- namazu2-2.0.10.orig/debian/namazu2-index-tools.dirs
+++ namazu2-2.0.10/debian/namazu2-index-tools.dirs
@@ -0,0 +1,2 @@
+var/lib/namazu/index
+
--- namazu2-2.0.10.orig/debian/namazu2-index-tools.conffiles
+++ namazu2-2.0.10/debian/namazu2-index-tools.conffiles
@@ -0,0 +1 @@
+/etc/namazu/mknmzrc
--- namazu2-2.0.10.orig/debian/emacsen-install
+++ namazu2-2.0.10/debian/emacsen-install
@@ -0,0 +1,66 @@
+#! /bin/sh -e
+#  /usr/lib/emacsen-common/packages/install/foo
+# [ This particular script hasn't been tested, so be careful. ]
+
+set -e
+
+FLAVOR=$1
+PACKAGE="namazu"
+
+if [ "X${FLAVOR}" = "X" ]; then
+    echo Need argument to determin FLAVOR of emacs;
+    exit 1
+fi
+
+if [ "X${PACKAGE}" = "X" ]; then
+    echo Internal error: need package name;
+    exit 1;
+fi
+
+ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+SITELISP=/usr/share/${FLAVOR}/site-lisp
+
+COMPILE="-batch -q -f batch-byte-compile"
+
+case "${FLAVOR}" in
+	emacs)
+	;;
+	*)
+
+	echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
+	if [ "${FLAVOR}" = "emacs19" ]; then
+		if [ ! -f /usr/share/emacs/site-lisp/custom-init.el ]; then
+		echo " exited."
+		echo "W: Please install custom package for emacs19." ;
+		exit 0;
+		fi
+	fi
+	if [ "${FLAVOR}" = "mule2" ]; then
+		if [ ! -f /usr/share/emacs/site-lisp/custom-mule-init.el ]; then
+		echo " exited."
+		echo "W: Please install custom-mule package for mule2." ;
+		exit 0;
+		fi
+	fi
+
+	rm -rf ${ELCDIR}
+    install -m 755 -d ${ELCDIR}
+
+    # Copy the temp .el files
+    cp ${ELDIR}/*.el ${ELCDIR}/
+
+    # Byte compile them
+    (cd ${ELCDIR}
+        ${FLAVOR} ${COMPILE} *.el >> CompilationLog 2>&1
+		rm -f *.el
+	)
+
+	gzip -9 ${ELCDIR}/CompilationLog
+
+	echo " done."
+	;;
+esac
+
+exit 0;
--- namazu2-2.0.10.orig/debian/emacsen-remove
+++ namazu2-2.0.10/debian/emacsen-remove
@@ -0,0 +1,34 @@
+#!/bin/sh
+# /usr/lib/emacsen-common/packages/remove/foo
+# [ This particular script hasn't been tested either, so be careful. ]
+set -e
+
+FLAVOR=$1
+PACKAGE=namazu
+
+if [ "X${FLAVOR}" = "X" ]; then
+    echo Need argument to determin FLAVOR of emacs;
+    exit 1
+fi
+
+if [ "X${PACKAGE}" = "X" ]; then
+    echo Internal error: need package name;
+    exit 1;
+fi
+
+ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+SITELISP=/usr/share/${FLAVOR}/site-lisp
+
+case "${FLAVOR}" in
+	emacs)
+	;;
+	*)
+	echo -n "remove/${PACKAGE}: Handling removal of emacsen flavor ${FLAVOR} ..."
+	rm -rf ${ELCDIR}
+	echo " done."
+	;;
+esac
+
+exit 0;
--- namazu2-2.0.10.orig/debian/namazu-init.el
+++ namazu2-2.0.10/debian/namazu-init.el
@@ -0,0 +1,12 @@
+;;
+;; namazu-init.el
+;;
+;; Takuo KITAME <kitame@northeye.org>
+
+(setq load-path 
+			(cons 
+			 (concat "/usr/share/" (symbol-name debian-emacs-flavor)
+							 "/site-lisp/namazu")
+			 load-path))
+
+(autoload 'namazu "namazu" nil t)
--- namazu2-2.0.10.orig/debian/templates
+++ namazu2-2.0.10/debian/templates
@@ -0,0 +1,8 @@
+Template: namazu2/install
+Type: string
+Description: Where to install cgi? (directory)
+ Namazu package will be installed in /usr/lib/cgi-bin/namazu.cgi as default.
+ But for VirtualHost, you may need copy cgi scripts to somewhere.
+ I will copy cgi when upgrading or installing automaticaly with this setting.
+ Directories should be separated by white space.
+ If you don't need it, please enter NULL string.
--- namazu2-2.0.10.orig/debian/config
+++ namazu2-2.0.10/debian/config
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+package=namazu2
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+db_title "Configuring Namazu package"
+
+PLACE=""
+
+if [ -f /etc/namazu/cgidirs ]; then
+	PLACE=`cat /etc/namazu/cgidirs`
+fi
+
+#if [ ! -z $PLACE -o ! "x$PLACE" = "x" ]; then
+db_set $package/install "$PLACE"
+#fi
+
+db_input medium $package/install || true
+db_go || true
--- namazu2-2.0.10.orig/debian/postinst
+++ namazu2-2.0.10/debian/postinst
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+set -e
+
+package=namazu2
+
+. /usr/share/debconf/confmodule
+
+CFG=/etc/namazu/cgidirs
+
+if [ "$1" = "configure" ]; then
+
+	db_get namazu2/install
+	PLACE=$RET
+
+	echo $PLACE > $CFG
+	if [ ! -z "$PLACE" -a "x$PLACE" != "x" ]; then
+		for d in $PLACE; do
+			echo "cpoying to $d ..."
+			if [ ! -d $d ]; then
+				install -d $d
+			fi
+			cp -a /usr/lib/cgi-bin/namazu.cgi $d/
+		done
+	fi
+fi	
+
+#DEBHELPER#
--- namazu2-2.0.10.orig/debian/postrm
+++ namazu2-2.0.10/debian/postrm
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -e
+
+package=namazu2
+
+. /usr/share/debconf/confmodule
+
+CFG=/etc/namazu/cgidirs
+
+case "$1" in
+	remove|purge|abort-install)
+	
+	if [ -f $CFG ]; then 
+		for d in `cat $CFG`; do
+			if [ -d $d -a -f $d/namazu.cgi ]; then
+				rm -f $d/namazu.cgi
+			fi
+		done
+	fi
+	;;
+	*)
+	;;
+esac
+
+#DEBHELPER#
