--- lua-sql-2.2.0~rc1.orig/debian/changelog
+++ lua-sql-2.2.0~rc1/debian/changelog
@@ -0,0 +1,67 @@
+lua-sql (2.2.0~rc1-2) unstable; urgency=low
+
+  * changed lua to Lua in package description
+  * build depend on lua5.1-policy-dev >= 22
+  * bumped standards version to 3.8.2, no changes needed
+
+ -- Enrico Tassi <gareuselesinge@debian.org>  Tue, 21 Jul 2009 14:00:34 +0200
+
+lua-sql (2.2.0~rc1-1) unstable; urgency=low
+
+  * New upstream release candidate
+
+ -- Enrico Tassi <gareuselesinge@debian.org>  Sat, 19 Apr 2008 11:57:25 +0200
+
+lua-sql (2.1.1-4) unstable; urgency=low
+
+  * Activated postgres backend
+
+ -- Enrico Tassi <gareuselesinge@debian.org>  Fri, 22 Feb 2008 18:14:56 +0100
+
+lua-sql (2.1.1-3) unstable; urgency=low
+
+  * the tests on hppa terminates with a os.exit(0) that essentially skips
+    dlclosing the sqlite bindings. This is a bug, probably outside the binding
+    itself.
+  * added Vcs-Browser and removed XS-X- from Vcs-Svn
+  * fixed description of the -doc package
+  * updated to standards-version 3.7.3, no changes needed
+  * fixed some lintian warnings regarding sections of -dev and -doc packages.
+
+ -- Enrico Tassi <gareuselesinge@debian.org>  Sun, 13 Jan 2008 18:16:58 +0100
+
+lua-sql (2.1.1-2) unstable; urgency=low
+
+  * Added Homepage field in control file
+  * Renamed package to reflect sqlite3 migration
+
+ -- Enrico Tassi <gareuselesinge@debian.org>  Tue, 30 Oct 2007 15:07:32 +0100
+
+lua-sql (2.1.1-1) unstable; urgency=low
+
+  * Renamed cdbs deprecated variable
+  * New upstream release
+
+ -- Enrico Tassi <gareuselesinge@debian.org>  Tue, 30 Oct 2007 10:54:36 +0100
+
+lua-sql (2.0.2-3) unstable; urgency=low
+
+  * Updated to policy 10 and added clean hook to remove sqlite test db
+    (Closes: #424555)
+
+ -- Enrico Tassi <gareuselesinge@debian.org>  Wed, 16 May 2007 15:57:12 +0200
+
+lua-sql (2.0.2-2) unstable; urgency=low
+
+  * made control file binNMU safe
+  * Added a note about the documentation shipped within the -dev package
+    in the control file
+  * Added call to lua5.1-policy-apply --reverse in clean:: hook
+
+ -- Enrico Tassi <gareuselesinge@debian.org>  Mon, 16 Oct 2006 10:54:05 +0200
+
+lua-sql (2.0.2-1) unstable; urgency=low
+
+  * Initial release. (Closes: #392120)
+
+ -- Enrico Tassi <gareuselesinge@debian.org>  Tue, 10 Oct 2006 15:28:33 +0200
--- lua-sql-2.2.0~rc1.orig/debian/mysql.Makefile.Debian.conf
+++ lua-sql-2.2.0~rc1/debian/mysql.Makefile.Debian.conf
@@ -0,0 +1,25 @@
+### mandatory fields
+PKG_NAME=sql.mysql
+
+### things relative to the C library part
+CLIB_CFLAGS=$(shell mysql_config --cflags)
+CLIB_LDFLAGS=$(shell mysql_config --libs)
+CLIB_OBJS=src/luasql.lo src/ls_mysql.lo
+VERSION_INFO=2:0:0
+
+### things relative to the lua library part
+LUA_HEADER=
+LUA_SOURCES=
+LUA_MODNAME=luasql.mysql
+#LUA_TEST=tests/test.lua mysql database user password
+
+### this part is relative to pkg-config
+PKG_VERSION=$(shell dpkg-parsechangelog|grep ^Ver|cut -d ' ' -f 2|cut -d '-' -f 1)
+PKG_LIBS_PRIVATE=
+PKG_URL=
+PKG_REQUIRES=
+PKG_CONFLICTS=
+
+### this part is relative to debian libs naming policy
+DEB_EXTRA_DASH=-
+
--- lua-sql-2.2.0~rc1.orig/debian/watch
+++ lua-sql-2.2.0~rc1/debian/watch
@@ -0,0 +1,5 @@
+# test this watch file using:
+# uscan --watchfile debian/watch --upstream-version 0.0.1 --package lua-sql
+#
+version=3
+http://luaforge.net/frs/?group_id=12  /frs/download.php/\d+/luasql-([\d\.]*).tar.gz
--- lua-sql-2.2.0~rc1.orig/debian/copyright
+++ lua-sql-2.2.0~rc1/debian/copyright
@@ -0,0 +1,26 @@
+This package was debianized by Enrico Tassi <gareuselesinge@debian.org>
+Thu Oct 4 17:39:03 CEST 2006.
+
+It was downloaded from http://luaforge.net/projects/luasql/.
+
+
+Copyright © 2003-2006 The Kepler Project.
+
+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 or substantial portions of the 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.
+
--- lua-sql-2.2.0~rc1.orig/debian/sqlite3.Makefile.Debian.conf
+++ lua-sql-2.2.0~rc1/debian/sqlite3.Makefile.Debian.conf
@@ -0,0 +1,27 @@
+### mandatory fields
+PKG_NAME=sql.sqlite3
+
+### things relative to the C library part
+CLIB_CFLAGS=$(shell pkg-config sqlite3 --cflags)
+CLIB_LDFLAGS=$(shell pkg-config sqlite3 --libs)
+CLIB_OBJS=src/luasql.lo src/ls_sqlite3.lo
+VERSION_INFO=2:0:0
+
+### things relative to the lua library part
+LUA_HEADER=
+LUA_SOURCES=
+LUA_MODNAME=luasql.sqlite3
+LUA_TEST=tests/test.lua sqlite3 luasql-test
+
+### this part is relative to pkg-config
+PKG_VERSION=$(shell dpkg-parsechangelog|grep ^Ver|cut -d ' ' -f 2|cut -d '-' -f 1)
+PKG_LIBS_PRIVATE=
+PKG_URL=
+PKG_REQUIRES=sqlite3
+PKG_CONFLICTS=
+
+### this part is relative to debian libs naming policy
+DEB_EXTRA_DASH=-
+
+pre-clean-hook::
+	rm -f luasql-test
--- lua-sql-2.2.0~rc1.orig/debian/rules
+++ lua-sql-2.2.0~rc1/debian/rules
@@ -0,0 +1,4 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/class/lua.mk
+include /usr/share/cdbs/1/rules/dpatch.mk
--- lua-sql-2.2.0~rc1.orig/debian/liblua5.1-sql-doc.docs
+++ lua-sql-2.2.0~rc1/debian/liblua5.1-sql-doc.docs
@@ -0,0 +1,2 @@
+doc/us
+doc/br
--- lua-sql-2.2.0~rc1.orig/debian/pgsql.Makefile.Debian.conf
+++ lua-sql-2.2.0~rc1/debian/pgsql.Makefile.Debian.conf
@@ -0,0 +1,26 @@
+### mandatory fields
+PKG_NAME=sql.postgres
+
+### things relative to the C library part
+CLIB_CFLAGS=$(shell pg_config --cflags) -I $(shell pg_config --includedir)
+CLIB_LDFLAGS=$(shell pg_config --ldflags) -lpq
+#$(shell pg_config --libs) 
+CLIB_OBJS=src/luasql.lo src/ls_postgres.lo
+VERSION_INFO=2:0:0
+
+### things relative to the lua library part
+LUA_HEADER=
+LUA_SOURCES=
+LUA_MODNAME=luasql.postgres
+#LUA_TEST=tests/test.lua mysql database user password
+
+### this part is relative to pkg-config
+PKG_VERSION=$(shell dpkg-parsechangelog|grep ^Ver|cut -d ' ' -f 2|cut -d '-' -f 1)
+PKG_LIBS_PRIVATE=
+PKG_URL=
+PKG_REQUIRES=
+PKG_CONFLICTS=
+
+### this part is relative to debian libs naming policy
+DEB_EXTRA_DASH=-
+
--- lua-sql-2.2.0~rc1.orig/debian/control
+++ lua-sql-2.2.0~rc1/debian/control
@@ -0,0 +1,69 @@
+Source: lua-sql
+Section: interpreters
+Priority: optional
+Maintainer: Enrico Tassi <gareuselesinge@debian.org>
+Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5), dpatch, libmysqlclient15-dev, libsqlite3-dev, lua5.1-policy-dev (>= 22), libpq-dev
+Standards-Version: 3.8.2
+Vcs-Svn: svn://svn.debian.org/pkg-lua/packages/lua-sql
+Vcs-Browser: http://svn.debian.org/viewsvn/pkg-lua/packages/lua-sql
+Homepage: http://www.luaforge.net/projects/luasql
+
+Package: liblua5.1-sql-sqlite3-2
+Architecture: any
+Depends: ${shlibs:Depends}
+Replaces: liblua5.1-sql-sqlite2
+Conflicts: liblua5.1-sql-sqlite2
+Provides: liblua5.1-sql-sqlite2
+Description: luasql library for the Lua language version 5.1
+ This package contains the luasql library (sqlite3 backend).
+
+Package: liblua5.1-sql-sqlite3-dev
+Architecture: any
+Depends: liblua5.1-sql-sqlite3-2 (= ${binary:Version})
+Replaces: liblua5.1-sql-sqlite-dev
+Conflicts: liblua5.1-sql-sqlite-dev
+Provides: liblua5.1-sql-sqlite-dev
+Section: libdevel
+Description: luasql development files for the Lua language version 5.1
+ This package contains the development files of the luasql library (sqlite
+ backend), useful to create a statically linked binary (like a C application or
+ a standalone Lua interpreter).
+
+Package: liblua5.1-sql-postgres-2
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: luasql library for the Lua language version 5.1
+ This package contains the luasql library (PostgreSQL backend).
+
+Package: liblua5.1-sql-postgres-dev
+Architecture: any
+Section: libdevel
+Depends: liblua5.1-sql-postgres-2 (= ${binary:Version})
+Description: luasql development files for the Lua language version 5.1
+ This package contains the development files of the luasql library (PostgreSQL
+ backend), useful to create a statically linked binary (like a C application or
+ a standalone Lua interpreter).
+
+Package: liblua5.1-sql-mysql-2
+Architecture: any
+Depends: ${shlibs:Depends}
+Replaces: liblua5.1-sql-mysql2
+Conflicts: liblua5.1-sql-mysql2
+Provides: liblua5.1-sql-mysql2
+Description: luasql library for the Lua language version 5.1
+ This package contains the luasql library (MySQL backend).
+
+Package: liblua5.1-sql-mysql-dev
+Architecture: any
+Section: libdevel
+Depends: liblua5.1-sql-mysql-2 (= ${binary:Version})
+Description: luasql development files for the Lua language version 5.1
+ This package contains the development files of the luasql library (MySQL
+ backend), useful to create a statically linked binary (like a C application or
+ a standalone Lua interpreter).
+
+Package: liblua5.1-sql-doc
+Architecture: all
+Section: doc
+Description: luasql documentation
+ This package contains the documentation of the luasql library. 
--- lua-sql-2.2.0~rc1.orig/debian/patches/test.dpatch
+++ lua-sql-2.2.0~rc1/debian/patches/test.dpatch
@@ -0,0 +1,22 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## test.dpatch by Enrico Tassi <gareuselesinge@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: do an os.exit(0) at the very end to skip dlclose
+
+@DPATCH@
+diff -urNad trunk~/tests/test.lua trunk/tests/test.lua
+--- trunk~/tests/test.lua	2007-10-16 17:42:50.000000000 +0200
++++ trunk/tests/test.lua	2008-01-13 18:12:57.000000000 +0100
+@@ -613,3 +613,11 @@
+ 	io.write (" OK !\n")
+ end
+ 
++p = io.popen('dpkg-architecture -qDEB_HOST_ARCH','r')
++d = p:read('*all')
++if d == 'hppa\n' then
++        -- on hppa dlclose fails
++	print("We are running on hppa, dlclose skipped")
++        os.exit(0)
++end
++
--- lua-sql-2.2.0~rc1.orig/debian/patches/00dpatch.conf
+++ lua-sql-2.2.0~rc1/debian/patches/00dpatch.conf
@@ -0,0 +1,2 @@
+conf_debianonly=1
+conf_origtargzpath=../tarballs/
--- lua-sql-2.2.0~rc1.orig/debian/patches/00list
+++ lua-sql-2.2.0~rc1/debian/patches/00list
@@ -0,0 +1 @@
+test.dpatch
