--- gpsmanshp-1.2.1.orig/debian/gpsmanshp-dev.files
+++ gpsmanshp-1.2.1/debian/gpsmanshp-dev.files
@@ -0,0 +1,5 @@
+usr/include/*
+usr/lib/lib*.a
+usr/lib/lib*.so
+usr/lib/pkgconfig/*
+/usr/lib/*.la
--- gpsmanshp-1.2.1.orig/debian/postinst
+++ gpsmanshp-1.2.1/debian/postinst
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -e
+
+TCLVERSION="8.4"
+cd /usr/lib/tcl$TCLVERSION
+echo "pkg_mkIndex -lazy -verbose . gpsmanshp.so" | tclsh$TCLVERSION 2>&1 > /dev/null
+
--- gpsmanshp-1.2.1.orig/debian/watch
+++ gpsmanshp-1.2.1/debian/watch
@@ -0,0 +1,9 @@
+# Example watch control file for uscan
+# Rename this file to "watch" and then you can run the "uscan" command
+# to check for upstream updates and more.
+# See uscan(1) for format
+
+# Compulsory line, this is a version 3 file
+version=3
+
+http://gpsmanshp.sourceforge.net/watch/gpsmanshp_(.*).tgz
--- gpsmanshp-1.2.1.orig/debian/rules
+++ gpsmanshp-1.2.1/debian/rules
@@ -0,0 +1,56 @@
+#!/usr/bin/make -f
+# Uncomment this to turn on verbose mode.
+
+CFLAGS = -fpic -g
+TMPROOT = debian/tmp
+DOCDIR = $(TMPROOT)/usr/share/doc/gpsmanshp
+HTMLDOCS = doc/GPSManSHP.pdf
+TCLVERSION = 8.4
+INSTALLDIR = $(TMPROOT)/usr/lib/tcl$(TCLVERSION)
+
+build: 
+	$(MAKE) -f Makefile8.4.4
+
+clean:
+	$(MAKE) -f Makefile8.4.4 clean
+	rm -rf debian/tmp debian/files
+	rm -f debian/*~
+	rm -f debian/substvars
+
+install: build
+	rm -rf $(TMPROOT) debian/files
+	mkdir -p $(INSTALLDIR)
+	mkdir -p $(DOCDIR)/html
+	install -m 644 gpsmanshp.so $(INSTALLDIR) 
+#	echo "pkg_mkIndex -lazy -verbose . gpsmanshp.so" | tclsh$(TCLVERSION)
+#	$(MAKE) install INSTALLDIR=$(INSTALLDIR)
+
+
+# Build architecture-dependent files here.
+binary-arch: install
+	cp $(HTMLDOCS) $(DOCDIR)/html
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+	strip --remove-section=.note --remove-section=.comment $(INSTALLDIR)/gpsmanshp.so
+endif
+	cp debian/copyright $(DOCDIR)
+	cp debian/changelog $(DOCDIR)/changelog.Debian
+	gzip -9 $(DOCDIR)/changelog.Debian
+	chown -R root.root $(INSTALLDIR)
+	chown -R root.root $(DOCDIR)
+	chmod 644 $(DOCDIR)/* $(DOCDIR)/html/*
+	chmod 755 $(DOCDIR)/html
+	mkdir $(TMPROOT)/DEBIAN
+	cp debian/postinst $(TMPROOT)/DEBIAN/postinst
+	chmod 755 $(TMPROOT)/DEBIAN/postinst
+	cp debian/prerm $(TMPROOT)/DEBIAN/prerm
+	chmod 755 $(TMPROOT)/DEBIAN/prerm
+	dpkg-shlibdeps $(INSTALLDIR)/gpsmanshp.so
+	dpkg-gencontrol -isp
+	(cd $(TMPROOT) ; md5sum usr/lib/tcl$(TCLVERSION)/gpsmanshp.so > DEBIAN/md5sums ; md5sum usr/share/doc/gpsmanshp/* >>  DEBIAN/md5sums ; md5sum usr/share/doc/gpsmanshp/html/*  >>  DEBIAN/md5sums )
+	dpkg-deb --build $(TMPROOT) ..
+
+binary: binary-arch
+
+binary-indep: build install
+
+.PHONY: build clean binary-arch binary install
--- gpsmanshp-1.2.1.orig/debian/compat
+++ gpsmanshp-1.2.1/debian/compat
@@ -0,0 +1 @@
+4
--- gpsmanshp-1.2.1.orig/debian/gpsmanshp1.dirs
+++ gpsmanshp-1.2.1/debian/gpsmanshp1.dirs
@@ -0,0 +1 @@
+usr/lib
--- gpsmanshp-1.2.1.orig/debian/gpsmanshp1.files
+++ gpsmanshp-1.2.1/debian/gpsmanshp1.files
@@ -0,0 +1 @@
+usr/lib/lib*.so.*
--- gpsmanshp-1.2.1.orig/debian/copyright
+++ gpsmanshp-1.2.1/debian/copyright
@@ -0,0 +1,15 @@
+This package was debianized by Rogerio Reis <rvr@debian.org> on
+Tue,  4 Mar 2003 12:29:56 +0000.
+
+It was downloaded from http://gpsmanshp.sourceforge.net/watch/
+
+Upstream Author: Miguel Filgueiras migf@portugalmail.pt
+
+This software is Copyright (c) 2002-2011 Miguel Filgueiras 
+(mig@portugalmail.pt).
+
+You are free to distribute this software under the terms of
+the GNU General Public License.
+On Debian systems, the complete text of the GNU General Public
+License can be found in /usr/share/common-licenses/GPL file.
+
--- gpsmanshp-1.2.1.orig/debian/changelog
+++ gpsmanshp-1.2.1/debian/changelog
@@ -0,0 +1,71 @@
+gpsmanshp (1.2.1-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Rogerio Reis <rvr@debian.org>  Sun, 23 Oct 2011 16:23:13 +0100
+
+gpsmanshp (1.2-5) unstable; urgency=low
+
+  * Ill formed pattern in watch file.
+
+ -- Rogerio Reis <rvr@debian.org>  Sun, 11 Jan 2009 10:18:01 +0000
+
+gpsmanshp (1.2-4) unstable; urgency=low
+
+  * Bug fix: "debian/watch fails to report upstream&#39;s version", thanks
+    to Raphael Geissert (Closes: #450169).
+
+ -- Rogerio Reis <rvr@debian.org>  Fri, 09 Jan 2009 13:16:11 +0000
+
+gpsmanshp (1.2-3) unstable; urgency=low
+
+  *  binary-indep tag added to debian/rules (closes: #395693)
+
+ -- Rogerio Reis <rvr@debian.org>  Wed,  1 Nov 2006 11:23:15 +0000
+
+gpsmanshp (1.2-2) unstable; urgency=low
+
+  * Bug fix: remotion of the package now cleans back pkgIndex.tcl (Closes: #328495).
+
+ -- Rogerio Reis <rvr@debian.org>  Wed,  5 Oct 2005 15:31:44 +0100
+
+gpsmanshp (1.2-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Rogerio Reis <rvr@debian.org>  Thu,  9 Sep 2004 18:23:52 +0100
+
+gpsmanshp (1.1-1) unstable; urgency=low
+
+  * New upstream release 
+  * Architecture corrected. (Closes: 252890)
+
+ -- Rogerio Reis <rvr@debian.org>  Sat,  5 Jun 2004 22:31:15 +0100
+
+gpsmanshp (1.0.3-1) unstable; urgency=low
+
+  * New upstream release.
+  * Now for tcl8.4
+  * Bug fix: "gpsmanshp: fails to install on m68k", thanks to Christian
+    T. Steigies (Closes: #195247).
+
+ -- Rogerio Reis <rvr@debian.org>  Fri,  4 Jun 2004 23:54:36 +0100
+
+gpsmanshp (1.0.1-3) unstable; urgency=low
+
+  * package needs to depend on tcl for postinst pkg_mkIndex call (closes: #195247)
+
+ -- Rogerio Reis <rvr@debian.org>  Tue, 10 Jun 2003 14:35:20 +0100
+
+gpsmanshp (1.0.1-2) unstable; urgency=low
+
+  * pkgInst generation corrected.
+
+ -- Rogerio Reis <rvr@debian.org>  Thu,  6 Mar 2003 12:59:15 +0000
+
+gpsmanshp (1.0.1-1) unstable; urgency=low
+
+  * Initial Release. (closes: #183128)
+
+ -- Rogerio Reis <rvr@debian.org>  Tue,  4 Mar 2003 12:43:24 +0000
+
--- gpsmanshp-1.2.1.orig/debian/prerm
+++ gpsmanshp-1.2.1/debian/prerm
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+TCLVERSION="8.4"
+PKGIDX="/usr/lib/tcl"$TCLVERSION"/pkgIndex.tcl"
+cd /usr/lib/tcl$TCLVERSION
+if [ `sed /gpsmanshp/d $PKGIDX | sed /^#/d | wc -w` = 0 ]
+then
+    rm $PKGIDX ;
+else 
+    sed -i /gpsmanshp/d $PKGIDX ;
+fi
--- gpsmanshp-1.2.1.orig/debian/gpsmanshp-dev.dirs
+++ gpsmanshp-1.2.1/debian/gpsmanshp-dev.dirs
@@ -0,0 +1,2 @@
+usr/lib
+usr/include
--- gpsmanshp-1.2.1.orig/debian/docs
+++ gpsmanshp-1.2.1/debian/docs
@@ -0,0 +1 @@
+GPL.txt
--- gpsmanshp-1.2.1.orig/debian/dirs
+++ gpsmanshp-1.2.1/debian/dirs
@@ -0,0 +1,3 @@
+usr/lib/tcl8.4/gpsmanshp
+usr/share/doc/gpsmanshp
+usr/share/doc/gpsmanshp/html
--- gpsmanshp-1.2.1.orig/debian/control
+++ gpsmanshp-1.2.1/debian/control
@@ -0,0 +1,15 @@
+Source: gpsmanshp
+Section: interpreters
+Priority: optional
+Maintainer: Rogerio Reis <rvr@debian.org>
+Build-Depends: debhelper (>= 8.0.0 ), libshp-dev, tcl8.4, tcl8.4-dev
+Standards-Version: 3.9.2
+
+Package: gpsmanshp
+Architecture: any
+Depends:  tcllib, ${shlibs:Depends}, 
+Description: A Tcl interface to shapelib
+ A Tcl package that provides the means of creating and reading files
+ in the ESRI Shapefile for keeping 2 or 3 dimensional points and
+ polylines.
+
