--- libjboss-xnio-base-java-1.2.1.GA.orig/debian/copyright
+++ libjboss-xnio-base-java-1.2.1.GA/debian/copyright
@@ -0,0 +1,17 @@
+Format-Specification: http://dep.debian.net/deps/dep5/
+Name: JBoss XNIO
+Maintainer: David M. Lloyd
+Source: http://jboss.org/xnio/
+
+Files: *
+Copyright: 2008, JBoss Inc.
+License: LGPL-2.1+
+
+Files: debian/*
+Copyright: 2009, Torsten Werner <twerner@debian.org>
+License: LGPL-2.1+
+
+License: LGPL-2.1+
+ On Debian GNU/Linux system you can find the complete text of the
+ license in '/usr/share/common-licenses/LGPL-2.1'
+
--- libjboss-xnio-base-java-1.2.1.GA.orig/debian/rules
+++ libjboss-xnio-base-java-1.2.1.GA/debian/rules
@@ -0,0 +1,26 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/ant.mk
+
+PACKAGE              := jboss-xnio-base
+VERSION              := $(DEB_UPSTREAM_VERSION)
+JAVA_HOME            := /usr/lib/jvm/default-java
+DEB_ANT_BUILD_TARGET := package javadoc
+DEB_ANT_BUILDFILE    := debian/build.xml
+
+get-orig-source:
+	uscan --download-version $(VERSION) --force-download --rename
+
+clean::
+	$(RM) *.jar
+
+binary-post-install/lib$(PACKAGE)-java::
+	jar cf xnio-api-$(VERSION).jar -C logging-jdk/classes .
+	jar uf xnio-api-$(VERSION).jar -C api/classes .
+	jar cf xnio-nio-$(VERSION).jar -C nio-impl/classes .
+	dh_install xnio-api-$(VERSION).jar /usr/share/java/
+	dh_install xnio-nio-$(VERSION).jar /usr/share/java/
+	dh_link /usr/share/java/xnio-api-$(VERSION).jar /usr/share/java/xnio-api.jar 
+	dh_link /usr/share/java/xnio-nio-$(VERSION).jar /usr/share/java/xnio-nio.jar 
+
--- libjboss-xnio-base-java-1.2.1.GA.orig/debian/orig-tar.sh
+++ libjboss-xnio-base-java-1.2.1.GA/debian/orig-tar.sh
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+
+TAR=../libjboss-xnio-base-java_$2.orig.tar.gz
+DIR=jboss-xnio-base-$2
+TAG=$2
+
+svn export http://anonsvn.jboss.org/repos/xnio/xnio-base/tags/$TAG $DIR
+tar -c -z -f $TAR $DIR
+rm -rf $DIR ../$TAG
+
+# move to directory 'tarballs'
+if [ -r .svn/deb-layout ]; then
+  . .svn/deb-layout
+  mv $TAR $origDir
+  echo "moved $TAR to $origDir"
+fi
+
--- libjboss-xnio-base-java-1.2.1.GA.orig/debian/changelog
+++ libjboss-xnio-base-java-1.2.1.GA/debian/changelog
@@ -0,0 +1,5 @@
+libjboss-xnio-base-java (1.2.1.GA-1) unstable; urgency=low
+
+  * Initial release. (Closes: #546769)
+
+ -- Torsten Werner <twerner@debian.org>  Tue, 15 Sep 2009 22:20:55 +0200
--- libjboss-xnio-base-java-1.2.1.GA.orig/debian/doc-base
+++ libjboss-xnio-base-java-1.2.1.GA/debian/doc-base
@@ -0,0 +1,9 @@
+Document: libjboss-xnio-java
+Title: API Javadoc for JBoss XNIO
+Author: David M. Lloyd
+Abstract: This is the API Javadoc provided by the JBoss XNIO library.
+Section: Programming
+
+Format: HTML
+Index: /usr/share/doc/libjboss-xnio-base-java/api/index.html
+Files: /usr/share/doc/libjboss-xnio-base-java/api/*
--- libjboss-xnio-base-java-1.2.1.GA.orig/debian/watch
+++ libjboss-xnio-base-java-1.2.1.GA/debian/watch
@@ -0,0 +1,3 @@
+version=3
+http://anonsvn.jboss.org/repos/xnio/xnio-base/tags/ (\d.*)/ \
+  debian debian/orig-tar.sh
--- libjboss-xnio-base-java-1.2.1.GA.orig/debian/build.xml
+++ libjboss-xnio-base-java-1.2.1.GA/debian/build.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+
+<project name="pkg-java" default="package" basedir="..">
+
+    <property file="debian/build.properties"/>
+
+    <macrodef name="cleanmodule">
+	<attribute name="dir"/>
+	<sequential>
+	    <delete dir="@{dir}/classes"/>
+	</sequential>
+    </macrodef>
+
+    <macrodef name="buildmodule">
+        <attribute name="dir"/>
+	<sequential>
+	    <mkdir dir="@{dir}/classes"/>
+	    <javac srcdir="@{dir}/src/main/java" destdir="@{dir}/classes"
+		classpath="${classpath.compile}"/>
+	</sequential>
+    </macrodef>
+
+    <target name="clean">
+	<delete dir="build"/>
+        <cleanmodule dir="logging-jdk"/>
+        <cleanmodule dir="api"/>
+        <cleanmodule dir="nio-impl"/>
+    </target>
+
+    <target name="package">
+        <buildmodule dir="logging-jdk"/>
+        <buildmodule dir="api"/>
+        <buildmodule dir="nio-impl"/>
+    </target>
+
+    <target name="javadoc">
+        <javadoc destdir="${javadoc.dir}">
+            <packageset dir="logging-jdk/src/main/java/"/>
+            <packageset dir="api/src/main/java/"/>
+            <packageset dir="nio-impl/src/main/java/"/>
+        </javadoc>
+    </target>
+
+</project>
--- libjboss-xnio-base-java-1.2.1.GA.orig/debian/control
+++ libjboss-xnio-base-java-1.2.1.GA/debian/control
@@ -0,0 +1,24 @@
+Source: libjboss-xnio-base-java
+Section: java
+Priority: optional
+Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
+Uploaders: Torsten Werner <twerner@debian.org>
+Build-Depends-Indep: maven-ant-helper (>> 4)
+Build-Depends: ant, debhelper (>= 5), cdbs, default-jdk
+Standards-Version: 3.8.3
+Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/libjboss-xnio-base-java
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/libjboss-xnio-base-java/
+Homepage: http://jboss.org/xnio/
+
+Package: libjboss-xnio-base-java
+Architecture: all
+Depends: ${misc:Depends}, default-jre-headless | java5-runtime-headless
+Description: simplified low-level I/O layer
+ XNIO is a simplified low-level I/O layer which can be used anywhere you are
+ using NIO today. It frees you from the hassle of dealing with Selectors and
+ the lack of NIO support for multicast sockets and non-socket I/O such as
+ serial ports, while still maintaining all the capabilities present in NIO.
+ Also, XNIO vastly simplifies implementation of channels, opening the door to
+ supporting higher-level transport concepts (like SSL or virtual channels) with
+ the same simple API.
+
--- libjboss-xnio-base-java-1.2.1.GA.orig/debian/compat
+++ libjboss-xnio-base-java-1.2.1.GA/debian/compat
@@ -0,0 +1 @@
+5
--- libjboss-xnio-base-java-1.2.1.GA.orig/debian/build.properties
+++ libjboss-xnio-base-java-1.2.1.GA/debian/build.properties
@@ -0,0 +1,4 @@
+javadoc.dir       = build/api
+classpath.compile = \
+    ${basedir}/logging-jdk/classes/: \
+    ${basedir}/api/classes/
--- libjboss-xnio-base-java-1.2.1.GA.orig/debian/docs
+++ libjboss-xnio-base-java-1.2.1.GA/debian/docs
@@ -0,0 +1 @@
+build/api
