--- sary-1.2.0.orig/debian/copyright
+++ sary-1.2.0/debian/copyright
@@ -1,9 +1,26 @@
 This package was debianized by Masato Taruishi <taru@debian.org> on
 Sun, 26 Nov 2000 00:29:09 +0900.
 
-It was downloaded from ftp://ftp.namazu.org/sary/
+It was downloaded from http://sary.sourceforge.net/
 
-Upstream Author(s): Satoru Takabayashi  <satoru-t@is.aist-nara.ac.jp>
+Upstream Author: Satoru Takabayashi  <satoru-t@is.aist-nara.ac.jp>
 
 Copyright:
- LGPL: see /usr/share/common-licenses/LGPL for more details
+
+    This package is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This package 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
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this package; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
+    USA.
+
+On Debian systems, the complete text of the GNU Lesser General
+Public License can be found in `/usr/share/common-licenses/LGPL'.
--- sary-1.2.0.orig/debian/libsary-dev.install
+++ sary-1.2.0/debian/libsary-dev.install
@@ -0,0 +1,5 @@
+usr/include/*
+usr/lib/lib*.a
+usr/lib/lib*.so
+usr/lib/*.la
+usr/lib/pkgconfig/*
--- sary-1.2.0.orig/debian/sary.install
+++ sary-1.2.0/debian/sary.install
@@ -0,0 +1,3 @@
+usr/bin/sary
+usr/bin/mksary
+usr/share/man/man1/*
--- sary-1.2.0.orig/debian/rules
+++ sary-1.2.0/debian/rules
@@ -1,125 +1,141 @@
 #!/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
+# Copyright 2004 Hidetaka Iwai <tyuyu@debian.or.jp>
 
 # This is the debhelper compatability version to use.
-export DH_COMPAT=2
+#export DH_COMPAT=2
+
+# Include dpatch stuff.
+include /usr/share/dpatch/dpatch.make
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
 
-# This has to be exported to make some magic below work.
-export DH_OPTIONS
+CFLAGS = -Wall -g
 
-configure: configure-stamp
-configure-stamp:
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+	INSTALL_PROGRAM += -s
+endif
+
+
+configure:
 	dh_testdir
-	# Add here commands to configure the package.
-	install -d build && cd build && ../configure --prefix /usr
 
-	touch configure-stamp
+	./autogen.sh
 
-build: configure-stamp build-stamp
-build-stamp:
+config.status: configure
 	dh_testdir
 
-	# Add here commands to compile the package.
-	cd build && $(MAKE)
+	CFLAGS="$(CFLAGS)" /bin/sh configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --sysconfdir=/etc
+
+build: build-stamp
+build-stamp: patch config.status 
+	@echo "--- Compiling"
+
+	dh_testdir
+
+	$(MAKE)
 
 	touch build-stamp
 
-clean:
+clean: clean1 unpatch
+clean1: 
+	@echo "--- Cleaning"
 	dh_testdir
 	dh_testroot
-	rm -f build-stamp configure-stamp
+	rm -f build-stamp 
 
-	# Add here commands to clean up after the build process.
-	#	-$(MAKE) -C build clean
-	-rm -rf build
+	[ ! -f Makefile ] || $(MAKE) distclean
+ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+	cp -f /usr/share/misc/config.sub config.sub
+endif
+ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+	cp -f /usr/share/misc/config.guess config.guess
+endif
 
 	dh_clean
 
-install: DH_OPTIONS=
 install: build
 	dh_testdir
 	dh_testroot
-	dh_clean -k
+	dh_prep
+	dh_clean
 	dh_installdirs
 
-	# Add here commands to install the package into debian/tmp.
-	$(MAKE) -C build install DESTDIR=`pwd`/debian/tmp docsdir=/usr/share/doc/sary/docs
+	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp docsdir=/usr/share/doc/sary/docs
 
-	dh_movefiles
+	dh_install --sourcedir=$(CURDIR)/debian/tmp --fail-missing
 
 # Build architecture-independent files here.
 # Pass -i to all debhelper commands in this target to reduce clutter.
-binary-indep: DH_OPTIONS=-i
 binary-indep: build install
-	# Need this version of debhelper for DH_OPTIONS to work.
-	dh_testversion 1.1.17
-	dh_testdir
-	dh_testroot
-#	dh_installdebconf
-	dh_installdocs
-	dh_installexamples
-	dh_installmenu
-#	dh_installemacsen
-#	dh_installpam
-#	dh_installinit
-	dh_installcron
-#	dh_installmanpages
-	dh_installinfo
-#	dh_undocumented
-	dh_installchangelogs
-	dh_link
-	dh_compress
-	dh_fixperms
-	# You may want to make some executables suid here.
-	dh_suidregister
-	dh_installdeb
-#	dh_perl
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
+	dh_testdir -i
+	dh_testroot -i
+	dh_installchangelogs -i ChangeLog
+	dh_installdocs -i 
+#	dh_installexamples -i 
+#	dh_install -i
+	dh_installmenu -i
+#	dh_installdebconf -i
+#	dh_installlogrotate -i
+#	dh_installemacsen -i
+#	dh_installpam -i
+#	dh_installmime -i
+#	dh_installinit -i
+#	dh_installcron -i
+#	dh_installinfo -i
+#	dh_installman -i
+#	dh_link -i
+#	dh_strip -i
+	dh_compress -i
+	dh_fixperms -i
+#	dh_perl -i
+#	dh_python -i
+#	dh_makeshlibs -i
+	dh_installdeb -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
 
 # Build architecture-dependent files here.
 # Pass -a to all debhelper commands in this target to reduce clutter.
-binary-arch: DH_OPTIONS=-a
 binary-arch: build install
-	# Need this version of debhelper for DH_OPTIONS to work.
-	dh_testversion 1.1.17
-	dh_testdir
-	dh_testroot
-#	dh_installdebconf
-	dh_installdocs
-	dh_installexamples
-	dh_installmenu
-#	dh_installemacsen
-#	dh_installpam
-#	dh_installinit
-	dh_installcron
-#	dh_installmanpages
-	dh_installinfo
-	dh_undocumented -psary mksary.1 sary.1
-	DH_OPTIONS= dh_undocumented -plibsary-dev sary-config.1
-	dh_installchangelogs
-	dh_strip
-	dh_link
-	dh_compress
-	dh_fixperms
-	# You may want to make some executables suid here.
-	dh_suidregister
-	dh_installdeb
-	dh_makeshlibs
-#	dh_perl
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
+	dh_testdir -a
+	dh_testroot -a
+	dh_installchangelogs -a ChangeLog 
+	dh_installdocs -a 
+	dh_installexamples -a 
+#	dh_install -a 
+#	dh_installmenu -a 
+#	dh_installdebconf -a
+#	dh_installlogrotate -a
+#	dh_installemacsen -a 
+#	dh_installpam -a
+#	dh_installmime -a
+#	dh_installinit -a
+#	dh_installcron -a
+#	dh_installinfo -a
+	dh_installman -a
+	dh_link -a
+	dh_strip -a
+	dh_compress -a
+	dh_fixperms -a
+#	dh_perl -a
+#	dh_python -a
+	dh_makeshlibs -a -L libsary10 -l debian/libsary10/usr/lib/
+	dh_installdeb -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-arch binary install patch unpatch clean1
--- sary-1.2.0.orig/debian/changelog
+++ sary-1.2.0/debian/changelog
@@ -1,3 +1,39 @@
+sary (1:1.2.0-2) unstable; urgency=low
+
+  * New maintainer. Taking over by sponsor, because I cannot contact to
+    former maintainer Hidetaka Iwai for months. (closes: Bug#540947)
+  * Acqknowledgement of NMU fix.
+  * Fix lintian errors in debian/rules, control, and etc.
+
+ -- Masahito Omote <omote@debian.org>  Sat, 23 Jan 2010 06:28:29 +0000
+
+sary (1:1.2.0-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Move to automake1.7.  Closes: #355590.
+
+ -- Matej Vela <vela@debian.org>  Tue, 14 Mar 2006 19:14:49 +0100
+
+sary (1:1.2.0-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Hidetaka Iwai <tyuyu@debian.or.jp>  Sun,  3 Apr 2005 07:56:19 +0900
+
+sary (1:1.1.0-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Hidetaka Iwai <tyuyu@debian.or.jp>  Sun, 12 Dec 2004 01:08:52 +0900
+
+sary (1:1.0.4+20040106-1) unstable; urgency=low
+
+  * CVS current release.
+  * debian/control: New maintainer with previous maintainer's agreement.
+  * First upload to Debian.  Close wnpp bug.  (Closes: Bug#226594)
+
+ -- Hidetaka Iwai <tyuyu@debian.or.jp>  Thu,  8 Jan 2004 20:20:59 +0900
+
 sary (1.0.4) unstable; urgency=low
 
   * new upstream release.
@@ -33,8 +69,3 @@
   * Initial Release.
 
  -- Masato Taruishi <taru@debian.org>  Sun, 26 Nov 2000 00:29:09 +0900
-
-Local variables:
-mode: debian-changelog
-add-log-mailing-address "taru@debian.org"
-End:
--- sary-1.2.0.orig/debian/README.source
+++ sary-1.2.0/debian/README.source
@@ -0,0 +1,5 @@
+This package uses dpatch for managing all modifications to the upstream source
+code. See /usr/share/doc/dpatch/README.source.gz for more details on how to
+use them.
+
+-- Masahito Omote <omote@debian.org>, Sat, 23 Jan 2010 13:10:00 +0900
--- sary-1.2.0.orig/debian/sary-doc.doc-base.ja
+++ sary-1.2.0/debian/sary-doc.doc-base.ja
@@ -2,7 +2,7 @@
 Title: Suffix Array Manual (Japanese)
 Author: Satoru Takabayashi  <satoru-t@is.aist-nara.ac.jp>
 Abstract: This manual describes what suffix array is (Japanese)
-Section: Apps/Programming
+Section: Programming
 
 Format: HTML
 Index: /usr/share/doc/sary/docs/ja/suffix-array.html
--- sary-1.2.0.orig/debian/libsary10.install
+++ sary-1.2.0/debian/libsary10.install
@@ -0,0 +1,3 @@
+usr/lib/libsary.so.*
+
+
--- sary-1.2.0.orig/debian/sary-doc.doc-base
+++ sary-1.2.0/debian/sary-doc.doc-base
@@ -2,7 +2,7 @@
 Title: Suffix Array Manual
 Author: Satoru Takabayashi  <satoru-t@is.aist-nara.ac.jp>
 Abstract: This manual describes what suffix array is.
-Section: Apps/Programming
+Section: Programming
 
 Format: HTML
 Index: /usr/share/doc/sary/docs/en/suffix-array.html
--- sary-1.2.0.orig/debian/sary-doc.doc-base.libsary
+++ sary-1.2.0/debian/sary-doc.doc-base.libsary
@@ -4,7 +4,7 @@
 Abstract: This manual describes what libsary is
  and how it can be used to
  manage online manuals on Debian systems.
-Section: Apps/Programming
+Section: Programming
 
 Format: HTML
 Index: /usr/share/doc/sary/docs/en/libsary.html
--- sary-1.2.0.orig/debian/control
+++ sary-1.2.0/debian/control
@@ -1,13 +1,13 @@
 Source: sary
 Section: text
 Priority: optional
-Maintainer: Masato Taruishi <taru@debian.org>
-Build-Depends: debhelper (>= 1.1.17), libglib1.2-dev
-Standards-Version: 3.1.1
+Maintainer: Masahito Omote <omote@debian.org>
+Build-Depends: automake1.7, libtool, debhelper (>= 7), libglib2.0-dev, dpatch
+Standards-Version: 3.8.3.0
 
 Package: sary
 Architecture: any
-Depends: ${shlibs:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: A suffix array library (program)
  Sary is a suffix array library.  It provides fast full-text
  search facilities for huge, say, 10 MB, 100 MB text files
@@ -18,6 +18,7 @@
 Package: sary-doc
 Section: doc
 Architecture: all
+Depends: ${misc:Depends}
 Description: A suffix array library (documentation)
  Sary is a suffix array library.  It provides fast full-text
  search facilities for huge, say, 10 MB, 100 MB text files
@@ -26,10 +27,10 @@
  This package contains documentations for sary and the suffix
  array algorithm.
 
-Package: libsary5
+Package: libsary10
 Section: libs
 Architecture: any
-Depends: ${shlibs:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: A suffix array library (runtime library)
  Sary is a suffix array library.  It provides fast full-text
  search facilities for huge, say, 10 MB, 100 MB text files
@@ -39,9 +40,9 @@
  library.
 
 Package: libsary-dev
-Section: devel
+Section: libdevel
 Architecture: any
-Depends: libsary5 (= ${Source-Version})
+Depends: libsary10 (= ${binary:Version}), ${misc:Depends}
 Suggests: sary-doc
 Description: A suffix array library (development)
  Sary is a suffix array library.  It provides fast full-text
--- sary-1.2.0.orig/debian/compat
+++ sary-1.2.0/debian/compat
@@ -0,0 +1 @@
+7
--- sary-1.2.0.orig/debian/sary-doc.install
+++ sary-1.2.0/debian/sary-doc.install
@@ -0,0 +1,2 @@
+usr/share/doc/sary/docs/*
+
--- sary-1.2.0.orig/debian/sary-doc.doc-base.libsary-ja
+++ sary-1.2.0/debian/sary-doc.doc-base.libsary-ja
@@ -4,7 +4,7 @@
 Abstract: This manual describes what libsary is 
  and how it can be used to
  manage online manuals on Debian systems. (Japanese)
-Section: Apps/Programming
+Section: Programming
 
 Format: HTML
 Index: /usr/share/doc/sary/docs/ja/libsary.html
