--- mysql-connector-java-5.1.10+dfsg.orig/debian/rules
+++ mysql-connector-java-5.1.10+dfsg/debian/rules
@@ -0,0 +1,23 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/ant.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
+
+VERSION := $(shell dpkg-parsechangelog | grep ^Version: | sed 's/Version: //' | cut -f1 -d- | cut -f1 -d+)
+
+JAVA_HOME := /usr/lib/jvm/java-gcj
+JAVA6_HOME := /usr/lib/jvm/java-6-openjdk
+
+DEB_JARS := ant ant-launcher ant-junit commons-logging log4j-1.2 junit ant-contrib
+DEB_ANT_ARGS := -Dcom.mysql.jdbc.java6.javac=$(JAVA6_HOME)/bin/javac -Dcom.mysql.jdbc.java6.rtjar=$(JAVA6_HOME)/jre/lib/rt.jar
+
+install/libmysql-java::
+	install -D -m 644 build/mysql-connector-java-$(VERSION)/mysql-connector-java-$(VERSION)-bin.jar debian/libmysql-java/usr/share/java/mysql-connector-java-$(VERSION).jar
+	dh_link -plibmysql-java usr/share/java/mysql-connector-java-$(VERSION).jar usr/share/java/mysql-connector-java.jar
+	dh_link -plibmysql-java usr/share/java/mysql-connector-java-$(VERSION).jar usr/share/java/mysql-$(VERSION).jar
+	dh_link -plibmysql-java usr/share/java/mysql-$(VERSION).jar usr/share/java/mysql.jar
+
+clean::
+	rm -rf dist
+	rm -f build-stamp
--- mysql-connector-java-5.1.10+dfsg.orig/debian/orig-tar.sh
+++ mysql-connector-java-5.1.10+dfsg/debian/orig-tar.sh
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+
+# called by uscan with '--upstream-version' <version> <file>
+DIR=mysql-connector-java-$2.orig
+
+# clean up the upstream tarball
+tar zxf $3
+mv mysql-connector-java-$2 $DIR
+GZIP=--best tar czf $3 -X debian/orig-tar.exclude $DIR
+rm -rf $DIR
+
+# move to directory 'tarballs'
+if [ -r .svn/deb-layout ]; then
+	. .svn/deb-layout
+	mv $3 $origDir
+	echo "moved $3 to $origDir"
+fi
+
+exit 0
--- mysql-connector-java-5.1.10+dfsg.orig/debian/orig-tar.exclude
+++ mysql-connector-java-5.1.10+dfsg/debian/orig-tar.exclude
@@ -0,0 +1,2 @@
+mysql-connector-java-*-bin.jar
+src/lib/*.jar
--- mysql-connector-java-5.1.10+dfsg.orig/debian/README.Debian-source
+++ mysql-connector-java-5.1.10+dfsg/debian/README.Debian-source
@@ -0,0 +1,11 @@
+MySQL Connector/J for Debian
+----------------------------
+
+The upstream sources were modified to comply with the Debian Free
+Software Guidelines. The following changes were made:
+
+ * The third-party jars in `src/lib' were removed.
+ * The two pre-compiled JDBC driver jars (debug and release version)
+   were removed.
+
+ -- Marcus Better <marcus@better.se>  Fri, 22 Dec 2006 10:45:42 +0100
--- mysql-connector-java-5.1.10+dfsg.orig/debian/control
+++ mysql-connector-java-5.1.10+dfsg/debian/control
@@ -0,0 +1,21 @@
+Source: mysql-connector-java
+Section: java
+Priority: optional
+Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
+Uploaders: Arnaud Vandyck <avdyk@debian.org>, Marcus Better <marcus@better.se>, Michael Koch <konqueror@gmx.de>
+Build-Depends: debhelper (>= 7), cdbs, ant, java-gcj-compat-dev, ant-optional
+Build-Depends-Indep: openjdk-6-jdk, liblog4j1.2-java, libcommons-logging-java, junit, ant-contrib
+Standards-Version: 3.8.3
+Homepage: http://www.mysql.com/products/connector/j/
+Vcs-Svn: svn://svn.debian.org/pkg-java/trunk/mysql-connector-java
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/mysql-connector-java/
+
+Package: libmysql-java
+Architecture: all
+Depends: default-jre-headless | java2-runtime-headless, ${misc:Depends}
+Suggests: liblog4j1.2-java, libcommons-logging-java
+Description: Java database (JDBC) driver for MySQL
+ MySQL Connector/J is a JDBC-3.0 Type 4 driver, which means that it is
+ pure Java, implements version 3.0 of the JDBC specification, and
+ communicates directly with the MySQL server using the MySQL
+ protocol.
--- mysql-connector-java-5.1.10+dfsg.orig/debian/compat
+++ mysql-connector-java-5.1.10+dfsg/debian/compat
@@ -0,0 +1 @@
+5
--- mysql-connector-java-5.1.10+dfsg.orig/debian/changelog
+++ mysql-connector-java-5.1.10+dfsg/debian/changelog
@@ -0,0 +1,154 @@
+mysql-connector-java (5.1.10+dfsg-2) unstable; urgency=low
+
+  * Fix installation of versioned jar (Closes: #549677).
+
+ -- Michael Koch <konqueror@gmx.de>  Mon, 05 Oct 2009 20:18:40 +0200
+
+mysql-connector-java (5.1.10+dfsg-1) unstable; urgency=low
+
+  * New upstream release.
+  * Build-Depends on cdbs.
+  * Made java-gcj-compat-dev a Build-Depends instead of
+    a Build-Depends-Indep.
+  * Build-Depends-Indep on openjdk-6-jdk for JDBC 4.
+  * Build-Depends on debhelper >= 7.
+  * Moved package to section 'java'.
+  * Let package Depends on default-jre-headless and alternatives.
+  * Add Depends ${misc:Depends} to libmysql-java.
+  * Fixed watch file to use a decent FTP mirror.
+  * Added automatic orig tarball creation on upstream updates.
+  * Updated Standards-Version to 3.8.3.
+  * In debian/rules always use JAVA_HOME when possible.
+
+ -- Michael Koch <konqueror@gmx.de>  Sat, 26 Sep 2009 11:22:43 +0200
+
+mysql-connector-java (5.1.6+dfsg-1) unstable; urgency=low
+
+  * New upstream release. Thanks to Eric Jensen for the hint.
+  * Added watch file.
+  * Updated Standards-Version to 3.7.3.
+  * Fixed Homepage, Vcs-Svn and Vcs-Browser fields.
+
+ -- Michael Koch <konqueror@gmx.de>  Wed, 02 Apr 2008 10:36:05 +0200
+
+mysql-connector-java (5.1.5+dfsg-2) unstable; urgency=low
+
+  * Disable JDBC4 support. Closes: #454081.
+
+ -- Michael Koch <konqueror@gmx.de>  Tue, 04 Dec 2007 01:03:48 +0100
+
+mysql-connector-java (5.1.5+dfsg-1) unstable; urgency=low
+
+  * New upstream release. Closes: #450718.
+  * Add Homepage field to debian/control.
+
+ -- Michael Koch <konqueror@gmx.de>  Fri, 30 Nov 2007 10:34:13 +0100
+
+mysql-connector-java (5.0.4+dfsg-3) unstable; urgency=low
+
+  * Delete build-stamp in clean target. Closes: #424589.
+  * Removed Wolfgang and added myself to Uploaders.
+
+ -- Michael Koch <konqueror@gmx.de>  Sun, 15 Jul 2007 23:12:02 +0200
+
+mysql-connector-java (5.0.4+dfsg-2) unstable; urgency=low
+
+  * Corrected the symlink `/usr/share/java/mysql.jar'. Thanks to Javier
+    Kohen. (Closes: #404858)
+
+ -- Marcus Better <marcus@better.se>  Fri, 29 Dec 2006 13:29:04 +0100
+
+mysql-connector-java (5.0.4+dfsg-1) unstable; urgency=low
+
+  * New upstream release. (Closes: #404153, #366808, #394878)
+    - Supports MySQL 5. (Closes: #369379)
+    - Fixes a character set mapping problem. (Closes: #387382)
+  * debian/rules: Get rid of cdbs. Install `CHANGES' file in proper place.
+  * The jar file is now named `mysql-connector-java.jar' instead of
+    `mysql.jar'. Symlinks are provided for the old names for the time
+    being.
+  * debian/control:
+    - Replace Build-Depends-Indep by Build-Depends.
+    - Add missing dependency on ant-optional.
+    - Add XS-Vcs-* fields.
+  * debian/rules: Build with java-gcj-compat-dev instead of Kaffe.
+  * Removed README.Debian since the information on supported JDK versions
+    may be outdated.
+
+ -- Marcus Better <marcus@better.se>  Fri, 22 Dec 2006 10:45:42 +0100
+
+mysql-connector-java (3.1.11-1) unstable; urgency=low
+
+  * New upstream release (closes: #338399)
+  * Removed Takashi from uploaders
+  * Removed setting of DEB_ANT_COMPILER variable as already preset in kaffe
+  * Updated build.xml patch once more to changed upstream build behaviour
+
+ -- Wolfgang Baer <WBaer@gmx.de>  Tue, 29 Nov 2005 14:07:49 +0100
+
+mysql-connector-java (3.1.10-1) unstable; urgency=low
+
+  * New upstream release
+    + Source structure changed - adapting package build to new structure
+    + Updated README.Debian-source how its repackaged
+  * libant1.6-java to ant transition
+  * Standards-Version 3.6.2 (no changes)
+  * Removed documentation as its explicitly marked as NOT GNU licensed.
+
+  * Upload sponsored by Arnaud Vandyck
+
+ -- Wolfgang Baer <WBaer@gmx.de>  Sun, 11 Sep 2005 15:35:23 +0200
+
+mysql-connector-java (3.1.7-2) unstable; urgency=low
+
+  * Move to main
+
+ -- Wolfgang Baer <WBaer@gmx.de>  Tue, 19 Apr 2005 20:28:25 +0200
+
+mysql-connector-java (3.1.7-1) unstable; urgency=low
+
+  * New upstream release (closes: #282570,#293995)
+  * Now implements JDBC 3 specification - Updated README.Debian/Descriptions
+  * Built with free tools - but stay in contrib to get it into
+    sarge asap (old release does not support mysql 4.1 features)
+    Upload to main will follow afterwards
+  * Changed build system to cdbs: build depends now on kaffe, libant1.6-java, 
+    liblog4j1.2-java, junit; Added liblog4j1.2-java as Suggests
+  * No more build depends on jars under /usr/local (closes: #262291)
+  * Patched build.xml (01_BuildXml.patch):
+    - Changed build directory property to a directory inside source tree
+    - Excluded test from testsuite which build depends on 
+      sun internal stuff (AppletRegressionTest.java)
+    - Patched javac target to use target=1.3 so it is also usable with 
+      JDK 1.3, -Xverify:none needs to be passed to the vm (see README.Debian)
+  * Standards-Version: 3.6.1 - no changes required
+  * Changed maintainer to Debian Java Maintainers as
+    requested by Takashi Okamoto for comaintaining
+  * avdyk: added Wolfgang and myself to the uploaders
+
+ -- Wolfgang Baer <WBaer@gmx.de>  Sat, 02 Apr 2005 20:30:09 +0200
+
+mysql-connector-java (3.0.9-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Takashi Okamoto <tora@debian.org>  Tue, 30 Dec 2003 22:37:53 +0900
+
+mysql-connector-java (3.0.8-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Takashi Okamoto <tora@debian.org>  Mon, 26 May 2003 10:42:20 +0900
+
+mysql-connector-java (3.0.6-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Takashi Okamoto <tora@debian.org>  Sun, 23 Feb 2003 21:38:54 +0900
+
+mysql-connector-java (2.0.14-1) unstable; urgency=low
+
+  * Initial Release.
+  * close RFP (closes: #104765)
+
+ -- Takashi Okamoto <tora@debian.org>  Sun, 10 Nov 2002 10:29:30 +0900
--- mysql-connector-java-5.1.10+dfsg.orig/debian/README.Debian
+++ mysql-connector-java-5.1.10+dfsg/debian/README.Debian
@@ -0,0 +1,7 @@
+MySQL Connector/J for Debian
+----------------------------
+
+In this version the JDBC 4 support is disabled because we have no runtime
+in main currently that can compile it.
+
+ -- Michael Koch <konqueror@gmx.de>  Fri, 30 Nov 2007 10:34:13 +0100
--- mysql-connector-java-5.1.10+dfsg.orig/debian/watch
+++ mysql-connector-java-5.1.10+dfsg/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts=dversionmangle=s/\+dfsg.*// \
+ftp://ftp.gwdg.de/pub/misc/mysql/Downloads/Connector-J/mysql-connector-java-(.*)\.tar\.gz debian debian/orig-tar.sh
--- mysql-connector-java-5.1.10+dfsg.orig/debian/docs
+++ mysql-connector-java-5.1.10+dfsg/debian/docs
@@ -0,0 +1 @@
+EXCEPTIONS-CONNECTOR-J
--- mysql-connector-java-5.1.10+dfsg.orig/debian/copyright
+++ mysql-connector-java-5.1.10+dfsg/debian/copyright
@@ -0,0 +1,35 @@
+This package was debianized by Takashi Okamoto <tora@debian.org> on
+Sat,  2 Nov 2002 22:04:45 +0900.
+
+It is currently maintained by the Debian Java Maintainers
+<pkg-java-maintainers@lists.alioth.debian.org>.
+
+It was downloaded from <http://www.mysql.com/products/connector/j/>.
+
+Upstream Author: Mark Matthews 
+
+Copyright (C) 2002-2005 MySQL AB.
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of version 2 of the GNU General Public License
+    as published by the Free Software Foundation.
+
+    There are special exceptions to the terms and conditions of the GPL 
+    as it is applied to this software. View the full text of the 
+    exception in file EXCEPTIONS-CONNECTOR-J in this directory.
+
+    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 the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+On Debian systems, the complete text of the GNU General Public License
+version 2 can be found in `/usr/share/common-licenses/GPL-2'.
+
+The contributions to the Debian packaging by Marcus Better are
+Copyright (C) 2006 Marcus Better <marcus@better.se>, and are licensed
+under the GNU General Public License version 2.
--- mysql-connector-java-5.1.10+dfsg.orig/debian/patches/disable-tests.patch
+++ mysql-connector-java-5.1.10+dfsg/debian/patches/disable-tests.patch
@@ -0,0 +1,11 @@
+--- mysql-connector-java-5.1.10+dfsg.orig/build.xml
++++ mysql-connector-java-5.1.10+dfsg/build.xml
+@@ -770,7 +770,7 @@
+ 	</target>
+ 
+ 
+-	<target name="compile" depends="init, compile-driver, compile-testsuite, compile.integration">
++	<target name="compile" depends="init, compile-driver, compile.integration">
+ 	</target>
+ 
+ 	<target name="compile-trace" depends="init, compile-driver-trace">
