--- lua-svn-0.4.0.orig/debian/Makefile.Debian.conf
+++ lua-svn-0.4.0/debian/Makefile.Debian.conf
@@ -0,0 +1,48 @@
+### $Id: Makefile.Debian.conf.sample 390 2007-06-19 09:36:07Z gareuselesinge $
+
+### mandatory fields
+PKG_NAME=svn
+
+### things relative to the C library part
+CLIB_CFLAGS=-I /usr/include/subversion-1 $(shell pkg-config apr-1 --cflags)
+CLIB_LDFLAGS=-lsvn_client-1 $(shell pkg-config apr-1 --libs)
+CLIB_LDFLAGS_STATIC=-lsvn_client-1 -lsvn_ra-1 -lsvn_repos-1 -lsvn_subr-1 -lapr-1 $(shell pkg-config apr-1 --libs --static)
+CLIB_OBJS=src/luasvn.lo
+VERSION_INFO=1:0:0
+LUA_MODNAME_CPART=
+
+### things relative to the lua library part
+LUA_HEADER=
+LUA_SOURCES=
+LUA_MODNAME=svn
+LUA_TEST=/usr/bin/shake test.lua
+LUA_MODNAME_CPART=
+
+### 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=
+
+### In addition, to gather flexibility, you can set these hooks
+### (called in this order)
+pre-all-hook::
+post-all-hook::
+pre-test-hook::
+pre-lua-dynamic-test-hook::
+ rm -rf test/
+pre-dynamic-link-hook::
+pre-app-dynamic-test-hook::
+ rm -rf test/
+pre-static-link-hook::
+pre-app-static-test-hook::
+ rm -rf test/
+pre-install-hook::
+post-install-hook::
+pre-clean-hook::
+post-clean-hook::
+ rm -rf test/ test_repo/ debian/.subversion
--- lua-svn-0.4.0.orig/debian/changelog
+++ lua-svn-0.4.0/debian/changelog
@@ -0,0 +1,88 @@
+lua-svn (0.4.0-2) unstable; urgency=low
+
+ * correctly specify all libs needed for static linking (Closes: #555568)
+ * depend on liblua5.1-policy-dev >= 26
+ * added README.source
+ * bumped standards-version to 3.8.3
+
+ -- Enrico Tassi <gareuselesinge@debian.org> Fri, 13 Nov 2009 22:12:13 +0100
+
+lua-svn (0.4.0-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Enrico Tassi <gareuselesinge@debian.org> Wed, 22 Jul 2009 11:20:42 +0200
+
+lua-svn (0.3.0-5) unstable; urgency=low
+
+ * added patch to include svn_utf8.h, kudos to Dann Frazier (Closes: #537957)
+
+ -- Enrico Tassi <gareuselesinge@debian.org> Wed, 22 Jul 2009 11:07:25 +0200
+
+lua-svn (0.3.0-4) unstable; urgency=low
+
+ * changed lua to Lua in control
+ * changed subversion in Subversion in control
+ * build depend on lua5.1-policy-dev >= 22
+ * new patch apr to #include apr_xlate.h
+ * bumped standards-version to 3.8.2, no changes needed
+
+ -- Enrico Tassi <gareuselesinge@debian.org> Tue, 21 Jul 2009 15:06:32 +0200
+
+lua-svn (0.3.0-3) unstable; urgency=low
+
+ * Fixed build-depends according to libsvn1.5 (Closes: #489081)
+
+ -- Enrico Tassi <gareuselesinge@debian.org> Thu, 10 Jul 2008 15:29:28 +0200
+
+lua-svn (0.3.0-2) unstable; urgency=low
+
+ * depend on policy >= 19 to have the test run with HOME set to an existing
+ and writeable/readable directory
+ * run test with shake
+
+ -- Enrico Tassi <gareuselesinge@debian.org> Wed, 19 Mar 2008 16:42:48 +0100
+
+lua-svn (0.3.0-1) unstable; urgency=low
+
+ * New upstream release with backward compatible API changes
+ * Bumped standards-version to 3.7.3, no changes needed
+ * Added Vcs-Browser control field, removed XS-X-Vcs one
+ * Documented test.dpatch to make lintian happy
+ * Moved -dev package to section libdevel
+
+ -- Enrico Tassi <gareuselesinge@debian.org> Sat, 15 Mar 2008 18:10:18 +0100
+
+lua-svn (0.2.6-1) unstable; urgency=low
+
+ * new upstream release
+ * added Homepage field in control file
+
+ -- Enrico Tassi <gareuselesinge@debian.org> Mon, 29 Oct 2007 12:48:33 +0100
+
+lua-svn (0.2.5-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Enrico Tassi <gareuselesinge@debian.org> Fri, 05 Oct 2007 13:56:39 +0200
+
+lua-svn (0.2-4) unstable; urgency=low
+
+ * Added Conflics and Replaces fields in control file
+
+ -- Enrico Tassi <gareuselesinge@debian.org> Fri, 05 Oct 2007 13:50:28 +0200
+
+lua-svn (0.2-3) unstable; urgency=low
+
+ * new upstream release
+ * package name change, since all APIs changed too
+ * fixed watch file
+ * bumped soname
+
+ -- Enrico Tassi <gareuselesinge@debian.org> Mon, 30 Jul 2007 11:38:16 +0200
+
+lua-svn (0.1-1) unstable; urgency=low
+
+ * Initial release. (Closes: #435234)
+
+ -- Enrico Tassi <gareuselesinge@debian.org> Sun, 29 Jul 2007 19:17:22 +0200
--- lua-svn-0.4.0.orig/debian/watch
+++ lua-svn-0.4.0/debian/watch
@@ -0,0 +1,5 @@
+# test this watch file using:
+# uscan --watchfile debian/watch --upstream-version 0.0.1 --package lua-svn
+#
+version=3
+http://luaforge.net/frs/?group_id=289 /frs/download.php/\d+/luasvn-([\d\.]*).tar.gz
--- lua-svn-0.4.0.orig/debian/copyright
+++ lua-svn-0.4.0/debian/copyright
@@ -0,0 +1,26 @@
+This package was debianized by Enrico Tassi <gareuselesinge@debian.org>
+Thu Jul 29 19:19:20 CEST 2007.
+
+It was downloaded from http://luaforge.net/projects/luasvn/.
+
+
+Copyright © 2007 Sergio Madeiros.
+
+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-svn-0.4.0.orig/debian/liblua5.1-svn-dev.docs
+++ lua-svn-0.4.0/debian/liblua5.1-svn-dev.docs
@@ -0,0 +1 @@
+doc
--- lua-svn-0.4.0.orig/debian/rules
+++ lua-svn-0.4.0/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-svn-0.4.0.orig/debian/README.source
+++ lua-svn-0.4.0/debian/README.source
@@ -0,0 +1 @@
+Please refer to /usr/share/doc/dpatch/README.source.gz
--- lua-svn-0.4.0.orig/debian/control
+++ lua-svn-0.4.0/debian/control
@@ -0,0 +1,27 @@
+Source: lua-svn
+Section: interpreters
+Priority: optional
+Maintainer: Enrico Tassi <gareuselesinge@debian.org>
+Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5), dpatch, lua5.1-policy-dev (>= 26), libsvn-dev, shake, libsasl2-dev, libneon27-gnutls-dev, libserf-0-0-dev
+Standards-Version: 3.8.3
+Vcs-Svn: svn://svn.debian.org/pkg-lua/packages/lua-svn
+Vcs-Browser: http://svn.debian.org/viewsvn/pkg-lua/packages/lua-svn
+Homepage: http://luaforge.net/projects/luasvn/
+
+Package: liblua5.1-svn1
+Architecture: any
+Conflicts: liblua5.1-svn0
+Replaces: liblua5.1-svn0
+Depends: ${shlibs:Depends}, liblua5.1-expat0, liblua5.1-socket2
+Description: Subversion library for the Lua language version 5.1
+ This package contains a Lua module to interact with a Subversion repository
+
+Package: liblua5.1-svn-dev
+Architecture: any
+Section: libdevel
+Depends: liblua5.1-svn1 (= ${binary:Version})
+Description: Development files for the Subversion library for the Lua language version 5.1
+ This package contains the development files of the Subversion lua5.1 bindings,
+ useful to create a statically linked binary (like a C application or a
+ standalone Lua interpreter).
+ Documentation is also shipped within this package.
--- lua-svn-0.4.0.orig/debian/patches/test.dpatch
+++ lua-svn-0.4.0/debian/patches/test.dpatch
@@ -0,0 +1,56 @@
+#! /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: test file to be run after compilation
+
+@DPATCH@
+diff -urNad trunk~/test.lua trunk/test.lua
+--- trunk~/test.lua 1970-01-01 01:00:00.000000000 +0100
++++ trunk/test.lua 2007-10-01 21:12:19.000000000 +0200
+@@ -0,0 +1,45 @@
++svn = require "svn"
++
++repo_path = "test_repo"
++repo_url = "file://"..os.getenv("PWD").."/test_repo"
++test_path = "test"
++file_name = "test.file"
++dir_name = "trunk"
++
++dir = test_path.."/"..dir_name
++file = dir .. "/" .. file_name
++contents = { "content1", "content2" }
++rev2content = {}
++
++svn.repos_create(repo_path)
++assert(svn.checkout(repo_url, test_path), "unable to checkout")
++svn.mkdir(dir)
++f = io.open(file,"w")
++f:write(contents[1])
++f:close()
++svn.add(file)
++t = svn.status(file)
++assert(string.sub(t[file],1,1) == "A", "file not correctly added: "..t[file])
++r1 = svn.commit(test_path)
++rev2content[r1] = contents[1]
++f = io.open(file,"w")
++f:write(contents[2])
++f:close()
++t = svn.status(file)
++assert(string.sub(t[file],1,1) == "M", "file not listed as modified")
++r2 = svn.commit(file)
++rev2content[r2]=contents[2]
++t = svn.list(repo_url)
++for k in pairs(t) do
++ print(k)
++end
++h = svn.log (file)
++for rev, v in pairs(h) do
++ assert(svn.cat(file, rev) == rev2content[rev])
++ print(rev)
++ for k,v in pairs(v) do
++ print(k,v)
++ end
++end
++svn.cleanup(test_path)
++svn.repos_delete(repo_path)
--- lua-svn-0.4.0.orig/debian/patches/00dpatch.conf
+++ lua-svn-0.4.0/debian/patches/00dpatch.conf
@@ -0,0 +1,2 @@
+conf_debianonly=1
+conf_origtargzpath=../tarballs/
--- lua-svn-0.4.0.orig/debian/patches/apr.dpatch
+++ lua-svn-0.4.0/debian/patches/apr.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## apr.dpatch by Enrico Tassi <gareuselesinge@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad trunk~/src/luasvn.c trunk/src/luasvn.c
+--- trunk~/src/luasvn.c 2008-03-14 20:46:17.000000000 +0100
++++ trunk/src/luasvn.c 2009-07-21 15:05:04.000000000 +0200
+@@ -9,6 +9,8 @@
+ #include <svn_subst.h>
+ #include <svn_time.h>
+
++#include <apr_xlate.h>
++
+ #include <lua.h>
+ #include <lauxlib.h>
+ #include <lualib.h>
--- lua-svn-0.4.0.orig/debian/patches/svn-utf8.dpatch
+++ lua-svn-0.4.0/debian/patches/svn-utf8.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## svn-utf8.dpatch by Enrico Tassi <gareuselesinge@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad trunk~/src/luasvn.c trunk/src/luasvn.c
+--- trunk~/src/luasvn.c 2008-03-14 20:46:17.000000000 +0100
++++ trunk/src/luasvn.c 2009-07-22 10:54:25.000000000 +0200
+@@ -8,6 +8,7 @@
+ #include <svn_cmdline.h>
+ #include <svn_subst.h>
+ #include <svn_time.h>
++#include <svn_utf.h>
+
+ #include <lua.h>
+ #include <lauxlib.h>
--- lua-svn-0.4.0.orig/debian/patches/00list
+++ lua-svn-0.4.0/debian/patches/00list
@@ -0,0 +1,3 @@
+test.dpatch
+apr.dpatch
+svn-utf8.dpatch