--- mapserver-5.6.5.orig/debian/lintian-overrides
+++ mapserver-5.6.5/debian/lintian-overrides
@@ -0,0 +1,7 @@
+libmapscript-ruby1.9: possible-gpl-code-linked-with-openssl
+libmapscript-ruby1.8: possible-gpl-code-linked-with-openssl
+mapserver-bin: possible-gpl-code-linked-with-openssl
+php5-mapscript: possible-gpl-code-linked-with-openssl
+perl-mapscript: possible-gpl-code-linked-with-openssl
+cgi-mapserver: possible-gpl-code-linked-with-openssl
+python-mapscript: possible-gpl-code-linked-with-openssl
--- mapserver-5.6.5.orig/debian/changelog
+++ mapserver-5.6.5/debian/changelog
@@ -0,0 +1,700 @@
+mapserver (5.6.5-2+squeeze2) stable-security; urgency=high
+
+  * Fix possible SQL injection in WFS (CVE-2011-2703).
+    [http://trac.osgeo.org/mapserver/ticket/3874]
+  * Fix stack based buffer overflows (CVE-2011-2704).
+
+ -- Alan Boudreault <aboudreault@mapgears.com>  Tue, 12 Jul 2011 00:23:32 -0400
+
+mapserver (5.6.5-2) unstable; urgency=high
+
+  * Fix Validation of symbol index values (CVE-2010-1678)
+    [http://trac.osgeo.org/mapserver/ticket/3641]
+	
+ -- Alan Boudreault <aboudreault@mapgears.com>  Thu, 06 Jan 2011 11:18:29 -0500
+
+mapserver (5.6.5-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Build-Depends on libedit-dev as the package FTBFS without it
+    Closes: #606247
+  * Fix pending l10n issues. Debconf translations:
+    - Czech (Miroslav Kure).  Closes: #599847
+    - Vietnamese (Clytie Siddall).  Closes: #601922
+    - Danish (Joe Hansen).  Closes: #605618
+    - Italian (Vincenzo Campanella).  Closes: #605858
+
+ -- Christian Perrier <bubulle@debian.org>  Mon, 06 Dec 2010 07:09:55 +0100
+
+mapserver (5.6.5-1) unstable; urgency=low
+
+  * New upstream release with an important bug fix about scale calculation.
+  * Added OGC SOS server support.
+
+ -- Alan Boudreault <aboudreault@mapgears.com>  Thu, 15 Jul 2010 10:55:19 -0400
+
+mapserver (5.6.4-1) unstable; urgency=high
+
+  [ Alan Boudreault ]
+  * New upstream release, with important security bug fixes.
+  * Fix Buffer overflow in msTmpFile function.
+    [http://trac.osgeo.org/mapserver/ticket/3484]
+  * Fix insecure mapserv CGI command-line debug args.
+    [http://trac.osgeo.org/mapserver/ticket/3485]
+
+  [ Francesco Paolo Lovergine ]
+  * Policy bumped to 3.9.4, no changes required.
+  * Note that in practice bashisms are avoided due to current options selection.
+    (closes: #582098)
+  * Urgency set to high due to security fixes included.
+
+ -- Francesco Paolo Lovergine <frankie@debian.org>  Mon, 12 Jul 2010 22:28:39 +0200
+
+mapserver (5.6.3-2) unstable; urgency=low
+
+  * Added palette support for rgba png.
+
+ -- Alan Boudreault <aboudreault@mapgears.com>  Wed, 30 Jun 2010 09:19:51 -0400
+
+mapserver (5.6.3-1) unstable; urgency=low
+
+  [ Alan Boudreault ]
+  * New upstream release, with important bug fixes.
+  * Fixed some typo in debian/control.
+
+  [ Francesco Paolo Lovergine ]
+  * Policy bumped to 3.8.4 without changes.
+  * Removed Andreas Putzo among Uploaders: last contribution dated more than
+    two years ago.
+  * Added shapelib to Suggests in mapserver-bin. 
+
+ -- Francesco Paolo Lovergine <frankie@debian.org>  Wed, 24 Mar 2010 22:13:25 +0100
+
+mapserver (5.6.1-1) unstable; urgency=low
+
+  [ Alan Boudreault ]
+  * New upstream release, with a few important bug fixes.
+  * Modified ruby mapscript package to use ruby 1.9.1 instead of 1.9.0.
+    (closes: #565831)
+	
+  [ Francesco Paolo Lovergine ]
+  * Removed Fabio Tranchitella from Uploaders.
+
+ -- Francesco Paolo Lovergine <frankie@debian.org>  Tue, 26 Jan 2010 23:03:26 +0100
+
+mapserver (5.6.0+final-1) unstable; urgency=low
+
+  * New upstream release, reissued after some last minute changes. This is
+    the current 5.6.0 upstream version. 
+  * Added a lintian override-file for mismatched 
+    possible-gpl-code-linked-with-openssl error. 
+  * Policy bumped to 3.8.3 (no changes).
+  * Added missing ${misc:Depends} item in each control stanza.
+  * Added a README.source for documenting dpatch use.
+
+ -- Francesco Paolo Lovergine <frankie@debian.org>  Thu, 24 Dec 2009 19:22:16 +0100
+
+mapserver (5.6.0-1) unstable; urgency=low
+
+  [ Alan Boudreault ]
+  * Debhelper compatibility level moved to 7.
+  * Now uses dh_prep instead of deprecated dh_clean -k.
+  * Deprecated dh_movefiles changed in dh_install.
+  * Removed debian/AGG and debian/agg-2.4.uu: use AGG included with Mapserver source.
+  * Clean up of debian/rules: removed all agg related stuff.
+  * Added libxslt1-dev, libpam0g-dev and libreadline-dev build-dependencies. 
+  * Added msencrypt binary.
+  * Added SWF support. (flash)
+  * Added fribidi support.
+  * Added libfribidi-dev, libming-dev build-dependencies.
+  * Added MIGRATION_GUIDE and xml mapfile related files into mapserver-doc package.
+
+ -- Francesco Paolo Lovergine <frankie@debian.org>  Tue, 15 Dec 2009 18:10:22 +0100
+
+mapserver (5.4.2-1) unstable; urgency=high
+
+  * New upstream release, with a few fixes. 
+    Proper fix for CVE-2009-0840.
+    (closes: #535340, #532446)
+
+ -- Alan Boudreault <aboudreault@mapgears.com>  Fri, 24 Jul 2009 09:16:45 -0400
+
+mapserver (5.4.1-1) experimental; urgency=low
+
+  * New upstream release, with a few fixes. 
+
+ -- Alan Boudreault <aboudreault@mapgears.com>  Thu, 04 Jun 2009 14:51:13 -0400
+
+mapserver (5.4.0-1) experimental; urgency=low
+
+  [ Alan Boudreault ]
+  * New upstream release.
+  * Added Alan as Uploader in debian/control.
+  * Removed obsolete html doc generation in debian/rules and 
+    from mapserver-doc package.  
+
+  [ Francesco Paolo Lovergine ]
+  * Updated sections due to ftmpasters changes.
+  * Removed obsolete proj alternative build-dep.
+
+ -- Francesco Paolo Lovergine <frankie@debian.org>  Tue, 26 May 2009 21:45:45 +0200
+
+mapserver (5.2.2-1) unstable; urgency=high
+
+  * New upstream release, with security fixes.
+  * Now using libproj-dev build-dep for new proj package style.
+  * Removed Paul Wise among Uploaders after his request. Also revised list
+    to reflect only recent (less than 24 months) contributors.
+  * Added libogdi3.2-dev build-dependency.
+
+ -- Francesco Paolo Lovergine <frankie@debian.org>  Fri, 27 Mar 2009 13:48:26 +0100
+
+mapserver (5.2.1-2) unstable; urgency=low
+
+  * debian/watch: fixed. (Closes: #515732)
+  * debian/po/ja.po: updated. (Closes: #510897)
+
+ -- Fabio Tranchitella <kobold@debian.org>  Thu, 05 Mar 2009 22:55:48 +0100
+
+mapserver (5.2.1-1) experimental; urgency=low
+
+  * New upstream release.
+    (closes: #509476)
+  * Updated ru.po template.
+    (closes: #504724)
+  * Added es.po template.
+    (closes: #504652)
+
+ -- Francesco Paolo Lovergine <frankie@debian.org>  Tue, 23 Dec 2008 23:24:56 +0100
+
+mapserver (5.2.0-1) experimental; urgency=low
+
+  * New upstream release. Thanks Alan Boudreault.
+    (closes: #498547)
+  * Added libxml2-dev build-dependency.
+  * Deapplied all current patches (merged upstream).
+  * Added Alan as Uploader in debian/control.
+  * Policy bumped to 3.8.0, withour changes.
+  * debian-rules-ignores-make-clean-error lintian warning fixed in debian/rules.
+
+ -- Francesco Paolo Lovergine <frankie@debian.org>  Mon, 29 Sep 2008 16:55:04 +0200
+
+mapserver (5.0.3-3) unstable; urgency=low
+
+  * Updated sv.po template.
+    (closes: #488704)
+  * Turning on again optimization, #487679 was due to GDAL oddity solved in 1.5.2-3.
+
+ -- Francesco Paolo Lovergine <frankie@debian.org>  Tue, 15 Jul 2008 16:30:56 +0200
+
+mapserver (5.0.3-2) unstable; urgency=high
+
+  * Turning off optimization in debian/rules due to serious breakage of mapserver
+    with GCC 4.3. (closes: #487679)
+
+ -- Francesco Paolo Lovergine <frankie@debian.org>  Mon, 23 Jun 2008 16:59:43 +0200
+
+mapserver (5.0.3-1) unstable; urgency=low
+
+  * New upstream release, with a good deal of fixes.
+  * Changed a bit clean-first-build to make lintian happy about 
+    debian-rules-ignores-make-clean-error warning.
+
+ -- Francesco Paolo Lovergine <frankie@debian.org>  Sun, 08 Jun 2008 11:50:22 +0200
+
+mapserver (5.0.2-3) unstable; urgency=high
+
+  * The setup.py script is not able to manage properly static libraries flavor 
+    for AGG now used embedded in mapserver. The trick is explicitly linking by 
+    manipulating the mapscriptvars file before running setup.py. That rendered
+    python-mapscript unusable.
+    (closes: #483400)
+
+ -- Francesco Paolo Lovergine <frankie@debian.org>  Fri, 06 Jun 2008 10:34:21 +0200
+
+mapserver (5.0.2-2) unstable; urgency=low
+
+  * Added embedded AGG 2.4 for use with mapserver. This is a BSD-licensed
+    version roughly functionally identical to current 2.5 version. 
+    See debian/AGG for additional maintainer information about the AGG integration. 
+    (closes: #448198)
+  * Added build-deps for AGG: libsdl1.2-dev, libfreetype6-dev, libx11-dev.
+  * Added build-dep on sharutils for AGG uuencoded distfile.
+  * Fixed maintainer scripts for erroneous if expressions.
+    (closes: #463888)
+  * Policy bumped to 3.7.3 (no changes).
+  * Added Vcs-* fields to debian/control.
+  * Added FastCGI support.
+    (closes: #468172)
+
+ -- Francesco Paolo Lovergine <frankie@debian.org>  Tue, 18 Mar 2008 19:37:00 +0100
+
+mapserver (5.0.2-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Fabio Tranchitella <kobold@debian.org>  Tue, 29 Jan 2008 10:22:10 +0100
+
+mapserver (5.0.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/po/fi.po: added, thanks Esko Arajärvi. (Closes: #457227)
+  * debian/po/de.po: updated, thanks Alwin Meschede. (Closes: #462275)
+  * debian/control: removed build-dep on libwww-dev. (Closes: #457202)
+
+ -- Fabio Tranchitella <kobold@debian.org>  Thu, 24 Jan 2008 10:55:18 +0100
+
+mapserver (5.0.0-3) unstable; urgency=low
+
+  * debian/php5-mapscript.postinst: fixed a typo. (Closes: #446985)
+  * debian/patches/20_php_build.dpatch: removed. (Closes: #447814)
+  * debian/po/gl.po: added. (Closes: #447939)
+  * debian/po/fr.po: added. (Closes: #448821)
+
+ -- Fabio Tranchitella <kobold@debian.org>  Thu, 08 Nov 2007 15:13:37 +0100
+
+mapserver (5.0.0-2) unstable; urgency=low
+
+  * debian/rules, debian/controls: new patch for the ruby bindings, which
+    follows the ruby policy draft.
+
+ -- Fabio Tranchitella <kobold@debian.org>  Thu, 11 Oct 2007 13:46:22 +0200
+
+mapserver (5.0.0-1) unstable; urgency=low
+
+  [ Fabio Tranchitella ]
+  * New upstream release.
+  * Add ruby mapscript support; thanks to Dmitry Kurochkin for the patch.
+    (Closes: #428247)
+  * Do not mangle php.ini, use the conf.d directory instead.
+    (Closes: #443253)
+
+  [ Francesco Paolo Lovergine ]
+  * Updated debconf templates:
+  	 + debian/po/pt.po (Closes: #439697)
+     + debian/po/sv.po (Closes: #436414)
+
+  [ Paul Wise ]
+  * Switch to the new Homepage field.
+
+ -- Fabio Tranchitella <kobold@debian.org>  Thu, 11 Oct 2007 12:54:31 +0200
+
+mapserver (4.10.3-1) unstable; urgency=high
+
+  [ Andreas Putzo ]
+  * New upstream release.
+    - Fixed XSS vulnerabilities.
+      [http://trac.osgeo.org/mapserver/ticket/2256]
+    - Fixed possible buffer overflow in template processing.
+      [http://trac.osgeo.org/mapserver/ticket/2252]
+    (Closes: #439346)
+  * Added myself to Uploaders.
+  * Debconf templates and debian/control reviewed by the debian-l10n-
+    english team as part of the Smith review project. Closes: #433710
+  * Debconf translation updates:
+    - Galician. Closes: #434326
+    - Tamil. Closes: #434401
+    - Russian. Closes: #434406
+    - Portuguese. Closes: #434438
+    - German. Closes: #434653
+    - Vietnamese. Closes: #434758
+    - French. Closes: #435933
+    - Czech. Closes: #436280
+    - Dutch. Closes: #436853
+    
+ -- Andreas Putzo <andreas@putzo.net>  Tue, 28 Aug 2007 08:21:59 +0000
+
+mapserver (4.10.2-1) unstable; urgency=low
+
+  [ Francesco Paolo Lovergine ]
+  * New upstream release.
+    (closes: #412836)
+  * Fixed PHP case in long descriptions.
+    (closes: #425987)
+
+  [ Fabio Tranchitella ]
+  * debian/README.Debian: added a note about PHP and FCGI support.
+    (Closes: #425571)
+
+ -- Fabio Tranchitella <kobold@debian.org>  Sun, 24 Jun 2007 11:44:44 +0200
+
+mapserver (4.10.1-1) unstable; urgency=low
+
+  [ Francesco Paolo Lovergine ]
+  * debian/po/nl.po added. (closes: #415504)
+  * Moved to gdal 1.4.1 dependency. (closes: #424635, #423538)
+  * Removed php4 support (closes: #418313)
+  * Updated long descriptions.
+  * Removed Thomas Sondag among Uploaders (last contribute dated more than 2 years ago).
+  * Moved to libcurl4 build-deps.
+  * Added a debian/README.etch for notes on backporting.
+  * Moved to debhelper compatibility level 5.
+  * Removed superfluous dh_python in debian/rules.
+  * A new debian/control.etch file has been introduced to retain etch compatibility.
+    All php4 related files have been maintained for the same reason. Please, don't remove them!
+  * Merging other relevant patches from BSP NMU 4.10.0-6.1. Thanks Luk Claes.
+  	- Fixed package priority to meet overrides
+  	- Fix language in description (closes: #416449)
+  	- Add Dutch debconf translation (closes: #415504)
+
+  [ Fabio Tranchitella ]
+  * New upstream release.
+
+ -- Francesco Paolo Lovergine <frankie@debian.org>  Mon, 21 May 2007 00:07:28 +0200
+
+mapserver (4.10.0-6) unstable; urgency=low
+
+  * debian/po/ja.po: added, thanks to Kobayashi Noritada. (Closes: #413119)
+  * Change my email address now that I'm a Debian Developer
+
+ -- Paul Wise <pabs@debian.org>  Sat,  3 Mar 2007 17:59:20 +0900
+
+mapserver (4.10.0-5) unstable; urgency=medium
+
+  * debian/po/de.po: added, thanks to Alwin Meschede. (Closes: #405727)
+
+ -- Fabio Tranchitella <kobold@debian.org>  Sat, 13 Jan 2007 22:54:20 +0100
+
+mapserver (4.10.0-4) unstable; urgency=medium
+
+  * debian/po/pt.po: updated. (Closes: #401386)
+  * debian/po/fr.po: added. (Closes: #399395)
+
+ -- Fabio Tranchitella <kobold@debian.org>  Mon, 18 Dec 2006 16:38:22 +0100
+
+mapserver (4.10.0-3) unstable; urgency=low
+
+  * debian/control: build-depends on libpq-dev. (Closes: #396565)
+
+ -- Fabio Tranchitella <kobold@debian.org>  Thu,  2 Nov 2006 11:44:17 +0100
+
+mapserver (4.10.0-2) unstable; urgency=low
+
+  * Upload to unstable.
+
+ -- Fabio Tranchitella <kobold@debian.org>  Wed,  1 Nov 2006 09:47:09 +0100
+
+mapserver (4.10.0-1) experimental; urgency=low
+
+  * New upstream release.
+  * debian/po/fr.po: updated. (Closes: #388573)
+  * debian/po/cz.po: updated. (Closes: #389220)
+
+ -- Fabio Tranchitella <kobold@debian.org>  Fri, 20 Oct 2006 11:01:01 +0000
+
+mapserver (4.8.4-1) unstable; urgency=low
+
+  * New upstream release
+  * Update for new Python policy (Closes: #373461, #360576)
+  * Install shp2mysql.pl as shp2mysql
+  * Remove question from long desc for php mapscript debconf questions
+  * Remove shp2pdf, since mapserver is build without PDFlib (non-free)
+  * Suggest libdbi-perl for mapserver-bin for shp2mysql
+  * Fix shebang lines in debian/php*-config
+  * Remove python mapscript build dirs on clean
+  * Bump Standards-Version (no changes)
+  * Fix gdal build-dep - new upstream is libgdal1-1.3.2-dev (Closes: #383140, #383830, #386073)
+  * Update debconf templates and translations
+
+ -- Paul Wise <pabs3@bonedaddy.net>  Mon, 21 Aug 2006 09:47:48 +0800
+
+mapserver (4.8.3-2) unstable; urgency=low
+
+  [ Petter Reinholdtsen ]
+  * Fix typos in the config and prerm scripts for
+    php[45]-mapscript. (Closes: #363115)
+
+ -- Petter Reinholdtsen <pere@debian.org>  Mon,  1 May 2006 08:43:05 +0200
+
+mapserver (4.8.3-1) unstable; urgency=low
+
+  [ Schuyler Erle ]
+  * New upstream bugfix release 4.8.3
+  * Include patch for sarge backporting and instructions in
+    README.sarge.
+
+  [ Paul Wise ]
+  * New upstream bugfix release 4.8.2
+    - drop 10_python_build: useless, only for Windows
+  * Add php_mapscript.so to apache2 php.ini as well. This is a workaround
+    for #346184, upstream is looking into it.
+  * Install shp2pdf and tile4ms too. Closes: #359615
+  * Change priority to extra in line with ftpmaster override
+
+  [ Petter Reinholdtsen ]
+  * Remove the generated files mapscript/csharp/Makefile and
+    mapscript/php3/Makefile when cleaning up the source directory, to
+    avoid noise in the debian diff.
+
+ -- Petter Reinholdtsen <pere@debian.org>  Sat,  1 Apr 2006 11:14:50 +0200
+
+mapserver (4.8.1-2) unstable; urgency=low
+
+  [ Paul Wise ]
+  * Make the build target no longer depend on build-indep. This is not
+    policy-compliant (see 7.6 and 4.8), but it is needed to work around
+    the fact that the autobuilders call debian/rules build (instead of
+    build-arch), but do not install Build-Depends-Indep packages.
+    build-indep is an indirect dependency of the binary and binary-indep
+    targets, so non-autobuilder builds will still work.
+
+ -- Petter Reinholdtsen <pere@debian.org>  Mon, 20 Feb 2006 11:10:25 +0100
+
+mapserver (4.8.1-1) unstable; urgency=low
+
+  [ Paul Wise ]
+  * New upstream release
+  * Build mapscript html docs using python-docutils and add to mapserver-doc
+  * Add some more things to mapserver-doc
+  * Move the bindings examples into examples subdirs, remove execute perms
+  * Add a TODO.Debian so we don't forget some things
+  * Completely revamp copyright information, remove php4-mapscript.copyright
+  * Prevent FTBFS when using sudo instead of fakeroot (Closes: #351869)
+  * Change Priority to match the override set by the ftpmasters
+
+ -- Petter Reinholdtsen <pere@debian.org>  Sun, 19 Feb 2006 12:51:08 +0100
+
+mapserver (4.6.2-1) unstable; urgency=low
+
+  [ Paul Wise ]
+  * New upstream bugfix release
+  * debian/control: Use Homepage recommendations from the developers reference
+  * Remove useless files: README.debian, php*-mapscript.dirs
+  * Use HISTORY.TXT as the changelog
+  * Change mapserver-doc Architecture to all instead of any
+  * Add a watch file that works with the mapserver plone website
+  * Enable geos support
+  * Move mapserv cgi to /usr/lib/cgi-bin, since it is useless in /usr/bin
+  * Switch from priority optional to extra since mapserver depends on proj
+    and gdal, which are both priority extra.
+  * Remove minor version from Standards-Version, since it is not needed.
+  * Fix gdal build-dep - new upstream is libgdal1-1.3.1-dev (Closes: #350437)
+  * Update debian/rules to use -arch/-indep targets for binary/install/build
+  * Fix case of Build-Conflicts in debian/control
+
+ -- Petter Reinholdtsen <pere@debian.org>  Tue, 31 Jan 2006 20:46:47 +0100
+
+mapserver (4.6.1-6) unstable; urgency=low
+
+  * Install php extensions into the directory output by php-configN and depend
+    on the phpapi virtual package specified by php-configN (Closes: #339007)
+  * Add myself to Uploaders.
+  * Upload sponsored by Petter Reinholdtsen.
+
+ -- Paul Wise <pabs3@bonedaddy.net>  Tue,  6 Dec 2005 15:35:52 +0800
+
+mapserver (4.6.1-5) unstable; urgency=low
+
+  [ Petter Reinholdtsen ]
+  * Add support for php5 mapscript.  New binary package
+    php5-mapscript.  Based on patch from Jon Saints.  (Closes: #333057)
+  * Renamed templates name from php4/* to php4-mapscript/* to match
+    package name.
+  * Fix typo 'Curently'->'Currently' in package description.
+
+ -- Petter Reinholdtsen <pere@debian.org>  Sun, 13 Nov 2005 18:23:30 +0100
+
+mapserver (4.6.1-4) unstable; urgency=low
+
+  * Add Swedish translation by Daniel Nylander. (Closes: #333097)
+  * Change build depend from libcurl3-dev to
+    'libcurl3-gnutls-dev | libcurl3-dev', to cope with the recent
+    change with libcurl and still be easy to backport to sarge.
+    Based on patch from Jon Saints.  (Closes: #336834)
+  * Build-conflict on libcurl3-openssl-dev, to make sure the requested
+    curl library is used by the autobuilders.
+  * Set priority extra for php4-mapscript, to match override files.
+
+ -- Petter Reinholdtsen <pere@debian.org>  Fri,  4 Nov 2005 23:29:24 +0100
+
+mapserver (4.6.1-3) unstable; urgency=low
+
+  * Make sure the strptime() return value have the correct
+    type. (Closes: #328030)
+
+ -- Petter Reinholdtsen <pere@debian.org>  Wed, 14 Sep 2005 00:16:15 +0200
+
+mapserver (4.6.1-2) unstable; urgency=low
+
+  * Change priority from extra to optional to match override file.
+
+ -- Petter Reinholdtsen <pere@debian.org>  Sun, 11 Sep 2005 11:57:10 +0200
+
+mapserver (4.6.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * Dependencies are now installable in sid.  (Closes: #325593)
+  * Use '${misc:Depends}' instead of 'debconf' as dependency to allow
+    cdebconf to be used.
+  * Change depend for php4-mapscript from 'libapache-mod-php4' to
+    'libapache-mod-php4 | phpapi-20020918', as it work with several
+    php packages. (Closes: #322887)
+  * Reindend all copyright files to make them easier to read.  Use
+    last email address of Thomas Sondag in them.  Remove
+    perl-mapscript.copyright as it is identical to changelog.  Keep
+    php4-mapscript.copyright as it is slightly different.
+  * Remove emacs headers from the botton of the changelog and fix invalid
+    date string, to keep dpkg-genchanges happy.
+  * Avoid bashism in debian/php4-mapscript.prerm.
+
+ -- Petter Reinholdtsen <pere@debian.org>  Sun, 11 Sep 2005 11:16:44 +0200
+
+mapserver (4.6.0-1) experimental; urgency=low
+
+  * New upstream release.
+  * Uploading to experimental to get the new php4-mapscript package
+    past NEW while we wait for the c++ transition.
+  * Petter Reinholdtsen
+    - Update the section of the packages to match the debian archive
+      override file.
+    - Change the priority of all packages from optional to extra, as
+      this package depend on proj and gdal which is priority extra.
+    - rm 35_init_vars, not needed any more.
+    - Updated to standard version 3.6.2.1.
+  * Tilman Koschnick
+    - Reactivate php support. (Closes: #306194)
+    - debian/patches/:
+      - update 10_python_build.dpatch
+      - update 20_php_build.dpatch
+      - rm 30_typo_gdal.dpatch (included upstream)
+      - update 35_init_vars.dpatch
+      - rm 40_array_init.dpatch (included upstream)
+      - update 50_clean.dpatch
+  * Debconf translations
+    - Added French (fr) from Steve Petruzzello. (Closes: #303159)
+    - Added Vietnamese (vi) from Clytie Siddall. (Closes: #312750)
+    - Added Czech (cs) from Miroslav Kure. (Closes: #318277)
+
+ -- Petter Reinholdtsen <pere@debian.org>  Tue,  2 Aug 2005 20:37:08 +0200
+
+mapserver (4.4.1-2) unstable; urgency=low
+
+  * Petter Reinholdtsen
+    - Fix typo in package description.
+    - Build using gcc from unstable. (Closes: #302114)
+    - Remove generated config.log in debian/rules, until 50_clean.dpatch
+      is available upstream, to make sure the file is removed at the
+      right time.
+    - Prepare the debconf question for translations.  The PHP support
+      is currently disabled, so the template text is currently unused.
+
+ -- Petter Reinholdtsen <pere@debian.org>  Thu, 31 Mar 2005 00:42:36 +0200
+
+mapserver (4.4.1-1) unstable; urgency=low
+
+  * Petter Reinholdtsen
+    - Initial upload. (Closes: #138971)
+    - Set the Debian GIS project as the maintainer, and Thomas Sondag,
+      Schuyler Erle and myself as uploaders.
+    - Do not build libmapserver-dev any more.  It can't be used without
+      the defines used during compilation, the ABI is not stable, and
+      there are no client programs using it at the moment.
+    - 40_array_init.dpatch: New patch to make array initialization
+      in mapprojhack.c ANSI C.  The patch is already in upstream CVS.
+    - Reindent the license text in debian/copyright, to make it easier
+      to read.
+    - 50_clean.dpatch: New patch to make sure 'make distclean'
+      complete the work even if config.* is missing.
+    - Drop php support, as the php version in Debian is built without
+      the required regex support.  Document the changes in
+      60_php_drop.dpatch.
+
+ -- Petter Reinholdtsen <pere@debian.org>  Sat, 19 Mar 2005 23:49:59 +0100
+
+mapserver (4.4.1-0.dgis.unstable.2) unstable; urgency=low
+
+  * Make big change in packages descriptions fields
+  * Add suggested packages
+  * add pere patch :
+  * Drop the home made patch system, and use dpatch instead.
+  * Remove tabs from empty lines in rules.
+  * Remove dh_testroot where it isn't needed to keep debuild happy and
+    make sure clean and build can be done as a normal user.
+  * Use $(RM) instead of 'rm -f' and 'rm'.
+  * Petter Reinholdtsen
+    - 30_typo_gdal.dpatch: New patch to fix typo in mapdrawgdal.c.
+      The patch is already in upstream CVS.
+    - 35_init_vars.dpatch: New patch to initialize a few variables.
+      The patch is sent upstream.
+
+ -- Thomas Sondag <thomas@microdop.org>  Fri, 21 Jan 2005 15:09:09 +0100
+
+mapserver (4.4.1-0.dgis.unstable.1) unstable; urgency=low
+
+  * update release number 
+  * New upstram release
+  * Major change to rule the files for make a double build one for php 
+    and another one for the rest
+  * Change dep to php4-dev
+  
+ -- Thomas Sondag <thomas@microdop.org>  Fri, 07 Jan 2005 16:16:37 +0100
+
+mapserver (4.2.5-2) unstable; urgency=low
+
+  * Add python Binding
+  * Add patch to Makefile.vc for python binding
+  * Add mapserver binary and tools
+  * Add mapserver documentation package
+  * Change name of php-mapscript to php4-mapscript
+  * Change dependency of php4-mapscript to php4-cgi-mapscript
+  * Add more documentation to perl php mapscript
+  * Add configure section to debian rules
+  * configure with thread safe support
+
+ -- Thomas Sondag <thomas@microdop.org>  Fri, 29 Oct 2004 13:06:50 +0200 
+
+mapserver (4.2.5-1) unstable; urgency=low
+
+  * New upstream version 
+
+ -- Thomas Sondag <thomas@microdop.org>  Mon, 25 Oct 2004 19:13:21 +0200 
+
+mapserver (4.2.0-2) unstable; urgency=low
+
+  * Build For Sarge
+  * Removing libming support (Where is it ? not found in Sarge)
+  
+ -- Thomas Sondag <thomas@microdop.org>  Sun, 25 Jul 2004 15:45:20 +0200
+
+mapserver (4.2.0-1) stable; urgency=low
+
+  * New upstream version
+
+ -- Thomas Sondag <thomas@microdop.org>  Sun,  4 Jul 2004 01:23:00 +0200
+
+mapserver (4.0.2-1) stable; urgency=low
+
+  * New upstream version
+  * adding --without-tiff for fixing problem with perl-mapscript
+
+ -- Thomas Sondag <thomas@microdop.org>  Wed, 04 Feb 2004 19:24:56 +0100
+ 
+mapserver (4.0-1) stable; urgency=low
+
+  * New release
+
+ -- Thomas Sondag <thomas@microdop.org>  Sun, 12 Oct 2003 18:44:57 +0200 
+
+mapserver (3.6.4-5) stable; urgency=low
+
+  * Add patch for msWriteImage function (write image directly to stdout)
+
+ -- Thomas Sondag <thomas.sondag@educagri.fr>  Mon, 28 Jul 2003 14:17:27 +0100
+
+mapserver (3.6.4-4) stable; urgency=low
+
+  * hum nothing 
+
+ -- Thomas Sondag <thomas.sondag@educagri.fr>  Mon, 13 May  2003 14:17:27 +0100
+
+mapserver (3.6.4-3) unstable; urgency=low
+
+  * Added proj 
+
+ -- Thomas Sondag <thomas.sondag@educagri.fr>  Mon, 07 Feb 2003 14:17:27 +0100
+
+mapserver (3.6.4-1) unstable; urgency=low
+
+  * Initial release.
+
+ -- Thomas Sondag <thomas.sondag@educagri.fr>  Mon, 13 Jan 2003 13:32:27 +0100
--- mapserver-5.6.5.orig/debian/mapserver-bin.install
+++ mapserver-5.6.5/debian/mapserver-bin.install
@@ -0,0 +1 @@
+usr/bin/*
--- mapserver-5.6.5.orig/debian/mapserver-bin.debhelper.log
+++ mapserver-5.6.5/debian/mapserver-bin.debhelper.log
@@ -0,0 +1,5 @@
+dh_prep
+dh_prep
+dh_prep
+dh_prep
+dh_prep
--- mapserver-5.6.5.orig/debian/libmapscript-ruby.examples
+++ mapserver-5.6.5/debian/libmapscript-ruby.examples
@@ -0,0 +1 @@
+mapscript/ruby/examples/*
--- mapserver-5.6.5.orig/debian/libmapscript-ruby.debhelper.log
+++ mapserver-5.6.5/debian/libmapscript-ruby.debhelper.log
@@ -0,0 +1,5 @@
+dh_prep
+dh_prep
+dh_prep
+dh_prep
+dh_prep
--- mapserver-5.6.5.orig/debian/watch
+++ mapserver-5.6.5/debian/watch
@@ -0,0 +1,2 @@
+version=2
+http://download.osgeo.org/mapserver/ (?:.*/)?mapserver-?_?([\d+\.]+|\d+)\.tar.* debian uupdate
--- mapserver-5.6.5.orig/debian/libmapscript-ruby.docs
+++ mapserver-5.6.5/debian/libmapscript-ruby.docs
@@ -0,0 +1 @@
+mapscript/ruby/README
--- mapserver-5.6.5.orig/debian/cgi-mapserver.debhelper.log
+++ mapserver-5.6.5/debian/cgi-mapserver.debhelper.log
@@ -0,0 +1,5 @@
+dh_prep
+dh_prep
+dh_prep
+dh_prep
+dh_prep
--- mapserver-5.6.5.orig/debian/rules
+++ mapserver-5.6.5/debian/rules
@@ -0,0 +1,271 @@
+#!/usr/bin/make -f
+# Made with the aid of debmake, by Christoph Lameter,
+# based on the sample debian/rules file for GNU hello by Ian Jackson.
+
+# Uncomment this to turn on verbose mode. 
+#export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+ 
+package=mapserver
+
+version=$(shell expr `pwd` : '.*-\([0-9.]*\)')
+version_major=$(shell expr `pwd` : '.*-\([0-9]*\).[0-9.]*')
+CURDIR := $(shell pwd)
+PYVERS=$(shell pyversions -r debian/control)
+RUBYVERS=1.8 1.9.1
+PHP5API=$(shell php-config5 --phpapi)
+PHP5DIR=$(shell php-config5 --extension-dir)
+
+
+# Configure config :
+# Not using non free libpdf
+# Explicit disable direct goetiff support, 
+# it's better to use gdal geotiff support for stability reasons
+
+
+COMMON_CONFIG=	--prefix=/usr \
+		--enable-debug \
+		--without-tiff \
+		--without-pdf \
+		--with-gd=/usr \
+		--with-freetype=/usr \
+		--with-fribidi-config \
+		--with-ming \
+		--with-zlib=/usr \
+		--with-png=/usr \
+		--with-xpm=/usr \
+		--with-jpeg=/usr \
+		--with-gdal \
+		--with-ogr \
+		--with-proj \
+		--with-eppl \
+		--with-postgis \
+		--with-wcs \
+		--with-sos \
+		--with-wms \
+		--with-wmsclient \
+		--with-wfs \
+		--with-wfsclient \
+		--with-threads \
+		--with-geos \
+		--with-fastcgi \
+		--with-agg \
+		--with-experimental-png
+
+rstoptions=--stylesheet=mapscript.css --link-stylesheet 
+
+MS_CFLAGS=-g -O2
+MS_CXXFLAGS=$(MS_CFLAGS)
+
+configure-stamp: patch
+	dh_testdir
+	./configure $(COMMON_CONFIG) CFLAGS="$(MS_CFLAGS)" CXXFLAGS="$(MS_CXXFLAGS)"
+
+
+	touch configure-stamp
+
+configure-php5-stamp: patch clean-first-build
+	dh_testdir
+	./configure $(COMMON_CONFIG) \
+		--with-php=/usr/include/php5  CFLAGS="$(MS_CFLAGS)" CXXFLAGS="$(MS_CXXFLAGS)"
+
+	touch configure-php5-stamp
+
+# This is the correct, policy-compliant build target
+#build: build-indep build-arch
+
+# This is the incorrect, non-policy compliant build target
+# it is nessecary because the auto-builders use build, but don't install Build-Depends-Indep
+build: build-arch
+
+build-indep: build-indep-stamp
+build-indep-stamp:
+	dh_testdir
+
+	touch build-indep-stamp
+
+build-arch: build-arch-stamp
+build-arch-stamp: configure-stamp
+	dh_testdir
+
+	# Build binary lib
+	$(MAKE) mapscriptvars || touch mapscriptvars
+	$(MAKE)  
+
+	# Build Perl mapscript
+	cd $(CURDIR)/mapscript/perl && \
+		perl Makefile.PL INSTALLDIRS=vendor \
+		&& $(MAKE) LD_RUN_PATH="" OPTIMIZE="-O2 -g -W -Wall"
+
+	# Build python
+	cd $(CURDIR)/mapscript/python && \
+	  set -e; for python in $(PYVERS); do $$python setup.py build; done
+
+	# Build ruby
+	cd $(CURDIR)/mapscript/ruby && set -e ; \
+	  for v in $(RUBYVERS) ; do \
+	    ruby$$v extconf.rb && $(MAKE) && \
+	      mv mapscript.so ruby$$v-mapscript.so ; \
+	  done
+
+	touch build-arch-stamp
+
+build-php5-stamp: configure-php5-stamp
+	dh_testdir
+	-cd mapscript/php3 && \
+		$(MAKE) clean
+	# Build php_mapscript
+	$(MAKE)
+
+# This is needed to do 'make clean', but will be removed by the clean
+# targets.  The end result is that 'debuild clean' only can execute
+# once.  Hack around this problem by faking the creation when make fail.
+
+clean-first-build:
+	dh_testdir
+
+	-$(RM) configure-stamp build-arch-stamp build-indep-stamp
+
+	-$(RM) tile4ms
+	[ ! -f $(CURDIR)/Makefile ] || $(MAKE) mapscriptvars 
+	touch mapscriptvars
+	[ ! -f $(CURDIR)/mapscript/perl/Makefile ] || $(MAKE) distclean -C $(CURDIR)/mapscript/perl
+	-cd mapscript/python && \
+	  for python in $(PYVERS); do $$python setup.py clean; done
+	-$(RM) -rf mapscript/python/build
+	[ ! -f $(CURDIR)/mapscript/ruby/Makefile ] || $(MAKE) distclean -C $(CURDIR)/mapscript/ruby
+	-$(RM) -rf $(CURDIR)/mapscript/ruby/mapscript_wrap.c
+	-$(RM) mapscriptvars
+
+	-$(RM)  mapscript/perl/mapscript.i \
+		mapscript/tcl/mapscript.i \
+		mapscript/python/mapscript.i
+
+	[ ! -f $(CURDIR)/Makefile ] || $(MAKE) distclean
+
+	# Remove some generated files until 50_clean.dpatch is applied upstream.
+	-$(RM) Makefile mapscript/java/Makefile
+	-$(RM) mapscript/csharp/Makefile mapscript/php3/Makefile
+	-$(RM) config.log config.status
+
+	-$(RM) debian/.#* .#*
+
+clean: unpatch clean-first-build
+	dh_testdir
+	dh_prep
+	-$(RM) configure-php5-stamp build-php5-stamp install-arch-stamp install-indep-stamp install-php5-stamp
+	[ ! -f Makefile ] || $(MAKE) distclean
+
+install-indep: install-indep-stamp
+install-indep-stamp: build-indep
+	dh_testdir -i
+	dh_testroot -i
+	dh_installdirs -i
+	dh_install -i
+	touch install-indep-stamp
+
+install-arch: install-arch-stamp install-php5-stamp
+install-arch-stamp: build-arch
+	dh_testdir -a
+	dh_testroot -a
+	dh_installdirs -a
+
+	-mkdir -p debian/tmp/usr/lib/  debian/tmp/usr/include/ \
+		debian/tmp/usr/lib/cgi-bin/ \
+		debian/tmp/usr/bin
+
+	# CGI mapserver
+	install -m755 mapserv debian/tmp/usr/lib/cgi-bin/mapserv
+
+	# Perl mapscript
+	cd $(CURDIR)/mapscript/perl && \
+        $(MAKE) install PREFIX=$(CURDIR)/debian/perl-mapscript/usr/ \
+	                SITEPREFIX=$(CURDIR)/debian/perl-mapscript/usr/
+
+	# Python mapscript
+	cd $(CURDIR)/mapscript/python && set -e ; \
+	  for python in $(PYVERS); do \
+	    $$python setup.py install --root=$(CURDIR)/debian/python-mapscript ; \
+	  done
+
+	# Ruby mapscript
+	cd $(CURDIR)/mapscript/ruby && set -e ; \
+	  for v in $(RUBYVERS) ; do \
+	    ruby$$v extconf.rb ; \
+	      $(MAKE) install sitedir=$(CURDIR)/debian/libmapscript-ruby$$v/usr/lib/ruby ; \
+	      $(MAKE) distclean ; \
+	  done
+
+	# Mapserver  Binary
+	install -m755 legend scalebar shp2img shptree \
+		shptreetst shptreevis sortshp tile4ms msencrypt \
+		debian/tmp/usr/bin
+	install -m755 shp2mysql.pl debian/tmp/usr/bin/shp2mysql
+	touch install-arch-stamp
+
+install-php5-stamp: build-php5-stamp
+	dh_testdir
+	dh_testroot
+
+	-mkdir -p debian/tmp$(PHP5DIR)
+
+	# php5-mapscript
+	install -m644 mapscript/php3/php_mapscript.so \
+		debian/tmp$(PHP5DIR)
+                      
+	echo 'misc:Depends=phpapi-'$(PHP5API) >> debian/php5-mapscript.substvars
+
+	touch install-php5-stamp
+
+binary-indep: install-indep
+	dh_testdir -i
+	dh_testroot -i
+	dh_installchangelogs -i HISTORY.TXT
+	dh_installdocs -i
+	dh_installexamples -i
+	dh_installdebconf -i
+	dh_compress -i -X.xml -X.xsd -X.xsl
+	dh_link -i
+	dh_lintian -i
+	dh_fixperms -i
+	dh_installdeb -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+binary-arch: install-arch
+	dh_testdir -a
+	dh_testroot -a
+	dh_install --autodest --list-missing --sourcedir=debian/tmp
+	dh_installchangelogs -a HISTORY.TXT
+	dh_installdocs -a
+	dh_installexamples -a
+	chmod a-x debian/php*-mapscript/usr/share/doc/php*-mapscript/examples/*.phtml
+	dh_installdebconf -a
+	dh_pycentral -ppython-mapscript
+	dh_compress -a
+	dh_link -a
+	# Overrides a mismatched error from lintian
+	for pkg in $$(cat debian/lintian-overrides|cut -d: -f1); do \
+			echo "$$pkg: possible-gpl-code-linked-with-openssl" >debian/$$pkg.lintian-overrides; \
+			cat debian/$$pkg.lintian-overrides; \
+	done
+	dh_lintian -a
+	dh_strip -a
+	dh_fixperms -a
+	dh_makeshlibs -a
+	dh_installdeb -a
+	dh_shlibdeps -a
+	dh_perl -pperl-mapscript 
+	dh_perl -pmapserver-bin
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+binary: binary-indep binary-arch
+
+.PHONY: build build-arch build-indep clean binary-indep binary-arch binary install install-indep install-arch
+
+include /usr/share/dpatch/dpatch.make
--- mapserver-5.6.5.orig/debian/python-mapscript.examples
+++ mapserver-5.6.5/debian/python-mapscript.examples
@@ -0,0 +1 @@
+mapscript/python/examples/*
--- mapserver-5.6.5.orig/debian/php5-mapscript.debhelper.log
+++ mapserver-5.6.5/debian/php5-mapscript.debhelper.log
@@ -0,0 +1,5 @@
+dh_prep
+dh_prep
+dh_prep
+dh_prep
+dh_prep
--- mapserver-5.6.5.orig/debian/php5-mapscript.templates
+++ mapserver-5.6.5/debian/php5-mapscript.templates
@@ -0,0 +1,15 @@
+Template: php5-mapscript/add_extension
+Type: boolean
+Default: true
+_Description: Should ${extname} be added to /etc/php5/${sapiconfig}/php.ini?
+ You are installing ${extname} support for php5 and it is not yet
+ enabled in the configuration for the ${sapiconfig} SAPI. Enabling
+ this extension will allow php5 scripts to use it.
+
+Template: php5-mapscript/remove_extension
+Type: boolean
+Default: true
+_Description: Should ${extname} be removed from /etc/php5/${sapiconfig}/php.ini?
+ You are removing ${extname} support for php5, but it is still enabled
+ in the configuration for the ${sapiconfig} SAPI.  Leaving this in place
+ will probably cause problems when trying to use PHP.
--- mapserver-5.6.5.orig/debian/README.source
+++ mapserver-5.6.5/debian/README.source
@@ -0,0 +1,10 @@
+Mapserver for Debian
+--------------------
+
+This package uses dpatch to manage all modifications to the upstream
+source. Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
+To get detailed instructions on how to apply the series of patches
+and modify them, please read /usr/share/doc/dpatch/README.source.
+
--- mapserver-5.6.5.orig/debian/perl-mapscript.debhelper.log
+++ mapserver-5.6.5/debian/perl-mapscript.debhelper.log
@@ -0,0 +1,5 @@
+dh_prep
+dh_prep
+dh_prep
+dh_prep
+dh_prep
--- mapserver-5.6.5.orig/debian/README.etch
+++ mapserver-5.6.5/debian/README.etch
@@ -0,0 +1,7 @@
+Note for packagers
+------------------
+
+Starting from >=4.10.2-1 a separate tree is maintained for Etch compatibility
+in order to develop both a clean sid tree and a backporting tree. In practice,
+the etch tree retains PHP4 compatibility, which is instead dropped in lenny,
+due to PHP4 removal.
--- mapserver-5.6.5.orig/debian/cgi-mapserver.install
+++ mapserver-5.6.5/debian/cgi-mapserver.install
@@ -0,0 +1 @@
+usr/lib/cgi-bin/mapserv
--- mapserver-5.6.5.orig/debian/libmapscript-ruby1.9.1.debhelper.log
+++ mapserver-5.6.5/debian/libmapscript-ruby1.9.1.debhelper.log
@@ -0,0 +1,5 @@
+dh_prep
+dh_prep
+dh_prep
+dh_prep
+dh_prep
--- mapserver-5.6.5.orig/debian/perl-mapscript.examples
+++ mapserver-5.6.5/debian/perl-mapscript.examples
@@ -0,0 +1 @@
+mapscript/perl/examples/*
--- mapserver-5.6.5.orig/debian/php5-mapscript.postinst
+++ mapserver-5.6.5/debian/php5-mapscript.postinst
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+#DEBHELPER#
+
+if [ "$1" != "configure" ]; then
+	exit 0
+fi
+
+phpver=php5
+
+for SAPI in apache apache2
+do
+	if [ -f /etc/$phpver/$SAPI/php.ini ] && [ -e /etc/$phpver/$SAPI/conf.d ]; then
+		db_get $phpver/extension_mapscript_$SAPI
+		if [ "$RET" = "true" -a ! -f /etc/$phpver/$SAPI/conf.d/mapscript.ini ]; then
+			echo "extension=php_mapscript.so" > /etc/$phpver/$SAPI/conf.d/mapscript.ini
+		fi
+	fi
+done
+
+exit 0
--- mapserver-5.6.5.orig/debian/php5-mapscript.docs
+++ mapserver-5.6.5/debian/php5-mapscript.docs
@@ -0,0 +1 @@
+mapscript/php3/README
--- mapserver-5.6.5.orig/debian/mapserver-doc.debhelper.log
+++ mapserver-5.6.5/debian/mapserver-doc.debhelper.log
@@ -0,0 +1,5 @@
+dh_prep
+dh_prep
+dh_prep
+dh_prep
+dh_prep
--- mapserver-5.6.5.orig/debian/libmapscript-ruby1.8.debhelper.log
+++ mapserver-5.6.5/debian/libmapscript-ruby1.8.debhelper.log
@@ -0,0 +1,5 @@
+dh_prep
+dh_prep
+dh_prep
+dh_prep
+dh_prep
--- mapserver-5.6.5.orig/debian/php5-mapscript.prerm
+++ mapserver-5.6.5/debian/php5-mapscript.prerm
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+set -e
+
+#DEBHELPER#
+
+if [ "$1" != "remove" ] && [ "$1" != "purge" ]; then
+	exit 0
+fi
+
+. /usr/share/debconf/confmodule
+
+phpver=php5
+
+for SAPI in `find /etc/$phpver/ -type d -maxdepth 1 -mindepth 1 | sed -e's#.*/##'`
+do
+	# Use the same question for all extensions, because it's only
+	# used once per package: right here.
+	if [ -f "/etc/$phpver/$SAPI/php.ini" -a  -f /etc/$phpver/$SAPI/conf.d/mapscript.ini ]; then
+		db_set $phpver-mapscript/remove_extension true
+		db_title "PHP"
+		db_subst $phpver-mapscript/remove_extension extname Mapscript
+		db_subst $phpver-mapscript/remove_extension sapiconfig $SAPI
+		db_input low $phpver-mapscript/remove_extension || true
+		db_go
+
+		db_get $phpver-mapscript/remove_extension
+		if [ "$RET" = "true" ]; then
+	        rm -f /etc/$phpver/$SAPI/conf.d/mapscript.ini
+		fi
+		db_fset $phpver-mapscript/remove_extension seen false
+	fi
+done
+
+exit 0
--- mapserver-5.6.5.orig/debian/control
+++ mapserver-5.6.5/debian/control
@@ -0,0 +1,112 @@
+Source: mapserver
+Section: devel
+Priority: optional
+Maintainer: Debian GIS Project <pkg-grass-devel@lists.alioth.debian.org>
+Uploaders: Francesco Paolo Lovergine <frankie@debian.org>, Alan Boudreault <aboudreault@mapgears.com>
+Standards-Version: 3.9.0
+Build-Depends: debhelper (>= 7), dpatch, libcurl4-gnutls-dev, libpng12-dev, zlib1g-dev (>= 1.1.4),
+ libgd2-xpm-dev (>= 2.0.1-10), libfreetype6-dev (>= 2.0.9), libjpeg62-dev, libgdal1-dev (>=1.4.0), libproj-dev,
+ libpq-dev, php5-dev, swig, python-all, python-all-dev, python-central (>= 0.5), libgeos-dev (>= 2.2.3-2),
+ ruby1.8, ruby1.8-dev, ruby1.9.1, ruby1.9.1-dev,
+ sharutils, libsdl1.2-dev, libfreetype6-dev, libx11-dev,
+ libfcgi-dev, libxml2-dev, libogdi3.2-dev, libxslt1-dev, libpam0g-dev, libreadline-dev, 
+ libfribidi-dev, libming-dev, libedit-dev
+Build-Depends-Indep: python-docutils
+Build-Conflicts: libcurl3-openssl-dev
+XS-Python-Version: all
+Homepage: http://www.mapserver.org
+Vcs-Browser: http://svn.debian.org/viewsvn/pkg-grass/packages/mapserver/trunk
+Vcs-Svn: svn://svn.debian.org/svn/pkg-grass/packages/mapserver/trunk
+
+Package: php5-mapscript
+Section: php
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Suggests: mapserver-bin, mapserver-doc
+Description: php5-cgi module for MapServer
+ PHP MapScript provides MapServer functions for PHP scripts.
+
+Package: perl-mapscript
+Section: perl
+Architecture: any
+Depends: ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Suggests: mapserver-bin, mapserver-doc
+Description: Perl MapServer library
+ Perl MapScript provides MapServer functions for Perl scripts.
+
+Package: cgi-mapserver
+Section: web
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Suggests: mapserver-bin, mapserver-doc
+Description: CGI executable for MapServer
+ This package contains the mapserv CGI program. It provides the
+ MapServer template language, and can be used to implement Web Map
+ Service applications.
+ .
+ MapServer is a CGI-based framework for Internet map services which
+ supports Open Geospatial Consortium (OGC) standards. Scripting
+ functionality in MapScript is provided by the suggested mapscript
+ library packages.
+
+Package: python-mapscript
+Section: python
+Architecture: any
+Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Suggests: mapserver-bin, mapserver-doc
+Provides: ${python:Provides}
+XB-Python-Version: ${python:Versions}
+Description: Python library for MapServer
+ Python MapScript provides MapServer functions for Python scripts.
+
+Package: mapserver-bin
+Section: misc
+Architecture: any
+Depends: ${shlibs:Depends}, ${perl:Depends}, ${misc:Depends}
+Suggests: libdbi-perl, perl-mapscript, python-mapscript, cgi-mapserver, mapserver-doc, php5-mapscript, shapelib
+Description: MapServer utilities
+ This package provides command-line utilities for MapServer.
+ .
+ MapServer is a CGI-based framework for Internet map services which
+ supports Open Geospatial Consortium (OGC) standards. Scripting
+ functionality in MapScript is provided by the suggested mapscript
+ library packages.
+
+Package: mapserver-doc
+Section: doc
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Suggests: perl-mapscript, python-mapscript, php5-mapscript, cgi-mapserver
+Description: documentation for MapServer
+ This package provides some brief documentation for MapServer.
+ .
+ MapServer is a CGI-based framework for Internet map services which
+ supports Open Geospatial Consortium (OGC) standards. Scripting
+ functionality in MapScript is provided by the suggested mapscript
+ library packages.
+
+Package: libmapscript-ruby
+Section: ruby
+Architecture: all
+Depends: libmapscript-ruby1.8
+Description: Ruby MapServer library
+ Ruby MapScript provides MapServer functions for Ruby scripts.
+ .
+ This package contains examples and depends on package for Debian
+ default version of Ruby.
+
+Package: libmapscript-ruby1.8
+Section: ruby
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Suggests: mapserver-bin, mapserver-doc
+Description: Ruby MapServer library
+ Ruby MapScript provides MapServer functions for Ruby scripts.
+
+Package: libmapscript-ruby1.9.1
+Section: ruby
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Suggests: mapserver-bin, mapserver-doc
+Description: Ruby MapServer library
+ Ruby MapScript provides MapServer functions for Ruby scripts.
--- mapserver-5.6.5.orig/debian/README.Debian
+++ mapserver-5.6.5/debian/README.Debian
@@ -0,0 +1,9 @@
+README for mapserver's debian package
+=====================================
+
+This build of mapscript PHP extension can't be load as a 'cgi-fcgi' module for
+stability reason, but only with PHP as an apache DSO. If you need the cgi-fcgi
+support, feel free to build your own package but note that according upstream
+it will not be stable.
+
+ -- Fabio Tranchitella <kobold@debian.org>  Sun, 24 Jun 2007 11:44:44 +0200
--- mapserver-5.6.5.orig/debian/php5-mapscript.config
+++ mapserver-5.6.5/debian/php5-mapscript.config
@@ -0,0 +1,33 @@
+#!/bin/sh -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+db_title "PHP"
+
+phpver=php5
+
+for SAPI in apache apache2
+do
+	# Skip this loop if the config file isn't there (yet).
+	if [ -f "/etc/$phpver/$SAPI/php.ini" ]; then
+		db_register $phpver-mapscript/add_extension $phpver/extension_mapscript_$SAPI
+
+		# FIXME: this is the wrong answer if the SAPI package was
+		# installed after the module was.
+		if [ -n "$2" ] && dpkg --compare-versions "$2" ge 4:4.3.2+rc3-2
+		then
+			if [ -f "/etc/$phpver/$SAPI/conf.d/mapscript.ini" ]; then
+				db_set $phpver/extension_mapscript_$SAPI true
+			else
+				db_set $phpver/extension_mapscript_$SAPI false
+			fi
+		fi
+
+		db_subst $phpver/extension_mapscript_$SAPI extname Mapscript 
+		db_subst $phpver/extension_mapscript_$SAPI sapiconfig $SAPI
+		db_input low $phpver/extension_mapscript_$SAPI || true
+	fi
+done
+
+db_go
--- mapserver-5.6.5.orig/debian/TODO.Debian
+++ mapserver-5.6.5/debian/TODO.Debian
@@ -0,0 +1,6 @@
+Debian mapserver TODO list
+--------------------------
+
+- Include some more bindings when someone requests them.  
+- Rename perl-mapscript to libmapscript-perl. I suppose that by renaming
+  perl-mapscript we should also rename python-mapscript and php5-mapscript.
\ No newline at end of file
--- mapserver-5.6.5.orig/debian/python-mapscript.debhelper.log
+++ mapserver-5.6.5/debian/python-mapscript.debhelper.log
@@ -0,0 +1,5 @@
+dh_prep
+dh_prep
+dh_prep
+dh_prep
+dh_prep
--- mapserver-5.6.5.orig/debian/mapserver-doc.docs
+++ mapserver-5.6.5/debian/mapserver-doc.docs
@@ -0,0 +1,6 @@
+README
+COMMITERS
+fonts
+symbols
+MIGRATION_GUIDE.TXT
+xmlmapfile
--- mapserver-5.6.5.orig/debian/copyright
+++ mapserver-5.6.5/debian/copyright
@@ -0,0 +1,241 @@
+This package was debianized by Thomas Sondag thomas@microdop.org on
+Thu, 23 Jan 2003 16:11:26 +0100.
+
+It was downloaded from http://mapserver.gis.umn.edu/download/
+
+Copyright:
+
+Copyright (c) 1996-2005 Regents of the University of Minnesota.
+Copyright (c) 1996-2001 Regents of the University of Minnesota.
+Copyright (c) 2004, Sean Gillies 
+Copyright (c) 2002-2003, Julien-Samuel Lacroix, DM Solutions Group Inc
+Copyright (c) 2002, Frank Warmerdam
+Copyright (c) 2003, John Novak, Novacell Technologies
+Copyright (c) 2001-2003, Daniel Morissette, DM Solutions Group Inc
+Copyright (c) 2004, Frank Warmerdam <warmerdam@pobox.com>
+Copyright (c) 2003, Y. Assefa, DM Solutions Group Inc
+Copyright (c) 2000-2005, Daniel Morissette, DM Solutions Group Inc
+Copyright (c) 2001, DM Solutions Group Inc
+Copyright (c) 2001, Frank Warmerdam, DM Solutions Group Inc
+Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
+Copyright (c) 2002, Daniel Morissette, DM Solutions Group Inc
+Copyright (c) 2001-2004, Daniel Morissette, DM Solutions Group Inc
+Copyright (c) 2003, Attila Csipa, Manufaktura Internet Inzenjering doo
+Copyright (c) 2005, Sean Gillies - sgillies@frii.com
+Copyright (c) 2004 Sean Gillies.
+Copyright (c) 2000-2005, DM Solutions Group
+Copyright (c) 2000-2005, Daniel Morissette, DM Solutions Group
+Copyright (c) 2000, 2001, Daniel Morissette, DM Solutions Group
+Copyright (c) 2000-2005, DM Solutions Group inc.
+
+md5.c & md5.h:
+
+Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved.
+
+strptime.c:
+
+ * Copyright (c) 1999 Kungliga Tekniska H\uffffgskolan
+ * (Royal Institute of Technology, Stockholm, Sweden).
+ * All rights reserved.
+
+tests/vera:
+
+Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream
+Vera is a trademark of Bitstream, Inc.
+
+mapscript/php3/Makefile.in:
+
+# | Copyright (c) 1997,1998 PHP Development Team (See Credits file)      |
+
+mapscript/python/pygdioctx:
+
+ * Copyright 1995 Richard Jones, Bureau of Meteorology Australia.
+ * richard@bofh.asn.au
+
+
+Licence:
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies of this Software or works derived from this
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+md5.c & md5.h:
+
+License to copy and use this software is granted provided that it
+is identified as the "RSA Data Security, Inc. MD5 Message-Digest
+Algorithm" in all material mentioning or referencing this software
+or this function.
+
+License is also granted to make and use derivative works provided
+that such works are identified as "derived from the RSA Data
+Security, Inc. MD5 Message-Digest Algorithm" in all material
+mentioning or referencing the derived work.
+
+RSA Data Security, Inc. makes no representations concerning either
+the merchantability of this software or the suitability of this
+software for any particular purpose. It is provided "as is"
+without express or implied warranty of any kind.
+
+These notices must be retained in any copies of any part of this
+documentation and/or software.
+
+strptime.c:
+
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of KTH nor the names of its contributors may be
+ *    used to endorse or promote products derived from this software without
+ *    specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY KTH AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KTH OR ITS CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+tests/vera:
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the fonts accompanying this license ("Fonts") and associated
+documentation files (the "Font Software"), to reproduce and distribute
+the Font Software, including without limitation the rights to use,
+copy, merge, publish, distribute, and/or sell copies of the Font
+Software, and to permit persons to whom the Font Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright and trademark notices and this permission notice
+shall be included in all copies of one or more of the Font Software
+typefaces.
+
+The Font Software may be modified, altered, or added to, and in
+particular the designs of glyphs or characters in the Fonts may be
+modified and additional glyphs or characters may be added to the
+Fonts, only if the fonts are renamed to names not containing either
+the words "Bitstream" or the word "Vera".
+
+This License becomes null and void to the extent applicable to Fonts
+or Font Software that has been modified and is distributed under the
+"Bitstream Vera" names.
+
+The Font Software may be sold as part of a larger software package but
+no copy of one or more of the Font Software typefaces may be sold by
+itself.
+
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
+BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL,
+OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT
+SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
+
+Except as contained in this notice, the names of Gnome, the Gnome
+Foundation, and Bitstream Inc., shall not be used in advertising or
+otherwise to promote the sale, use or other dealings in this Font
+Software without prior written authorization from the Gnome Foundation
+or Bitstream Inc., respectively. For further information, contact:
+fonts at gnome dot org.
+
+mapscript/php3/Makefile.in:
+
+# | This program is free software; you can redistribute it and/or modify |
+# | it under the terms of one of the following licenses:                 |
+# |                                                                      |
+# |  A) 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.                                               |
+# |                                                                      |
+# |  B) the PHP License as published by the PHP Development Team and     |
+# |     included in the distribution in the file: LICENSE                |
+# |                                                                      |
+# | 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 both licenses referred to here.   |
+# | If you did not, or have any questions about PHP licensing, please    |
+# | contact core@php.net.                                                |
+
+On Debian systems, the complete text of the GNU General Public License is
+available in `/usr/share/common-licenses/GPL' file.
+
+mapscript/python/pygdioctx:
+
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.  Neither the name of the Bureau of Meteorology
+ * Australia nor the names of its contributors may be used to endorse
+ * or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+renders/agg:
+
+The Anti-Grain Geometry Project
+A high quality rendering engine for C++
+http://antigrain.com
+
+Anti-Grain Geometry - Version 2.4
+Copyright (C) 2002-2005 Maxim Shemanarev (McSeem)
+
+Permission to copy, use, modify, sell and distribute this software
+is granted provided this copyright notice appears in all copies.
+This software is provided "as is" without express or implied
+warranty, and with no claim as to its suitability for any purpose.
+
+[ 
+  Note that current AGG changed license in GPL, but the embedded
+  copy is an older one with the license above.
+]
--- mapserver-5.6.5.orig/debian/pycompat
+++ mapserver-5.6.5/debian/pycompat
@@ -0,0 +1 @@
+2
--- mapserver-5.6.5.orig/debian/compat
+++ mapserver-5.6.5/debian/compat
@@ -0,0 +1 @@
+7
--- mapserver-5.6.5.orig/debian/php5-mapscript.examples
+++ mapserver-5.6.5/debian/php5-mapscript.examples
@@ -0,0 +1 @@
+mapscript/php3/examples/*
--- mapserver-5.6.5.orig/debian/php5-mapscript.install
+++ mapserver-5.6.5/debian/php5-mapscript.install
@@ -0,0 +1 @@
+usr/lib/php5/
--- mapserver-5.6.5.orig/debian/patches/symbol_index_overflow.dpatch
+++ mapserver-5.6.5/debian/patches/symbol_index_overflow.dpatch
@@ -0,0 +1,66 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## symbol_index_overflow.dpatch by Alan Boudreault <aboudreault@mapgears.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad mapserver-5.6.5~/mapdraw.c mapserver-5.6.5/mapdraw.c
+--- mapserver-5.6.5~/mapdraw.c	2010-07-14 05:36:48.000000000 -0400
++++ mapserver-5.6.5/mapdraw.c	2011-01-06 11:54:27.000000000 -0500
+@@ -1408,6 +1408,10 @@
+ 			nStatus = MS_FAILURE;
+ 		}
+ */
++      if (style->symbol >= map->symbolset.numsymbols) {
++          msSetError(MS_SYMERR, "Invalid symbol index: %d", "msDrawShape()", style->symbol);
++          return MS_FAILURE;
++      }
+ #endif
+         else
+         {
+diff -urNad mapserver-5.6.5~/mapfile.c mapserver-5.6.5/mapfile.c
+--- mapserver-5.6.5~/mapfile.c	2010-06-23 13:41:14.000000000 -0400
++++ mapserver-5.6.5/mapfile.c	2011-01-06 11:55:26.000000000 -0500
+@@ -4911,6 +4911,10 @@
+                 return MS_FAILURE;
+               }
+             }
++	    if(!MS_IS_VALID_ARRAY_INDEX(GET_LAYER(map, i)->class[j]->styles[k]->symbol, map->symbolset.numsymbols)) {
++	      msSetError(MS_MISCERR, "Invalid symbol index in class %d, style %d of layer %s.", "msUpdateMapFromURL()", j, k, GET_LAYER(map, i)->name);
++	      return MS_FAILURE;
++	    }
+           }
+         }
+       }
+@@ -5381,13 +5385,17 @@
+ 
+       /* make sure any symbol names for this layer have been resolved (bug #2700) */
+       for(j=0; j<GET_LAYER(map, i)->numclasses; j++) {
+-	for(k=0; k<GET_LAYER(map, i)->class[j]->numstyles; k++) {
++        for(k=0; k<GET_LAYER(map, i)->class[j]->numstyles; k++) {
+           if(GET_LAYER(map, i)->class[j]->styles[k]->symbolname && GET_LAYER(map, i)->class[j]->styles[k]->symbol == 0) {
+             if((GET_LAYER(map, i)->class[j]->styles[k]->symbol =  msGetSymbolIndex(&(map->symbolset), GET_LAYER(map, i)->class[j]->styles[k]->symbolname, MS_TRUE)) == -1) {
+               msSetError(MS_MISCERR, "Undefined symbol \"%s\" in class %d, style %d of layer %s.", "msUpdateMapFromURL()", GET_LAYER(map, i)->class[j]->styles[k]->symbolname, j, k, GET_LAYER(map, i)->name);
+               return MS_FAILURE;
+             }
+           }
++          if(!MS_IS_VALID_ARRAY_INDEX(GET_LAYER(map, i)->class[j]->styles[k]->symbol, map->symbolset.numsymbols)) {
++            msSetError(MS_MISCERR, "Invalid symbol index in class %d, style %d of layer %s.", "msUpdateMapFromURL()", j, k, GET_LAYER(map, i)->name);
++            return MS_FAILURE;
++          }
+         }
+       }
+ 
+diff -urNad mapserver-5.6.5~/mapserver.h mapserver-5.6.5/mapserver.h
+--- mapserver-5.6.5~/mapserver.h	2010-07-14 05:45:57.000000000 -0400
++++ mapserver-5.6.5/mapserver.h	2011-01-06 11:54:27.000000000 -0500
+@@ -373,6 +373,8 @@
+ #define MS_REFCNT_DECR_IS_NOT_ZERO(obj) (MS_REFCNT_DECR(obj))>0
+ #define MS_REFCNT_DECR_IS_ZERO(obj) (MS_REFCNT_DECR(obj))<=0
+ 
++#define MS_IS_VALID_ARRAY_INDEX(index, size) ((index<0 || index>=size)?MS_FALSE:MS_TRUE)
++
+ #endif
+ 
+ /* General enumerated types - needed by scripts */
--- mapserver-5.6.5.orig/debian/patches/00list
+++ mapserver-5.6.5/debian/patches/00list
@@ -0,0 +1,2 @@
+symbol_index_overflow
+01_wfs_sql_injection
--- mapserver-5.6.5.orig/debian/patches/01_wfs_sql_injection.dpatch
+++ mapserver-5.6.5/debian/patches/01_wfs_sql_injection.dpatch
@@ -0,0 +1,1040 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_wfs_sql_injection.dpatch by Alan Boudreault <aboudreault@mapgears.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad mapserver-5.6.5~/maplayer.c mapserver-5.6.5/maplayer.c
+--- mapserver-5.6.5~/maplayer.c	2010-04-20 00:19:06.000000000 -0400
++++ mapserver-5.6.5/maplayer.c	2011-07-12 00:29:58.000000000 -0400
+@@ -1046,6 +1046,85 @@
+   return MS_FAILURE;
+ }
+ 
++/************************************************************************/
++/*                          LayerDefaultEscapeSQLParam                  */
++/*                                                                      */
++/*      Default function used to escape strings and avoid sql           */
++/*      injection. Specific drivers should redefine if an escaping      */
++/*      function is available in the driver.                            */
++/************************************************************************/
++char *LayerDefaultEscapeSQLParam(layerObj *layer, const char* pszString)
++{
++     char *pszEscapedStr=NULL;
++     if (pszString)
++     {
++         int nSrcLen;
++         char c;
++         int i=0, j=0;
++         nSrcLen = (int)strlen(pszString);
++         pszEscapedStr = (char*) malloc( 2 * nSrcLen + 1);
++         for(i = 0, j = 0; i < nSrcLen; i++)
++         {
++             c = pszString[i];
++             if (c == '\'')
++             {
++                 pszEscapedStr[j++] = '\'';
++                 pszEscapedStr[j++] = '\'';
++             }
++             else if (c == '\\')
++             {
++                 pszEscapedStr[j++] = '\\';
++                 pszEscapedStr[j++] = '\\';
++             }
++             else
++               pszEscapedStr[j++] = c;
++         }
++         pszEscapedStr[j] = 0;
++     }  
++     return pszEscapedStr;
++}
++
++/************************************************************************/
++/*                          LayerDefaultEscapePropertyName              */
++/*                                                                      */
++/*      Return the property name in a properly escaped and quoted form. */
++/************************************************************************/
++char *LayerDefaultEscapePropertyName(layerObj *layer, const char* pszString)
++{
++     char* pszEscapedStr=NULL;
++     int i, j = 0;   
++
++     if (layer && pszString && strlen(pszString) > 0)
++     {
++         int nLength = strlen(pszString);
++
++         pszEscapedStr = (char*) malloc( 1 + 2 * nLength + 1 + 1);
++         pszEscapedStr[j++] = '"';
++
++         for (i=0; i<nLength; i++)
++         {
++             char c = pszString[i];
++             if (c == '"')
++             {
++                 pszEscapedStr[j++] = '"';
++                 pszEscapedStr[j++] ='"';
++             }
++             else if (c == '\\')
++             {
++                 pszEscapedStr[j++] = '\\';
++                 pszEscapedStr[j++] = '\\';
++             }
++             else
++               pszEscapedStr[j++] = c;
++         }
++         pszEscapedStr[j++] = '"';
++         pszEscapedStr[j++] = 0;
++        
++     }
++     return pszEscapedStr;
++}
++
++
+ /*
+  * msConnectLayer
+  *
+@@ -1103,6 +1182,10 @@
+     
+   vtable->LayerGetNumFeatures = LayerDefaultGetNumFeatures;
+ 
++  vtable->LayerEscapeSQLParam = LayerDefaultEscapeSQLParam;
++
++  vtable->LayerEscapePropertyName = LayerDefaultEscapePropertyName;
++
+   return MS_SUCCESS;
+ }
+ 
+@@ -1275,6 +1358,32 @@
+     return i;
+ }
+ 
++
++
++/*
++Returns an escaped string
++*/
++char  *msLayerEscapeSQLParam(layerObj *layer, const char*pszString) 
++{
++    if ( ! layer->vtable) {
++        int rv =  msInitializeVirtualTable(layer);
++        if (rv != MS_SUCCESS)
++            return "";
++    }
++    return layer->vtable->LayerEscapeSQLParam(layer, pszString);
++}
++
++char  *msLayerEscapePropertyName(layerObj *layer, const char*pszString) 
++{
++    if ( ! layer->vtable) {
++        int rv =  msInitializeVirtualTable(layer);
++        if (rv != MS_SUCCESS)
++            return "";
++    }
++    return layer->vtable->LayerEscapePropertyName(layer, pszString);
++}
++
++
+ int
+ msINLINELayerInitializeVirtualTable(layerObj *layer)
+ {
+@@ -1307,5 +1416,7 @@
+     /* layer->vtable->LayerCreateItems, use default */
+     layer->vtable->LayerGetNumFeatures = msINLINELayerGetNumFeatures;
+ 
++    /*layer->vtable->LayerEscapeSQLParam, use default*/
++    /*layer->vtable->LayerEscapePropertyName, use default*/
+     return MS_SUCCESS;
+ }
+diff -urNad mapserver-5.6.5~/mapogcfilter.c mapserver-5.6.5/mapogcfilter.c
+--- mapserver-5.6.5~/mapogcfilter.c	2010-04-13 10:08:11.000000000 -0400
++++ mapserver-5.6.5/mapogcfilter.c	2011-07-12 00:29:58.000000000 -0400
+@@ -168,7 +168,7 @@
+         if (tokens && nTokens == 2)
+         {
+             char szTmp[32];
+-            sprintf(szTmp, "init=epsg:%s",tokens[1]);
++            snprintf(szTmp, sizeof(szTmp), "init=epsg:%s",tokens[1]);
+             msInitProjection(psProj);
+             if (msLoadProjectionString(psProj, szTmp) == 0)
+               nStatus = MS_TRUE;
+@@ -193,7 +193,7 @@
+             if (nEpsgTmp > 0)
+             {
+                 char szTmp[32];
+-                sprintf(szTmp, "init=epsg:%d",nEpsgTmp);
++                snprintf(szTmp, sizeof(szTmp), "init=epsg:%d",nEpsgTmp);
+                 msInitProjection(psProj);
+                 if (msLoadProjectionString(psProj, szTmp) == 0)
+                   nStatus = MS_TRUE;
+@@ -989,7 +989,7 @@
+         if (tokens && nTokens == 2)
+         {
+             char szTmp[32];
+-            sprintf(szTmp, "init=epsg:%s",tokens[1]);
++            snprintf(szTmp, sizeof(szTmp), "init=epsg:%s",tokens[1]);
+             msInitProjection(&sProjTmp);
+             if (msLoadProjectionString(&sProjTmp, szTmp) == 0)
+               msProjectRect(&sProjTmp, &map->projection,  &sQueryRect);
+@@ -1014,7 +1014,7 @@
+             if (nEpsgTmp > 0)
+             {
+                 char szTmp[32];
+-                sprintf(szTmp, "init=epsg:%d",nEpsgTmp);
++                snprintf(szTmp, sizeof(szTmp), "init=epsg:%d",nEpsgTmp);
+                 msInitProjection(&sProjTmp);
+                 if (msLoadProjectionString(&sProjTmp, szTmp) == 0)
+                   msProjectRect(&sProjTmp, &map->projection,  &sQueryRect);
+@@ -2780,9 +2780,9 @@
+                               bString = 1;
+                         }
+                         if (bString)
+-                          sprintf(szTmp, "('[%s]' = '%s')" , pszAttribute, tokens[i]);
++                          snprintf(szTmp, sizeof(szTmp), "('[%s]' = '%s')" , pszAttribute, tokens[i]);
+                         else
+-                           sprintf(szTmp, "([%s] = %s)" , pszAttribute, tokens[i]);
++                          snprintf(szTmp, sizeof(szTmp), "([%s] = %s)" , pszAttribute, tokens[i]);
+ 
+                         if (pszExpression != NULL)
+                           pszExpression = msStringConcatenate(pszExpression, " OR ");
+@@ -2847,8 +2847,7 @@
+                                 "PropertyIsLike") == 0)
+             {
+                  pszExpression = 
+-                   FLTGetIsLikeComparisonSQLExpression(psFilterNode,
+-                                                       connectiontype);
++                   FLTGetIsLikeComparisonSQLExpression(psFilterNode, lp);
+             }
+         }
+     }
+@@ -2885,6 +2884,7 @@
+                 bString = 0;
+                 if (tokens && nTokens > 0)
+                 {
++                    char *pszEscapedStr = NULL;
+                     for (i=0; i<nTokens; i++)
+                     {
+                         if (i == 0)
+@@ -2893,10 +2893,14 @@
+                             if (FLTIsNumeric(pszTmp) == MS_FALSE)    
+                                bString = 1;
+                         }
++                        pszEscapedStr = msLayerEscapeSQLParam(lp, tokens[i]);
+                         if (bString)
+-                          sprintf(szTmp, "(%s = '%s')" , pszAttribute, tokens[i]);
++                          snprintf(szTmp, sizeof(szTmp), "(%s = '%s')" , pszAttribute, pszEscapedStr);
+                         else
+-                           sprintf(szTmp, "(%s = %s)" , pszAttribute, tokens[i]);
++                          snprintf(szTmp, sizeof(szTmp), "(%s = %s)" , pszAttribute, pszEscapedStr);
++
++                        msFree(pszEscapedStr);
++                        pszEscapedStr=NULL;
+ 
+                         if (pszExpression != NULL)
+                           pszExpression = msStringConcatenate(pszExpression, " OR ");
+@@ -3181,6 +3185,7 @@
+ /************************************************************************/
+ char *FLTGetBinaryComparisonExpresssion(FilterEncodingNode *psFilterNode, layerObj *lp)
+ {
++    const size_t bufferSize = 1024;
+     char szBuffer[1024];
+     int bString=0;
+     char szTmp[256];
+@@ -3210,16 +3215,16 @@
+       
+ 
+     if (bString)
+-      strcat(szBuffer, " (\"[");
++      strlcat(szBuffer, " (\"[", bufferSize);
+     else
+-      strcat(szBuffer, " ([");
++      strlcat(szBuffer, " ([", bufferSize);
+     /* attribute */
+ 
+-    strcat(szBuffer, psFilterNode->psLeftNode->pszValue);
++    strlcat(szBuffer, psFilterNode->psLeftNode->pszValue, bufferSize);
+     if (bString)
+-      strcat(szBuffer, "]\" ");
++      strlcat(szBuffer, "]\" ", bufferSize);
+     else
+-      strcat(szBuffer, "] "); 
++     strlcat(szBuffer, "] ", bufferSize);  
+     
+ 
+     /* logical operator */
+@@ -3230,40 +3235,40 @@
+         if (psFilterNode->psRightNode->pOther && 
+             (*(int *)psFilterNode->psRightNode->pOther) == 1)
+         {
+-            strcat(szBuffer, "IEQ");
++            strlcat(szBuffer, "IEQ", bufferSize);
+         }
+         else
+-          strcat(szBuffer, "=");
++          strlcat(szBuffer, "=",bufferSize);
+     }
+     else if (strcasecmp(psFilterNode->pszValue, 
+                         "PropertyIsNotEqualTo") == 0)
+-      strcat(szBuffer, "!="); 
++      strlcat(szBuffer, "!=", bufferSize); 
+     else if (strcasecmp(psFilterNode->pszValue, 
+                         "PropertyIsLessThan") == 0)
+-      strcat(szBuffer, "<");
++      strlcat(szBuffer, "<", bufferSize);
+     else if (strcasecmp(psFilterNode->pszValue, 
+                         "PropertyIsGreaterThan") == 0)
+-      strcat(szBuffer, ">");
++      strlcat(szBuffer, ">", bufferSize);
+     else if (strcasecmp(psFilterNode->pszValue, 
+                         "PropertyIsLessThanOrEqualTo") == 0)
+-      strcat(szBuffer, "<=");
++      strlcat(szBuffer, "<=", bufferSize);
+     else if (strcasecmp(psFilterNode->pszValue, 
+                         "PropertyIsGreaterThanOrEqualTo") == 0)
+-      strcat(szBuffer, ">=");
++      strlcat(szBuffer, ">=", bufferSize);
+     
+-    strcat(szBuffer, " ");
++    strlcat(szBuffer, " ", bufferSize);
+     
+     /* value */
+     if (bString)
+-      strcat(szBuffer, "\"");
++      strlcat(szBuffer, "\"", bufferSize);
+     
+     if (psFilterNode->psRightNode->pszValue)
+-      strcat(szBuffer, psFilterNode->psRightNode->pszValue);
++      strlcat(szBuffer, psFilterNode->psRightNode->pszValue,bufferSize);
+ 
+     if (bString)
+-      strcat(szBuffer, "\"");
++      strlcat(szBuffer, "\"",bufferSize);
+     
+-    strcat(szBuffer, ") ");
++    strlcat(szBuffer, ") ",bufferSize);
+ 
+     return strdup(szBuffer);
+ }
+@@ -3278,9 +3283,11 @@
+ char *FLTGetBinaryComparisonSQLExpresssion(FilterEncodingNode *psFilterNode,
+                                            layerObj *lp)
+ {
++    const size_t bufferSize = 1024;
+     char szBuffer[1024];
+     int bString=0;
+     char szTmp[256];
++    char* pszEscapedStr = NULL;
+ 
+     szBuffer[0] = '\0';
+     if (!psFilterNode || !
+@@ -3309,7 +3316,9 @@
+       
+ 
+     /*opening bracket*/
+-    strcat(szBuffer, " (");
++    strlcat(szBuffer, " (", bufferSize);
++
++    pszEscapedStr = msLayerEscapePropertyName(lp, psFilterNode->psLeftNode->pszValue);
+ 
+     /* attribute */
+     /*case insensitive set ? */
+@@ -3319,35 +3328,37 @@
+         psFilterNode->psRightNode->pOther && 
+         (*(int *)psFilterNode->psRightNode->pOther) == 1)
+     {
+-        sprintf(szTmp, "lower(%s) ",  psFilterNode->psLeftNode->pszValue);
+-        strcat(szBuffer, szTmp);
++        snprintf(szTmp, sizeof(szTmp), "lower(%s) ",  pszEscapedStr);
++        strlcat(szBuffer, szTmp, bufferSize);
+     }
+     else
+-      strcat(szBuffer, psFilterNode->psLeftNode->pszValue);
++      strlcat(szBuffer, pszEscapedStr, bufferSize);
+ 
++    msFree(pszEscapedStr);
++    pszEscapedStr = NULL;
+     
+ 
+     /* logical operator */
+-    if (strcasecmp(psFilterNode->pszValue, 
++   if (strcasecmp(psFilterNode->pszValue, 
+                    "PropertyIsEqualTo") == 0)
+-      strcat(szBuffer, "=");
++      strlcat(szBuffer, "=", bufferSize);
+     else if (strcasecmp(psFilterNode->pszValue, 
+                         "PropertyIsNotEqualTo") == 0)
+-      strcat(szBuffer, "<>"); 
++      strlcat(szBuffer, "<>", bufferSize); 
+     else if (strcasecmp(psFilterNode->pszValue, 
+                         "PropertyIsLessThan") == 0)
+-      strcat(szBuffer, "<");
++      strlcat(szBuffer, "<", bufferSize);
+     else if (strcasecmp(psFilterNode->pszValue, 
+                         "PropertyIsGreaterThan") == 0)
+-      strcat(szBuffer, ">");
++      strlcat(szBuffer, ">", bufferSize);
+     else if (strcasecmp(psFilterNode->pszValue, 
+                         "PropertyIsLessThanOrEqualTo") == 0)
+-      strcat(szBuffer, "<=");
++      strlcat(szBuffer, "<=", bufferSize);
+     else if (strcasecmp(psFilterNode->pszValue, 
+                         "PropertyIsGreaterThanOrEqualTo") == 0)
+-      strcat(szBuffer, ">=");
++      strlcat(szBuffer, ">=", bufferSize);
+     
+-    strcat(szBuffer, " ");
++    strlcat(szBuffer, " ", bufferSize);
+     
+     /* value */
+ 
+@@ -3358,23 +3369,33 @@
+         psFilterNode->psRightNode->pOther && 
+         (*(int *)psFilterNode->psRightNode->pOther) == 1)
+     {
+-        sprintf(szTmp, "lower('%s') ",  psFilterNode->psRightNode->pszValue);
+-        strcat(szBuffer, szTmp);
++        snprintf(szTmp, sizeof(szTmp), "lower('%s') ",  psFilterNode->psRightNode->pszValue);
++        strlcat(szBuffer, szTmp, bufferSize);
+     }
+     else
+     {
+         if (bString)
+-          strcat(szBuffer, "'");
++          strlcat(szBuffer, "'", bufferSize);
+     
+         if (psFilterNode->psRightNode->pszValue)
+-          strcat(szBuffer, psFilterNode->psRightNode->pszValue);
++        {
++            if (bString)
++            {
++                char* pszEscapedStr;
++                pszEscapedStr = msLayerEscapeSQLParam(lp, psFilterNode->psRightNode->pszValue);
++                strlcat(szBuffer, pszEscapedStr, bufferSize);
++                msFree(pszEscapedStr);
++                pszEscapedStr=NULL;
++            }
++            else
++              strlcat(szBuffer, psFilterNode->psRightNode->pszValue, bufferSize);
++        }
+ 
+         if (bString)
+-          strcat(szBuffer, "'");
+-
++          strlcat(szBuffer, "'", bufferSize);
+     }
+     /*closing bracket*/
+-    strcat(szBuffer, ") ");
++    strlcat(szBuffer, ") ", bufferSize);
+ 
+     return strdup(szBuffer);
+ }
+@@ -3388,12 +3409,13 @@
+ char *FLTGetIsBetweenComparisonSQLExpresssion(FilterEncodingNode *psFilterNode,
+                                               layerObj *lp)
+ {
++    const size_t bufferSize = 1024;
+     char szBuffer[1024];
+     char **aszBounds = NULL;
+     int nBounds = 0;
+     int bString=0;
+     char szTmp[256];
+-
++    char* pszEscapedStr;
+ 
+     szBuffer[0] = '\0';
+     if (!psFilterNode ||
+@@ -3437,32 +3459,46 @@
+ /*      build expresssion.                                              */
+ /* -------------------------------------------------------------------- */
+     /*opening paranthesis */
+-    strcat(szBuffer, " (");
++    strlcat(szBuffer, " (",bufferSize);
+ 
+     /* attribute */
+-    strcat(szBuffer, psFilterNode->psLeftNode->pszValue);
++    pszEscapedStr = msLayerEscapePropertyName(lp, psFilterNode->psLeftNode->pszValue);
++
++    strlcat(szBuffer, pszEscapedStr, bufferSize);
++    msFree(pszEscapedStr);
++    pszEscapedStr = NULL;
+ 
+     /*between*/
+-    strcat(szBuffer, " BETWEEN ");
++    strlcat(szBuffer, " BETWEEN ",bufferSize);
+ 
+     /*bound 1*/
+     if (bString)
+-      strcat(szBuffer,"'");
+-    strcat(szBuffer, aszBounds[0]);
++      strlcat(szBuffer,"'",bufferSize);
++
++    pszEscapedStr = msLayerEscapeSQLParam( lp, aszBounds[0]);
++    strlcat(szBuffer, pszEscapedStr, bufferSize);
++    msFree(pszEscapedStr);
++    pszEscapedStr=NULL;
++
+     if (bString)
+-      strcat(szBuffer,"'");
++      strlcat(szBuffer,"'",bufferSize);
+ 
+-    strcat(szBuffer, " AND ");
++    strlcat(szBuffer, " AND ",bufferSize);
+ 
+     /*bound 2*/
+     if (bString)
+-      strcat(szBuffer, "'");
+-    strcat(szBuffer, aszBounds[1]);
++      strlcat(szBuffer, "'",bufferSize);
++
++    pszEscapedStr = msLayerEscapeSQLParam( lp, aszBounds[1]);
++    strlcat(szBuffer, pszEscapedStr, bufferSize);
++    msFree(pszEscapedStr);
++    pszEscapedStr=NULL;
++
+     if (bString)
+-      strcat(szBuffer,"'");
++      strlcat(szBuffer,"'",bufferSize);
+ 
+     /*closing paranthesis*/
+-    strcat(szBuffer, ")");
++    strlcat(szBuffer, ")",bufferSize);
+      
+     
+     return strdup(szBuffer);
+@@ -3476,6 +3512,7 @@
+ char *FLTGetIsBetweenComparisonExpresssion(FilterEncodingNode *psFilterNode,
+                                            layerObj *lp)
+ {
++    const size_t bufferSize = 1024;
+     char szBuffer[1024];
+     char **aszBounds = NULL;
+     int nBounds = 0;
+@@ -3496,7 +3533,10 @@
+ /* -------------------------------------------------------------------- */
+     aszBounds = msStringSplit(psFilterNode->psRightNode->pszValue, ';', &nBounds);
+     if (nBounds != 2)
++    {
++      msFreeCharArray(aszBounds, nBounds);
+       return NULL;
++    }
+ /* -------------------------------------------------------------------- */
+ /*      check if the value is a numeric value or alphanumeric. If it    */
+ /*      is alphanumeric, add quotes around attribute and values.        */
+@@ -3525,50 +3565,51 @@
+ /*      build expresssion.                                              */
+ /* -------------------------------------------------------------------- */
+     if (bString)
+-      strcat(szBuffer, " (\"[");
++      strlcat(szBuffer, " (\"[", bufferSize);
+     else
+-      strcat(szBuffer, " ([");
++      strlcat(szBuffer, " ([", bufferSize);
+ 
+     /* attribute */
+-    strcat(szBuffer, psFilterNode->psLeftNode->pszValue);
++    strlcat(szBuffer, psFilterNode->psLeftNode->pszValue, bufferSize);
+ 
+     if (bString)
+-      strcat(szBuffer, "]\" ");
++      strlcat(szBuffer, "]\" ", bufferSize);
+     else
+-      strcat(szBuffer, "] ");
++      strlcat(szBuffer, "] ", bufferSize);
+         
+     
+-    strcat(szBuffer, " >= ");
++    strlcat(szBuffer, " >= ", bufferSize);
+     if (bString)
+-      strcat(szBuffer,"\"");
+-    strcat(szBuffer, aszBounds[0]);
++      strlcat(szBuffer,"\"", bufferSize);
++    strlcat(szBuffer, aszBounds[0], bufferSize);
+     if (bString)
+-      strcat(szBuffer,"\"");
++      strlcat(szBuffer,"\"", bufferSize);
+ 
+-    strcat(szBuffer, " AND ");
++    strlcat(szBuffer, " AND ", bufferSize);
+ 
+     if (bString)
+-      strcat(szBuffer, " \"[");
++      strlcat(szBuffer, " \"[", bufferSize);
+     else
+-      strcat(szBuffer, " ["); 
++      strlcat(szBuffer, " [", bufferSize); 
+ 
+     /* attribute */
+-    strcat(szBuffer, psFilterNode->psLeftNode->pszValue);
++    strlcat(szBuffer, psFilterNode->psLeftNode->pszValue, bufferSize);
+     
+     if (bString)
+-      strcat(szBuffer, "]\" ");
++      strlcat(szBuffer, "]\" ", bufferSize);
+     else
+-      strcat(szBuffer, "] ");
++      strlcat(szBuffer, "] ", bufferSize);
+     
+-    strcat(szBuffer, " <= ");
++    strlcat(szBuffer, " <= ", bufferSize);
+     if (bString)
+-      strcat(szBuffer,"\"");
+-    strcat(szBuffer, aszBounds[1]);
++      strlcat(szBuffer,"\"", bufferSize);
++    strlcat(szBuffer, aszBounds[1], bufferSize);
+     if (bString)
+-      strcat(szBuffer,"\"");
+-    strcat(szBuffer, ")");
+-     
+-    
++      strlcat(szBuffer,"\"", bufferSize);
++    strlcat(szBuffer, ")", bufferSize);
++
++    msFreeCharArray(aszBounds, nBounds);
++
+     return strdup(szBuffer);
+ }
+     
+@@ -3579,6 +3620,7 @@
+ /************************************************************************/
+ char *FLTGetIsLikeComparisonExpression(FilterEncodingNode *psFilterNode)
+ {
++    const size_t bufferSize = 1024;
+     char szBuffer[1024];
+     char *pszValue = NULL;
+     
+@@ -3626,43 +3668,49 @@
+     }
+     for (i=0; i<nLength; i++)
+     {
+-        if (pszValue[i] != pszWild[0] && 
+-            pszValue[i] != pszSingle[0] &&
+-            pszValue[i] != pszEscape[0])
+-        {
+-            szBuffer[iBuffer] = pszValue[i];
+-            iBuffer++;
+-            szBuffer[iBuffer] = '\0';
+-        }
+-        else if  (pszValue[i] == pszSingle[0])
+-        {
+-             szBuffer[iBuffer] = '.';
+-             iBuffer++;
+-             szBuffer[iBuffer] = '\0';
+-        }
+-        else if  (pszValue[i] == pszEscape[0])
++        if (iBuffer < 1024)
+         {
+-            szBuffer[iBuffer] = '\\';
+-            iBuffer++;
+-            szBuffer[iBuffer] = '\0';
++            if (pszValue[i] != pszWild[0] && 
++                pszValue[i] != pszSingle[0] &&
++                pszValue[i] != pszEscape[0])
++            {
++                szBuffer[iBuffer] = pszValue[i];
++                iBuffer++;
++                szBuffer[iBuffer] = '\0';
++            }
++            else if  (pszValue[i] == pszSingle[0])
++            {
++                szBuffer[iBuffer] = '.';
++                iBuffer++;
++                szBuffer[iBuffer] = '\0';
++            }
++            else if  (pszValue[i] == pszEscape[0])
++            {
++                szBuffer[iBuffer] = '\\';
++                iBuffer++;
++                szBuffer[iBuffer] = '\0';
+ 
+-        }
+-        else if (pszValue[i] == pszWild[0])
+-        {
+-            /* strcat(szBuffer, "[0-9,a-z,A-Z,\\s]*"); */
+-            /* iBuffer+=17; */
+-            strcat(szBuffer, ".*");
+-            iBuffer+=2;
+-            szBuffer[iBuffer] = '\0';
++            }
++            else if (pszValue[i] == pszWild[0])
++            {
++                /* strcat(szBuffer, "[0-9,a-z,A-Z,\\s]*"); */
++                /* iBuffer+=17; */
++                strlcat(szBuffer, ".*",bufferSize);
++                iBuffer+=2;
++                szBuffer[iBuffer] = '\0';
++            }
+         }
+     }   
+-    szBuffer[iBuffer] = '/';
+-    if (bCaseInsensitive == 1)
++
++    if (iBuffer < 1024)
+     {
+-      szBuffer[++iBuffer] = 'i';
+-    } 
+-    szBuffer[++iBuffer] = '\0';
+-    
++        szBuffer[iBuffer] = '/';
++        if (bCaseInsensitive == 1)
++        {
++            szBuffer[++iBuffer] = 'i';
++        } 
++        szBuffer[++iBuffer] = '\0';
++    }
+         
+     return strdup(szBuffer);
+ }
+@@ -3673,8 +3721,9 @@
+ /*      Build an sql expression for IsLike filter.                      */
+ /************************************************************************/
+ char *FLTGetIsLikeComparisonSQLExpression(FilterEncodingNode *psFilterNode,
+-                                          int connectiontype)
++                                           layerObj *lp)
+ {
++    const size_t bufferSize = 1024;
+     char szBuffer[1024];
+     char *pszValue = NULL;
+     
+@@ -3683,9 +3732,11 @@
+     char *pszEscape = NULL;
+     char szTmp[4];
+ 
+-    int nLength=0, i=0, iBuffer = 0;
++    int nLength=0, i=0, j=0;
+     int  bCaseInsensitive = 0;
+ 
++    char *pszEscapedStr = NULL;
++
+     if (!psFilterNode || !psFilterNode->pOther || !psFilterNode->psLeftNode ||
+         !psFilterNode->psRightNode || !psFilterNode->psRightNode->pszValue)
+       return NULL;
+@@ -3704,60 +3755,80 @@
+ 
+     szBuffer[0] = '\0';
+     /*opening bracket*/
+-    strcat(szBuffer, " (");
++    strlcat(szBuffer, " (", bufferSize);
+ 
+     /* attribute name */
+-    strcat(szBuffer, psFilterNode->psLeftNode->pszValue);
+-    if (bCaseInsensitive == 1 && connectiontype == MS_POSTGIS)
+-      strcat(szBuffer, " ilike '");
++    pszEscapedStr = msLayerEscapePropertyName(lp, psFilterNode->psLeftNode->pszValue);
++
++    strlcat(szBuffer, pszEscapedStr, bufferSize);
++    msFree(pszEscapedStr);
++    pszEscapedStr = NULL;
++
++
++    if (bCaseInsensitive == 1 && lp->connectiontype == MS_POSTGIS)
++      strlcat(szBuffer, " ilike '",bufferSize);
+     else
+-      strcat(szBuffer, " like '");
++      strlcat(szBuffer, " like '",bufferSize);
+         
+    
+     pszValue = psFilterNode->psRightNode->pszValue;
+     nLength = strlen(pszValue);
+-    iBuffer = strlen(szBuffer);
++
++    pszEscapedStr = (char*) malloc( 3 * nLength + 1);
++
+     for (i=0; i<nLength; i++)
+     {
+-        if (pszValue[i] != pszWild[0] && 
+-            pszValue[i] != pszSingle[0] &&
+-            pszValue[i] != pszEscape[0])
++        char c = pszValue[i];
++        if (c != pszWild[0] &&
++            c != pszSingle[0] &&
++            c != pszEscape[0])
+         {
+-            szBuffer[iBuffer] = pszValue[i];
+-            iBuffer++;
+-            szBuffer[iBuffer] = '\0';
++            if (c == '\'')
++            {
++                pszEscapedStr[j++] = '\'';
++                pszEscapedStr[j++] = '\'';
++            }
++            else if (c == '\\')
++            {
++                pszEscapedStr[j++] = '\\';
++                pszEscapedStr[j++] = '\\';
++            }
++            else
++                pszEscapedStr[j++] = c;
+         }
+-        else if  (pszValue[i] == pszSingle[0])
++        else if  (c == pszSingle[0])
+         {
+-             szBuffer[iBuffer] = '_';
+-             iBuffer++;
+-             szBuffer[iBuffer] = '\0';
++            pszEscapedStr[j++] = '_';
+         }
+-        else if  (pszValue[i] == pszEscape[0])
++        else if  (c == pszEscape[0])
+         {
+-            szBuffer[iBuffer] = pszEscape[0];
+-            iBuffer++;
+-            szBuffer[iBuffer] = '\0';
+-            /*if (i<nLength-1)
++            pszEscapedStr[j++] = pszEscape[0];
++            if (i+1<nLength)
+             {
+-                szBuffer[iBuffer] = pszValue[i+1];
+-                iBuffer++;
+-                szBuffer[iBuffer] = '\0';
++                char nextC = pszValue[i+1];
++                i++;
++                if (nextC == '\'')
++                {
++                    pszEscapedStr[j++] = '\'';
++                    pszEscapedStr[j++] = '\'';
++                }
++                else
++                    pszEscapedStr[j++] = nextC;
+             }
+-            */
+         }
+-        else if (pszValue[i] == pszWild[0])
++        else if (c == pszWild[0])
+         {
+-            strcat(szBuffer, "%");
+-            iBuffer++;
+-            szBuffer[iBuffer] = '\0';
++            pszEscapedStr[j++] = '%';
+         }
+     } 
++    pszEscapedStr[j++] = 0;
++    strlcat(szBuffer, pszEscapedStr, bufferSize);
++    msFree(pszEscapedStr);
+ 
+-    strcat(szBuffer, "'");
+-    if (connectiontype != MS_OGR)
++    strlcat(szBuffer, "'",bufferSize);
++    if (lp->connectiontype != MS_OGR)
+     {
+-      strcat(szBuffer, " escape '");
++        strlcat(szBuffer, " escape '",bufferSize);
+       szTmp[0] = pszEscape[0];
+       if (pszEscape[0] == '\\')
+       {
+@@ -3771,9 +3842,9 @@
+           szTmp[2] = '\0';
+       }
+ 
+-      strcat(szBuffer,  szTmp);
++      strlcat(szBuffer,  szTmp,bufferSize);
+     }
+-    strcat(szBuffer,  ") ");
++    strlcat(szBuffer,  ") ",bufferSize);
+     
+     return strdup(szBuffer);
+ }
+@@ -4084,7 +4155,7 @@
+             {
+                 if (!lp->items[i] || strlen(lp->items[i]) <= 0)
+                     continue;
+-                sprintf(szTmp, "%s_alias", lp->items[i]);
++                snprintf(szTmp, sizeof(szTmp), "%s_alias", lp->items[i]);
+                 pszFullName = msOWSLookupMetadata(&(lp->metadata), namespaces, szTmp);
+                 if (pszFullName)
+                 {
+diff -urNad mapserver-5.6.5~/mapogcfilter.h mapserver-5.6.5/mapogcfilter.h
+--- mapserver-5.6.5~/mapogcfilter.h	2009-07-06 12:29:03.000000000 -0400
++++ mapserver-5.6.5/mapogcfilter.h	2011-07-12 00:29:58.000000000 -0400
+@@ -113,8 +113,8 @@
+ MS_DLL_EXPORT char *FLTGetSQLExpression(FilterEncodingNode *psFilterNode,layerObj *lp);
+ MS_DLL_EXPORT char *FLTGetBinaryComparisonSQLExpresssion(FilterEncodingNode *psFilterNode, layerObj *lp);
+ MS_DLL_EXPORT char *FLTGetIsBetweenComparisonSQLExpresssion(FilterEncodingNode *psFilterNode, layerObj *lp);
+-MS_DLL_EXPORT char *FLTGetIsLikeComparisonSQLExpression(FilterEncodingNode *psFilterNode,
+-                                       int connectiontype);
++MS_DLL_EXPORT char *FLTGetIsLikeComparisonSQLExpression(FilterEncodingNode *psFilterNode, layerObj *lp);
++
+ MS_DLL_EXPORT char *FLTGetLogicalComparisonSQLExpresssion(FilterEncodingNode *psFilterNode,
+                                             layerObj *lp);
+ MS_DLL_EXPORT int FLTIsSimpleFilter(FilterEncodingNode *psFilterNode);
+diff -urNad mapserver-5.6.5~/mapogcsos.c mapserver-5.6.5/mapogcsos.c
+--- mapserver-5.6.5~/mapogcsos.c	2009-10-20 09:38:46.000000000 -0400
++++ mapserver-5.6.5/mapogcsos.c	2011-07-12 00:29:58.000000000 -0400
+@@ -1820,6 +1820,7 @@
+   char *pszProcedureValue = NULL;
+   int iItemPosition, status;
+   shapeObj sShape;
++  char* pszEscapedStr = NULL;
+ 
+   sBbox = map->extent;
+ 
+@@ -2051,15 +2052,25 @@
+               pszBuffer = msStringConcatenate(pszBuffer, "(");
+                             
+               if (!bSpatialDB)
+-                pszBuffer = msStringConcatenate(pszBuffer, "'[");
+-
+-              pszBuffer = msStringConcatenate(pszBuffer, (char *)pszProcedureItem);
++              {
++                  pszBuffer = msStringConcatenate(pszBuffer, "'[");
++                  pszBuffer = msStringConcatenate(pszBuffer, (char *)pszProcedureItem);
++              }
++              else
++              {
++                  pszEscapedStr = msLayerEscapePropertyName(lp, (char *)pszProcedureItem);
++                  pszBuffer = msStringConcatenate(pszBuffer, pszEscapedStr);
++                  msFree(pszEscapedStr);
++                  pszEscapedStr = NULL;
++              }
+ 
+               if (!bSpatialDB)
+                 pszBuffer = msStringConcatenate(pszBuffer, "]'");
+ 
+               pszBuffer = msStringConcatenate(pszBuffer, " = '");
+-              pszBuffer = msStringConcatenate(pszBuffer,  tokens[j]);
++              pszEscapedStr = msLayerEscapeSQLParam(lp, tokens[j]);
++              pszBuffer = msStringConcatenate(pszBuffer,  pszEscapedStr);
++              msFree(pszEscapedStr);
+               pszBuffer = msStringConcatenate(pszBuffer,  "')");
+             }
+                                 
+diff -urNad mapserver-5.6.5~/mapogr.cpp mapserver-5.6.5/mapogr.cpp
+--- mapserver-5.6.5~/mapogr.cpp	2010-01-18 13:55:29.000000000 -0500
++++ mapserver-5.6.5/mapogr.cpp	2011-07-12 00:29:58.000000000 -0400
+@@ -3458,6 +3458,66 @@
+ }
+ 
+ /************************************************************************/
++/*                           msOGREscapeSQLParam                        */
++/************************************************************************/
++char *msOGREscapeSQLParam(layerObj *layer, const char *pszString)
++{
++    char* pszEscapedStr =NULL;
++#ifdef USE_OGR
++    if(layer && pszString && strlen(pszString) > 0)
++    {
++        char* pszEscapedOGRStr =  CPLEscapeString(pszString, strlen(pszString),  
++		                                    CPLES_SQL ); 
++	pszEscapedStr = strdup(pszEscapedOGRStr);
++        CPLFree(pszEscapedOGRStr);
++	return pszEscapedStr; 
++    }
++#else
++/* ------------------------------------------------------------------
++ * OGR Support not included...
++ * ------------------------------------------------------------------ */
++
++  msSetError(MS_MISCERR, "OGR support is not available.", 
++             "msOGREscapeSQLParam()");
++  return NULL;
++
++#endif /* USE_OGR */  
++}
++
++
++/************************************************************************/
++/*                           msOGREscapeSQLParam                        */
++/************************************************************************/
++char *msOGREscapePropertyName(layerObj *layer, const char *pszString)
++{
++    char* pszEscapedStr =NULL;
++    int i =0;
++#ifdef USE_OGR
++    if(layer && pszString && strlen(pszString) > 0)
++    {
++        unsigned char ch;
++        for(i=0; (ch = ((unsigned char*)pszString)[i]) != '\0'; i++)
++        {
++            if ( !(isalnum(ch) || ch == '_' || ch > 127) )
++            {
++                return strdup("invalid_property_name");
++            }
++        }
++        pszEscapedStr = strdup(pszString);
++    }
++    return pszEscapedStr;
++#else
++/* ------------------------------------------------------------------
++ * OGR Support not included...
++ * ------------------------------------------------------------------ */
++
++  msSetError(MS_MISCERR, "OGR support is not available.", 
++             "msOGREscapePropertyName()");
++  return NULL;
++
++#endif /* USE_OGR */  
++}
++/************************************************************************/
+ /*                  msOGRLayerInitializeVirtualTable()                  */
+ /************************************************************************/
+ int
+@@ -3484,6 +3544,9 @@
+     /* layer->vtable->LayerCreateItems, use default */
+     /* layer->vtable->LayerGetNumFeatures, use default */
+ 
++    layer->vtable->LayerEscapeSQLParam = msOGREscapeSQLParam;
++    layer->vtable->LayerEscapePropertyName = msOGREscapePropertyName;
++
+     return MS_SUCCESS;
+ }
+ 
+diff -urNad mapserver-5.6.5~/mappostgis.c mapserver-5.6.5/mappostgis.c
+--- mapserver-5.6.5~/mappostgis.c	2010-03-22 09:18:57.000000000 -0400
++++ mapserver-5.6.5/mappostgis.c	2011-07-12 00:29:58.000000000 -0400
+@@ -549,7 +549,7 @@
+         return(MS_FAILURE);
+     }
+ 
+-    pgresult = PQexec(layerinfo->pgconn, sql);
++    pgresult = PQexecParams(layerinfo->pgconn, sql,0, NULL, NULL, NULL, NULL, 0);
+     if ( !pgresult || PQresultStatus(pgresult) != PGRES_TUPLES_OK) {
+         char *tmp1;
+         char *tmp2 = NULL;
+@@ -1774,7 +1774,7 @@
+         msDebug("msPostGISLayerWhichShapes query: %s\n", strSQL);
+     }
+ 
+-    pgresult = PQexec(layerinfo->pgconn, strSQL);
++    pgresult = PQexecParams(layerinfo->pgconn, strSQL,0, NULL, NULL, NULL, NULL, 0);
+ 
+     if ( layer->debug > 1 ) {
+         msDebug("msPostGISLayerWhichShapes query status: %s (%d)\n", PQresStatus(PQresultStatus(pgresult)), PQresultStatus(pgresult)); 
+@@ -1979,7 +1979,7 @@
+         msDebug("msPostGISLayerGetShape query: %s\n", strSQL);
+     }
+ 
+-    pgresult = PQexec(layerinfo->pgconn, strSQL);
++    pgresult = PQexecParams(layerinfo->pgconn, strSQL,0, NULL, NULL, NULL, NULL, 0);
+ 
+     /* Something went wrong. */
+     if ( (!pgresult) || (PQresultStatus(pgresult) != PGRES_TUPLES_OK) ) {
+@@ -2073,7 +2073,7 @@
+         msDebug("msPostGISLayerGetItems executing SQL: %s\n", sql);
+     }
+ 
+-    pgresult = PQexec(layerinfo->pgconn, sql);
++    pgresult = PQexecParams(layerinfo->pgconn, sql,0, NULL, NULL, NULL, NULL, 0);
+     
+     if ( (!pgresult) || (PQresultStatus(pgresult) != PGRES_TUPLES_OK) ) {
+         msSetError(MS_QUERYERR, "Error (%s) executing SQL: %s", "msPostGISLayerGetItems()", PQerrorMessage(layerinfo->pgconn), sql);
+diff -urNad mapserver-5.6.5~/mapserver.h mapserver-5.6.5/mapserver.h
+--- mapserver-5.6.5~/mapserver.h	2010-07-14 05:45:57.000000000 -0400
++++ mapserver-5.6.5/mapserver.h	2011-07-12 00:29:58.000000000 -0400
+@@ -1554,6 +1554,8 @@
+ 
+     int (*LayerCreateItems)(layerObj *layer, int nt);
+     int (*LayerGetNumFeatures)(layerObj *layer);
++    char* (*LayerEscapeSQLParam)(layerObj *layer, const char* pszString);
++    char* (*LayerEscapePropertyName)(layerObj *layer, const char* pszString);
+ };
+ #endif /*SWIG*/
+ 
+@@ -1953,6 +1955,9 @@
+ /* maplayer.c */
+ MS_DLL_EXPORT int msLayerGetNumFeatures(layerObj *layer);
+ 
++MS_DLL_EXPORT char *msLayerEscapeSQLParam(layerObj *layer, const char* pszString);
++MS_DLL_EXPORT char *msLayerEscapePropertyName(layerObj *layer, const char* pszString);
++
+ /* These are special because SWF is using these */
+ int msOGRLayerNextShape(layerObj *layer, shapeObj *shape);
+ int msOGRLayerGetItems(layerObj *layer);
--- mapserver-5.6.5.orig/debian/po/pt.po
+++ mapserver-5.6.5/debian/po/pt.po
@@ -0,0 +1,54 @@
+# Portuguese translation for mapserver's debconf messages
+# Rui Branco <ruipb@debianpt.org>, 2006.
+# 2006-12-03 - Rui Branco - Initial translation
+# 2006-08-26 - 4f
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mapserver 4.10.2-1\n"
+"Report-Msgid-Bugs-To: pkg-grass-devel@lists.alioth.debian.org\n"
+"POT-Creation-Date: 2007-06-15 15:55+0200\n"
+"PO-Revision-Date: 2007-08-26 17:42+0100\n"
+"Last-Translator: Rui Branco <ruipb@debianpt.org>\n"
+"Language-Team: Portuguese <traduz@debianpt.org>\n"
+"Language: pt\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid "Should ${extname} be added to /etc/php5/${sapiconfig}/php.ini?"
+msgstr "Deverá o ${extname} ser adicionado ao /etc/php5/${sapiconfig}/php.ini?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid ""
+"You are installing ${extname} support for php5 and it is not yet enabled in "
+"the configuration for the ${sapiconfig} SAPI. Enabling this extension will "
+"allow php5 scripts to use it."
+msgstr ""
+"Está a instalar o suporte ${extname} para o php5 e não está ainda activo na "
+"configuração para o ${sapiconfig} SAPI. Ao activar esta extensão permitirá "
+"que os scripts php5 o usem."
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid "Should ${extname} be removed from /etc/php5/${sapiconfig}/php.ini?"
+msgstr "Deverá o ${extname} ser removido de /etc/php5/${sapiconfig}/php.ini?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid ""
+"You are removing ${extname} support for php5, but it is still enabled in the "
+"configuration for the ${sapiconfig} SAPI.  Leaving this in place will "
+"probably cause problems when trying to use PHP."
+msgstr ""
+"Está a remover o suporte ${extname} para o php5, no entanto está ainda "
+"activo na configuração para o ${sapiconfig}·SAPI.  Ao deixar isto no local "
+"irá provavelmente causar problemas quando tentar utilizar PHP."
--- mapserver-5.6.5.orig/debian/po/da.po
+++ mapserver-5.6.5/debian/po/da.po
@@ -0,0 +1,53 @@
+# Danish translation mapserver.
+# Copyright (C) 2010 mapserver og nedenstående oversættere.
+# This file is distributed under the same license as mapserver package.
+# Joe Hansen <joedalton2@yahoo.dk>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mapserver\n"
+"Report-Msgid-Bugs-To: pkg-grass-devel@lists.alioth.debian.org\n"
+"POT-Creation-Date: 2007-06-15 15:55+0200\n"
+"PO-Revision-Date: 2010-12-01 17:30+01:00\n"
+"Last-Translator: Joe Hansen <joedalton2@yahoo.dk>\n"
+"Language-Team: Danish <debian-l10n-danish@lists.debian.org>\n"
+"Language: da\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid "Should ${extname} be added to /etc/php5/${sapiconfig}/php.ini?"
+msgstr "Skal ${extname} tilføjes til /etc/php5/${sapiconfig}/php.ini?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid ""
+"You are installing ${extname} support for php5 and it is not yet enabled in "
+"the configuration for the ${sapiconfig} SAPI. Enabling this extension will "
+"allow php5 scripts to use it."
+msgstr ""
+"Du installerer ${extname}-understøttelse for php5 og denne er endnu ikke "
+"aktiveret i konfigurationen for SAPI'en ${sapiconfig}. Aktivering af denne "
+"udvidelse vil tillade, at php5-skripter kan bruge den."
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid "Should ${extname} be removed from /etc/php5/${sapiconfig}/php.ini?"
+msgstr "Skal ${extname} fjernes fra /etc/php5/${sapiconfig}/php.ini?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid ""
+"You are removing ${extname} support for php5, but it is still enabled in the "
+"configuration for the ${sapiconfig} SAPI.  Leaving this in place will "
+"probably cause problems when trying to use PHP."
+msgstr ""
+"Du fjerner ${extname}-understøttelse for php5, men denne er stadig aktiveret "
+"i konfigurationen for SAPI'en ${sapiconfig}. Bevarelse af denne vil højst "
+"sandsynlig medføre problemer, når der forsøges at bruge PHP."
--- mapserver-5.6.5.orig/debian/po/templates.pot
+++ mapserver-5.6.5/debian/po/templates.pot
@@ -0,0 +1,47 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: pkg-grass-devel@lists.alioth.debian.org\n"
+"POT-Creation-Date: 2007-06-15 15:55+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid "Should ${extname} be added to /etc/php5/${sapiconfig}/php.ini?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid ""
+"You are installing ${extname} support for php5 and it is not yet enabled in "
+"the configuration for the ${sapiconfig} SAPI. Enabling this extension will "
+"allow php5 scripts to use it."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid "Should ${extname} be removed from /etc/php5/${sapiconfig}/php.ini?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid ""
+"You are removing ${extname} support for php5, but it is still enabled in the "
+"configuration for the ${sapiconfig} SAPI.  Leaving this in place will "
+"probably cause problems when trying to use PHP."
+msgstr ""
--- mapserver-5.6.5.orig/debian/po/sv.po
+++ mapserver-5.6.5/debian/po/sv.po
@@ -0,0 +1,61 @@
+# translation of mapserver_5.0.3-2_sv.po to swedish
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+# Developers do not need to manually edit POT or PO files.
+#
+# Martin Bagge <martin.bagge@bthstudent.se>, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: mapserver_5.0.3-2_sv\n"
+"Report-Msgid-Bugs-To: pkg-grass-devel@lists.alioth.debian.org\n"
+"POT-Creation-Date: 2007-06-15 15:55+0200\n"
+"PO-Revision-Date: 2008-06-30 21:13+0200\n"
+"Last-Translator: Martin Bagge <martin.bagge@bthstudent.se>\n"
+"Language-Team: swedish <debian-l10n-swedish@lists.debian.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid "Should ${extname} be added to /etc/php5/${sapiconfig}/php.ini?"
+msgstr "Ska stöd för ${extname} läggas till i /etc/php5/${sapiconfig}/php.ini?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid ""
+"You are installing ${extname} support for php5 and it is not yet enabled in "
+"the configuration for the ${sapiconfig} SAPI. Enabling this extension will "
+"allow php5 scripts to use it."
+msgstr ""
+"Du installerar ${extname}-stöd för PHP5 och den är ännu inte aktiverad för "
+"${sapiconfig}.  Aktivering av denna utökning gör att PHP5-skript kan använda "
+"den. "
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid "Should ${extname} be removed from /etc/php5/${sapiconfig}/php.ini?"
+msgstr "Ska stöd för ${extname} tas bort ur /etc/php5/${sapiconfig}/php.ini?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid ""
+"You are removing ${extname} support for php5, but it is still enabled in the "
+"configuration for the ${sapiconfig} SAPI.  Leaving this in place will "
+"probably cause problems when trying to use PHP."
+msgstr ""
+"Du tar bort ${extname}-stödet för PHP5 men den är fortfarande aktiverad i /"
+"etc/php5/${sapiconfig}/php.ini. Att lämna den aktiverad kan orsaka problem "
+"när du försöker använda PHP."
--- mapserver-5.6.5.orig/debian/po/it.po
+++ mapserver-5.6.5/debian/po/it.po
@@ -0,0 +1,54 @@
+# ITALIAN TRANSLATION OF MAPSERVER'S PO-DEBCONF FILE.
+# COPYRIGHT (C) 2010 THE MAPSERVER'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the mapserver package.
+# Vincenzo Campanella <vinz65@gmail.com>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mapserver\n"
+"Report-Msgid-Bugs-To: pkg-grass-devel@lists.alioth.debian.org\n"
+"POT-Creation-Date: 2007-06-15 15:55+0200\n"
+"PO-Revision-Date: 2010-12-02 08:00+0100\n"
+"Last-Translator: Vincenzo Campanella <vinz65@gmail.com>\n"
+"Language-Team: Italian <tp@lists.linux.it>\n"
+"Language: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid "Should ${extname} be added to /etc/php5/${sapiconfig}/php.ini?"
+msgstr "Aggiungere ${extname} a «/etc/php5/${sapiconfig}/php.ini»?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid ""
+"You are installing ${extname} support for php5 and it is not yet enabled in "
+"the configuration for the ${sapiconfig} SAPI. Enabling this extension will "
+"allow php5 scripts to use it."
+msgstr ""
+"Si sta per installare il supporto ${extname} per php5, che non è ancora "
+"abilitato nella configurazione per il SAPI ${sapiconfig}. L'abilitazione di "
+"questa estensione consentirà agli script php5 di utilizzarlo."
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid "Should ${extname} be removed from /etc/php5/${sapiconfig}/php.ini?"
+msgstr "Rimuovere ${extname} da «/etc/php5/${sapiconfig}/php.ini?»?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid ""
+"You are removing ${extname} support for php5, but it is still enabled in the "
+"configuration for the ${sapiconfig} SAPI.  Leaving this in place will "
+"probably cause problems when trying to use PHP."
+msgstr ""
+"Si sta per rimuovere il supporto ${extname} per php5, ma questi è ancora "
+"abilitato nella configurazione per il SAPI ${sapiconfig}. Se si lascia la "
+"situazione immutata, probabilmente si avranno dei problemi quando si cerca "
+"di utilizzare PHP."
--- mapserver-5.6.5.orig/debian/po/nb.po
+++ mapserver-5.6.5/debian/po/nb.po
@@ -0,0 +1,58 @@
+# translation of nb.po to Norwegian Bokmål
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans#
+#    Developers do not need to manually edit POT or PO files.
+# Petter Reinholdtsen <pere@hungry.com>, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: nb\n"
+"Report-Msgid-Bugs-To: pkg-grass-devel@lists.alioth.debian.org\n"
+"POT-Creation-Date: 2007-06-15 15:55+0200\n"
+"PO-Revision-Date: 2005-08-20 21:03MET\n"
+"Last-Translator: Petter Reinholdtsen <pere@hungry.com>\n"
+"Language-Team: Norwegian Bokmål <i18n-nb@lister.ping.uio.no>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.9.1\n"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+#, fuzzy
+msgid "Should ${extname} be added to /etc/php5/${sapiconfig}/php.ini?"
+msgstr "Vil du ha ${extname} lagt til i /etc/php4/${sapiconfig}/php.ini?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid ""
+"You are installing ${extname} support for php5 and it is not yet enabled in "
+"the configuration for the ${sapiconfig} SAPI. Enabling this extension will "
+"allow php5 scripts to use it."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+#, fuzzy
+msgid "Should ${extname} be removed from /etc/php5/${sapiconfig}/php.ini?"
+msgstr "Ønskes ${extname} fjernet fra /etc/php4/${sapiconfig}/php.ini?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid ""
+"You are removing ${extname} support for php5, but it is still enabled in the "
+"configuration for the ${sapiconfig} SAPI.  Leaving this in place will "
+"probably cause problems when trying to use PHP."
+msgstr ""
--- mapserver-5.6.5.orig/debian/po/gl.po
+++ mapserver-5.6.5/debian/po/gl.po
@@ -0,0 +1,52 @@
+# Galician translation of mapserver's debconf templates
+# This file is distributed under the same license as the mapserver package.
+# Jacobo Tarrio <jtarrio@debian.org>, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mapserver\n"
+"Report-Msgid-Bugs-To: pkg-grass-devel@lists.alioth.debian.org\n"
+"POT-Creation-Date: 2007-06-15 15:55+0200\n"
+"PO-Revision-Date: 2007-10-24 22:23+0100\n"
+"Last-Translator: Jacobo Tarrio <jtarrio@debian.org>\n"
+"Language-Team: Galician <proxecto@trasno.net>\n"
+"Language: gl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid "Should ${extname} be added to /etc/php5/${sapiconfig}/php.ini?"
+msgstr "¿Debe engadirse ${extname} a /etc/php5/${sapiconfig}/php.ini?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid ""
+"You are installing ${extname} support for php5 and it is not yet enabled in "
+"the configuration for the ${sapiconfig} SAPI. Enabling this extension will "
+"allow php5 scripts to use it."
+msgstr ""
+"Está a instalar o soporte de ${extname} para php5, pero aínda non está "
+"activado na configuración da SAPI ${sapiconfig}. Activar esta extensión ha "
+"permitir que os scripts php5 a empreguen."
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid "Should ${extname} be removed from /etc/php5/${sapiconfig}/php.ini?"
+msgstr "¿Debe eliminarse ${extname} de /etc/php5/${sapiconfig}/php.ini?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid ""
+"You are removing ${extname} support for php5, but it is still enabled in the "
+"configuration for the ${sapiconfig} SAPI.  Leaving this in place will "
+"probably cause problems when trying to use PHP."
+msgstr ""
+"Está a eliminar o soporte de ${extname} para php5, pero aínda está activado "
+"na configuración da SAPI ${sapiconfig}. Deixalo activado seguramente vaia "
+"causar problemas se tenta empregar PHP."
--- mapserver-5.6.5.orig/debian/po/output
+++ mapserver-5.6.5/debian/po/output
@@ -0,0 +1 @@
+2   utf8
--- mapserver-5.6.5.orig/debian/po/nl.po
+++ mapserver-5.6.5/debian/po/nl.po
@@ -0,0 +1,72 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mapserver\n"
+"Report-Msgid-Bugs-To: pkg-grass-devel@lists.alioth.debian.org\n"
+"POT-Creation-Date: 2007-06-15 15:55+0200\n"
+"PO-Revision-Date: 2007-07-31 09:33+0100\n"
+"Last-Translator: Bart Cornelis <cobaco@skolelinux.no>\n"
+"Language-Team: debian-l10n-dutch <debian-l10n-dutch@lists.debian.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Dutch\n"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+#, fuzzy
+#| msgid "Should ${extname} support be added for ${sapiconfig}?"
+msgid "Should ${extname} be added to /etc/php5/${sapiconfig}/php.ini?"
+msgstr ""
+"Wilt u dat ${extname}-ondersteuning toegevoegd wordt voor ${sapiconfig}?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+#, fuzzy
+#| msgid ""
+#| "You are installing ${extname} support for PHP5, but it is not yet enabled "
+#| "in /etc/php5/${sapiconfig}/php.ini. Enabling this extension will allow "
+#| "PHP5 scripts to use it."
+msgid ""
+"You are installing ${extname} support for php5 and it is not yet enabled in "
+"the configuration for the ${sapiconfig} SAPI. Enabling this extension will "
+"allow php5 scripts to use it."
+msgstr ""
+"U bent bezig ${extname}-ondersteuning te installeren voor PHP5. Dit is "
+"echter nog niet geactiveerd in het configuratiebestand /etc/php5/"
+"${sapiconfig}/php.ini . Activeren van deze extensie laat php5-scripts toe om "
+"de extentie te gebruiken."
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+#, fuzzy
+#| msgid "Should ${extname} support be removed for ${sapiconfig}?"
+msgid "Should ${extname} be removed from /etc/php5/${sapiconfig}/php.ini?"
+msgstr ""
+"Wilt u dat ${extname}-ondersteuning verwijderd wordt voor ${sapiconfig}?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+#, fuzzy
+#| msgid ""
+#| "You are removing ${extname} support for PHP5, but it is still enabled in /"
+#| "etc/php5/${sapiconfig}/php.ini. Leaving this in place will probably cause "
+#| "problems when trying to use PHP."
+msgid ""
+"You are removing ${extname} support for php5, but it is still enabled in the "
+"configuration for the ${sapiconfig} SAPI.  Leaving this in place will "
+"probably cause problems when trying to use PHP."
+msgstr ""
+"U bent bezig om ${extname}-ondersteuning voor php5 te verwijderen. Dit is "
+"echter nog steeds geactiveerd in het configuratiebestand /etc/php5/"
+"${sapiconfig}/php.ini . Als u dit laat staan zal dit waarschijnlijk "
+"problemen veroorzaken wanneer u probeert om PHP te gebruiken."
--- mapserver-5.6.5.orig/debian/po/fi.po
+++ mapserver-5.6.5/debian/po/fi.po
@@ -0,0 +1,51 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: mapserver_5.0.0-3\n"
+"Report-Msgid-Bugs-To: pkg-grass-devel@lists.alioth.debian.org\n"
+"POT-Creation-Date: 2007-06-15 15:55+0200\n"
+"PO-Revision-Date: 2007-12-20 21:58+0200\n"
+"Last-Translator: Esko Arajärvi <edu@iki.fi>\n"
+"Language-Team: Finnish <debian-l10n-finnish@lists.debian.org>\n"
+"Language: fi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Finnish\n"
+"X-Poedit-Country: Finland\n"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid "Should ${extname} be added to /etc/php5/${sapiconfig}/php.ini?"
+msgstr "Tulisiko ${extname} lisätä tiedostoon /etc/php5/${sapiconfig}/php.ini?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid ""
+"You are installing ${extname} support for php5 and it is not yet enabled in "
+"the configuration for the ${sapiconfig} SAPI. Enabling this extension will "
+"allow php5 scripts to use it."
+msgstr ""
+"Olet asentamassa php5:lle ”${extname}”-tukea, eikä sitä ole vielä aktivoitu "
+"${sapiconfig} SAPIn asetuksissa. Tämän laajennoksen aktivoiminen sallii php5:"
+"n komentosarjojen käyttää sitä."
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid "Should ${extname} be removed from /etc/php5/${sapiconfig}/php.ini?"
+msgstr ""
+"Tulisiko ${extname} poistaa tiedostosta /etc/php5/${sapiconfig}/php.ini?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid ""
+"You are removing ${extname} support for php5, but it is still enabled in the "
+"configuration for the ${sapiconfig} SAPI.  Leaving this in place will "
+"probably cause problems when trying to use PHP."
+msgstr ""
+"Olet poistamassa php5:n ”${extname}”-tukea, mutta se on edelleen aktivoituna "
+"${sapiconfig} SAPIn asetuksissa. Tilanteen jättäminen nykyiselleen "
+"luultavasti aiheuttaa ongelmia yritettäessä käyttää PHP:ta."
--- mapserver-5.6.5.orig/debian/po/cs.po
+++ mapserver-5.6.5/debian/po/cs.po
@@ -0,0 +1,61 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mapserver\n"
+"Report-Msgid-Bugs-To: pkg-grass-devel@lists.alioth.debian.org\n"
+"POT-Creation-Date: 2007-06-15 15:55+0200\n"
+"PO-Revision-Date: 2010-10-11 17:58+0200\n"
+"Last-Translator: Miroslav Kure <kurem@debian.cz>\n"
+"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n"
+"Language: cs\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid "Should ${extname} be added to /etc/php5/${sapiconfig}/php.ini?"
+msgstr "Má se do /etc/php5/${sapiconfig}/php.ini přidat podpora ${extname}?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid ""
+"You are installing ${extname} support for php5 and it is not yet enabled in "
+"the configuration for the ${sapiconfig} SAPI. Enabling this extension will "
+"allow php5 scripts to use it."
+msgstr ""
+"Instalujete podporu ${extname} pro php5, která ještě není povolena v "
+"konfiguraci ${sapiconfig} SAPI. Pokud toto rozšíření povolíte, budete je "
+"moci využívat v php5 skriptech."
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid "Should ${extname} be removed from /etc/php5/${sapiconfig}/php.ini?"
+msgstr "Má se z /etc/php5/${sapiconfig}/php.ini odstranit podpora ${extname}?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid ""
+"You are removing ${extname} support for php5, but it is still enabled in the "
+"configuration for the ${sapiconfig} SAPI.  Leaving this in place will "
+"probably cause problems when trying to use PHP."
+msgstr ""
+"Odstraňujete podporu ${extname} pro php5, která je v konfiguraci "
+"${sapiconfig} SAPI stále povolena. To může způsobit problémy při používání "
+"PHP."
--- mapserver-5.6.5.orig/debian/po/vi.po
+++ mapserver-5.6.5/debian/po/vi.po
@@ -0,0 +1,55 @@
+# Vietnamese Translation for Mapserver.
+# Copyright © 2010 Free Software Foundation, Inc.
+# Clytie Siddall <clytie@riverland.net.au>, 2005-2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mapserver 5.6.5-1\n"
+"Report-Msgid-Bugs-To: pkg-grass-devel@lists.alioth.debian.org\n"
+"POT-Creation-Date: 2007-06-15 15:55+0200\n"
+"PO-Revision-Date: 2010-10-31 14:06+1030\n"
+"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
+"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n"
+"Language: vi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: LocFactoryEditor 1.8\n"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid "Should ${extname} be added to /etc/php5/${sapiconfig}/php.ini?"
+msgstr "Có nên thêm ${extname} vào « /etc/php5/${sapiconfig}/php.ini » không?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid ""
+"You are installing ${extname} support for php5 and it is not yet enabled in "
+"the configuration for the ${sapiconfig} SAPI. Enabling this extension will "
+"allow php5 scripts to use it."
+msgstr ""
+"Bạn đang cài đặt sự hỗ trợ ${extname} cho php5 mà chưa được hiệu lực trong "
+"cấu hình cho SAPI ${sapiconfig}. Bật phần mở rộng này để cho phép văn lệnh "
+"php5 sử dụng."
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid "Should ${extname} be removed from /etc/php5/${sapiconfig}/php.ini?"
+msgstr ""
+"Có nên gỡ bỏ ${extname} khỏi « /etc/php5/${sapiconfig}/php.ini » không?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid ""
+"You are removing ${extname} support for php5, but it is still enabled in the "
+"configuration for the ${sapiconfig} SAPI.  Leaving this in place will "
+"probably cause problems when trying to use PHP."
+msgstr ""
+"Bạn đang gỡ bỏ sự hỗ trợ ${extname} cho php5 mà vẫn còn được hiệu lực trong "
+"cấu hình cho SAPI ${sapiconfig}. Để lại thì rất có thể gây ra vấn đề khi thử "
+"sử dụng PHP."
--- mapserver-5.6.5.orig/debian/po/fr.po
+++ mapserver-5.6.5/debian/po/fr.po
@@ -0,0 +1,56 @@
+# Translation of mapserver debconf templates to French
+# Copyright (C) 2007 Steve Petruzzello <dlist@bluewin.ch>
+# This file is distributed under the same license as the mapserver package
+msgid ""
+msgstr ""
+"Project-Id-Version: mapserver_5.0.0-2\n"
+"Report-Msgid-Bugs-To: pkg-grass-devel@lists.alioth.debian.org\n"
+"POT-Creation-Date: 2007-06-15 15:55+0200\n"
+"PO-Revision-Date: 2007-10-19 09:42+0100\n"
+"Last-Translator: Steve Petruzzello <dlist@bluewin.ch>\n"
+"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: French\n"
+"X-Poedit-Country: SWITZERLAND\n"
+"X-Poedit-SourceCharset: utf-8\n"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid "Should ${extname} be added to /etc/php5/${sapiconfig}/php.ini?"
+msgstr ""
+"Faut-il ajouter ${extname} au fichier /etc/php5/${sapiconfig}/php.ini ?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid ""
+"You are installing ${extname} support for php5 and it is not yet enabled in "
+"the configuration for the ${sapiconfig} SAPI. Enabling this extension will "
+"allow php5 scripts to use it."
+msgstr ""
+"Vous êtes en train d'installer la gestion de ${extname} pour PHP5, mais elle "
+"n'est pas encore activée dans la configuration de la SAPI ${sapiconfig}. "
+"L'activation de cette extension permettra aux scripts PHP5 de l'utiliser."
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid "Should ${extname} be removed from /etc/php5/${sapiconfig}/php.ini?"
+msgstr ""
+"Faut-il supprimer ${extname} du fichier /etc/php5/${sapiconfig}/php.ini ?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid ""
+"You are removing ${extname} support for php5, but it is still enabled in the "
+"configuration for the ${sapiconfig} SAPI.  Leaving this in place will "
+"probably cause problems when trying to use PHP."
+msgstr ""
+"Vous êtes en train de supprimer la gestion de ${extname} pour PHP5, mais "
+"elle est encore activée dans la configuration de la SAPI ${sapiconfig}, ce "
+"qui pourrait poser des problèmes lors de l'utilisation de PHP."
--- mapserver-5.6.5.orig/debian/po/de.po
+++ mapserver-5.6.5/debian/po/de.po
@@ -0,0 +1,57 @@
+# Translation of mapserver to german.
+# Copyright (C) 2007 Alwin Meschede
+# This file is distributed under the same license as the mapserver package.
+#
+# Alwin Meschede <ameschede@gmx.de>, 2007, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: de\n"
+"Report-Msgid-Bugs-To: pkg-grass-devel@lists.alioth.debian.org\n"
+"POT-Creation-Date: 2007-06-15 15:55+0200\n"
+"PO-Revision-Date: 2008-01-23 18:05+0100\n"
+"Last-Translator: Alwin Meschede <ameschede@gmx.de>\n"
+"Language-Team: Deutsch <debian-l10n-de@lists.debian.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms:  nplurals=2; plural=(n != 1);\n"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid "Should ${extname} be added to /etc/php5/${sapiconfig}/php.ini?"
+msgstr ""
+"Soll ${extname} der /etc/php5/${sapiconfig}/php.ini hinzugefügt werden?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid ""
+"You are installing ${extname} support for php5 and it is not yet enabled in "
+"the configuration for the ${sapiconfig} SAPI. Enabling this extension will "
+"allow php5 scripts to use it."
+msgstr ""
+"Sie installieren die ${extname}-Unterstützung für php5, die noch nicht in "
+"der Konfiguration der ${sapiconfig} SAPI aktiviert ist. Die Aktivierung "
+"dieser Erweiterung macht es php5-Skripten möglich, sie zu benutzen."
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid "Should ${extname} be removed from /etc/php5/${sapiconfig}/php.ini?"
+msgstr ""
+"Soll ${extname} aus der /etc/php5/${sapiconfig}/php.ini entfernt werden?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid ""
+"You are removing ${extname} support for php5, but it is still enabled in the "
+"configuration for the ${sapiconfig} SAPI.  Leaving this in place will "
+"probably cause problems when trying to use PHP."
+msgstr ""
+"Sie entfernen die ${extname}-Unterstützung für php5, die aber noch in der "
+"Konfiguration der ${sapiconfig} SAPI aktiviert ist. Dies so zu belassen wird "
+"wahrscheinlich Probleme verursachen, wenn PHP benutzt werden soll."
--- mapserver-5.6.5.orig/debian/po/ru.po
+++ mapserver-5.6.5/debian/po/ru.po
@@ -0,0 +1,56 @@
+# translation of ru.po to Russian
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Yuri Kozlov <kozlov.y@gmail.com>, 2007, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: mapserver 5.0.3-3\n"
+"Report-Msgid-Bugs-To: pkg-grass-devel@lists.alioth.debian.org\n"
+"POT-Creation-Date: 2007-06-15 15:55+0200\n"
+"PO-Revision-Date: 2008-11-06 19:33+0300\n"
+"Last-Translator: Yuri Kozlov <kozlov.y@gmail.com>\n"
+"Language-Team: Russian <debian-l10n-russian@lists.debian.org>\n"
+"Language: ru\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms:  nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid "Should ${extname} be added to /etc/php5/${sapiconfig}/php.ini?"
+msgstr "Добавить ${extname} в /etc/php5/${sapiconfig}/php.ini?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid ""
+"You are installing ${extname} support for php5 and it is not yet enabled in "
+"the configuration for the ${sapiconfig} SAPI. Enabling this extension will "
+"allow php5 scripts to use it."
+msgstr ""
+"Вы устанавливаете поддержку ${extname} в php5, но пока она не включена в "
+"настройках ${sapiconfig} SAPI. Включение этого расширения позволит сценариям "
+"php5 его использовать."
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid "Should ${extname} be removed from /etc/php5/${sapiconfig}/php.ini?"
+msgstr "Удалить ${extname} из /etc/php5/${sapiconfig}/php.ini?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid ""
+"You are removing ${extname} support for php5, but it is still enabled in the "
+"configuration for the ${sapiconfig} SAPI.  Leaving this in place will "
+"probably cause problems when trying to use PHP."
+msgstr ""
+"Вы удаляете поддержку ${extname} из php5, но она всё ещё включена в "
+"настройках ${sapiconfig} SAPI. Оставление файла в таком состоянии, вероятно, "
+"приведёт к проблемам при использовании PHP."
--- mapserver-5.6.5.orig/debian/po/POTFILES.in
+++ mapserver-5.6.5/debian/po/POTFILES.in
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] php5-mapscript.templates
--- mapserver-5.6.5.orig/debian/po/es.po
+++ mapserver-5.6.5/debian/po/es.po
@@ -0,0 +1,70 @@
+# mapserver translation to spanish
+# Copyright (C) 2008 Software in the Public Interest
+# This file is distributed under the same license as the mapserver package.
+# Changes:
+# - Initial translation
+# Ignacio Mondino <ignacio.mondino@gmail.com>, 2008
+# Traductores, si no conoce el formato PO, merece la pena leer la 
+# documentación de gettext, especialmente las secciones dedicadas a este
+# formato, por ejemplo ejecutando:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+# Equipo de traducción al español, por favor lean antes de traducir
+# los siguientes documentos:
+# - El proyecto de traducción de Debian al español
+# http://www.debian.org/intl/spanish
+# especialmente las notas de traducción en
+# http://www.debian.org/intl/spanish/notas
+# - La guía de traducción de po's de debconf:
+# /usr/share/doc/po-debconf/README-trans
+# o http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 5.0.3-3\n"
+"Report-Msgid-Bugs-To: pkg-grass-devel@lists.alioth.debian.org\n"
+"POT-Creation-Date: 2007-06-15 15:55+0200\n"
+"PO-Revision-Date: 2008-11-03 18:42-0200\n"
+"Last-Translator: Ignacio Mondino <ignacio.mondino@gmail.com>>\n"
+"Language-Team: Debian Spanish team <debian-l10n-spanish@lists.debian.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid "Should ${extname} be added to /etc/php5/${sapiconfig}/php.ini?"
+msgstr "¿Debería añadirse ${extname} a «/etc/php5/${sapiconfig}/php.ini» ?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid ""
+"You are installing ${extname} support for php5 and it is not yet enabled in "
+"the configuration for the ${sapiconfig} SAPI. Enabling this extension will "
+"allow php5 scripts to use it."
+msgstr ""
+"Está instalando el soporte de ${extname} para php5 y este aún no está "
+"activado en la configuración de la SAPI de ${sapiconfig}. Activando esta "
+"extensión permitirá que los scripts de php5 la utilicen."
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid "Should ${extname} be removed from /etc/php5/${sapiconfig}/php.ini?"
+msgstr "¿Debería eliminarse ${extname} de «/etc/php5/${sapiconfig}/php.ini»? "
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid ""
+"You are removing ${extname} support for php5, but it is still enabled in the "
+"configuration for the ${sapiconfig} SAPI.  Leaving this in place will "
+"probably cause problems when trying to use PHP."
+msgstr ""
+"Está eliminando el soporte ${extname} de php5, pero todavía está activado en "
+"la configuración de la SAPI de ${sapiconfig}. Esta situación podría causar "
+"problemas al intentar utilizar PHP."
--- mapserver-5.6.5.orig/debian/po/ta.po
+++ mapserver-5.6.5/debian/po/ta.po
@@ -0,0 +1,68 @@
+# translation of mapserver.po to TAMIL
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Dr.T.Vasudevan <agnihot3@gmail.com>, 2007.
+msgid ""
+msgstr ""
+"Project-Id-Version: mapserver\n"
+"Report-Msgid-Bugs-To: pkg-grass-devel@lists.alioth.debian.org\n"
+"POT-Creation-Date: 2007-06-15 15:55+0200\n"
+"PO-Revision-Date: 2007-07-23 21:49+0530\n"
+"Last-Translator: Dr.T.Vasudevan <agnihot3@gmail.com>\n"
+"Language-Team: TAMIL <ubuntu-l10n-tam@lists.ubuntu.com>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+#, fuzzy
+#| msgid "Should ${extname} support be added for ${sapiconfig}?"
+msgid "Should ${extname} be added to /etc/php5/${sapiconfig}/php.ini?"
+msgstr "${extname} ஆதரவு ${sapiconfig} க்கு சேர்க்கப்பட வேண்டுமா?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+#, fuzzy
+#| msgid ""
+#| "You are installing ${extname} support for PHP5, but it is not yet enabled "
+#| "in /etc/php5/${sapiconfig}/php.ini. Enabling this extension will allow "
+#| "PHP5 scripts to use it."
+msgid ""
+"You are installing ${extname} support for php5 and it is not yet enabled in "
+"the configuration for the ${sapiconfig} SAPI. Enabling this extension will "
+"allow php5 scripts to use it."
+msgstr ""
+"நீங்கள் ${extname} ஐ PHP5 ஆதரவுக்காக நிறுவுகிறீர்கள், அது /etc/php5/${sapiconfig}/"
+"php.ini இல் இன்னும் இயலுமைப்படுத்தப்படவில்லை. இந்த நீட்சியை செயல்படுத்துவது  PHP5 "
+"ஸ்கிரிப்ட் களை அதை பயன்படுத்த அனுமதிக்கும்."
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+#, fuzzy
+#| msgid "Should ${extname} support be removed for ${sapiconfig}?"
+msgid "Should ${extname} be removed from /etc/php5/${sapiconfig}/php.ini?"
+msgstr "${extname} ஆதரவு ${sapiconfig} க்கு நீக்கப்பட வேண்டுமா?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+#, fuzzy
+#| msgid ""
+#| "You are removing ${extname} support for PHP5, but it is still enabled in /"
+#| "etc/php5/${sapiconfig}/php.ini. Leaving this in place will probably cause "
+#| "problems when trying to use PHP."
+msgid ""
+"You are removing ${extname} support for php5, but it is still enabled in the "
+"configuration for the ${sapiconfig} SAPI.  Leaving this in place will "
+"probably cause problems when trying to use PHP."
+msgstr ""
+"நீங்கள் ${extname} ஆதரவை PHP5 க்கு நீக்குகிறீர்கள், ஆனால் அது /etc/php5/${sapiconfig}/"
+"php.ini இல் இன்னமும் உள்ளது. இதை அப்படியே விடுவது  PHP ஐ பயன்படுத்தும்போது "
+"பிரச்சினைகளை உண்டாக்கக் கூடும்."
--- mapserver-5.6.5.orig/debian/po/ja.po
+++ mapserver-5.6.5/debian/po/ja.po
@@ -0,0 +1,53 @@
+# Japanese debconf templates translation for mapserver.
+# Copyright (C) 2007-2009 Debian GIS Project <pkg-grass-devel@lists.alioth.debian.org>
+# This file is distributed under the same license as the mapserver package.
+# Noritada Kobayashi <noritadak@gmail.com>, 2007.
+# Hideki Yamane (Debian-JP) <henrich@debian.or.jp>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: mapserver 5.0.3-3\n"
+"Report-Msgid-Bugs-To: pkg-grass-devel@lists.alioth.debian.org\n"
+"POT-Creation-Date: 2007-06-15 15:55+0200\n"
+"PO-Revision-Date: 2009-01-05 22:44+0900\n"
+"Last-Translator: Hideki Yamane (Debian-JP) <henrich@debian.or.jp>\n"
+"Language-Team: Japanese <debian-japanese@lists.debian.org>\n"
+"Language: ja\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid "Should ${extname} be added to /etc/php5/${sapiconfig}/php.ini?"
+msgstr "${extname} を /etc/php5/${sapiconfig}/php.ini に追加しますか?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:1001
+msgid ""
+"You are installing ${extname} support for php5 and it is not yet enabled in "
+"the configuration for the ${sapiconfig} SAPI. Enabling this extension will "
+"allow php5 scripts to use it."
+msgstr ""
+"$php5 に {extname} サポートをインストールしてありますが、この拡張機能は "
+"${sapiconfig} SAPI の設定ではまだ有効になっていません。有効にすると php5 スク"
+"リプトが拡張機能を使用できるようになります。"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid "Should ${extname} be removed from /etc/php5/${sapiconfig}/php.ini?"
+msgstr "${extname} を /etc/php5/${sapiconfig}/php.ini から削除しますか?"
+
+#. Type: boolean
+#. Description
+#: ../php5-mapscript.templates:2001
+msgid ""
+"You are removing ${extname} support for php5, but it is still enabled in the "
+"configuration for the ${sapiconfig} SAPI.  Leaving this in place will "
+"probably cause problems when trying to use PHP."
+msgstr ""
+"php5 から ${extname} のサポートを削除していますが、この拡張機能は "
+"${sapiconfig} SAPI の設定でまだ有効になっています。このまま有効のままにしてお"
+"くと、おそらく PHP を使用しようとする際に問題が生じるでしょう。"
