--- segment-1.3.5~svn57+dfsg.orig/debian/rules
+++ segment-1.3.5~svn57+dfsg/debian/rules
@@ -0,0 +1,27 @@
+#!/usr/bin/make -f
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/patchsys-quilt.mk
+include /usr/share/cdbs/1/class/ant.mk
+
+JAVA_HOME := /usr/lib/jvm/default-java
+DEB_JARS := commons-cli commons-logging junit4
+DEB_ANT_BUILD_TARGET := jardist
+DEB_INSTALL_CHANGELOGS_ALL := doc/history.html
+DEB_INSTALL_DOCS_ALL := doc/readme.html
+
+VER := $(shell echo $(DEB_UPSTREAM_VERSION) | awk -F'~' '{print $$1}')
+SVN_REV := $(shell echo $(DEB_UPSTREAM_VERSION) | awk -F'~' '{print $$2}' | sed 's/^svn//' | sed 's/\+dfsg.*//')
+
+install/libsegment-java::
+	install -m 644 -D build/dist/segment-$(VER).jar \
+		$(CURDIR)/debian/$(cdbs_curpkg)/usr/share/java/segment-$(VER).jar
+	dh_link -p$(cdbs_curpkg) usr/share/java/segment-$(VER).jar \
+		usr/share/java/segment.jar
+
+get-orig-source:
+	svn export https://segment.svn.sourceforge.net/svnroot/segment/trunk/segment \
+		-r $(SVN_REV) $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION) && \
+	rm -rf $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION)/lib && \
+	GZIP=--best tar czf $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz \
+		$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION) && \
+	rm -rf $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION) 
--- segment-1.3.5~svn57+dfsg.orig/debian/compat
+++ segment-1.3.5~svn57+dfsg/debian/compat
@@ -0,0 +1 @@
+5
--- segment-1.3.5~svn57+dfsg.orig/debian/control
+++ segment-1.3.5~svn57+dfsg/debian/control
@@ -0,0 +1,18 @@
+Source: segment
+Section: java
+Priority: optional
+Maintainer: Rail Aliev <rail@i-rs.ru>
+Build-Depends: cdbs, debhelper (>= 5), ant, quilt
+Build-Depends-Indep: default-jdk, libcommons-cli-java, libcommons-logging-java, junit4
+Standards-Version: 3.8.3
+Vcs-Bzr: http://bzr.debian.org/users/rail-guest/segment/
+Vcs-Browser: http://bzr.debian.org/loggerhead/users/rail-guest/segment
+Homepage: http://segment.sourceforge.net/
+
+Package: libsegment-java
+Architecture: all
+Depends: ${misc:Depends}
+Description: Rule based text splitting library
+ Segment library is used to split text into segments, for example sentences.
+ Splitting rules are read from SRX file, which is standard format for this
+ task.
--- segment-1.3.5~svn57+dfsg.orig/debian/README.source
+++ segment-1.3.5~svn57+dfsg/debian/README.source
@@ -0,0 +1,2 @@
+This package uses quilt to manage all modifications to the upstream
+source. See /usr/share/doc/quilt/README.source for details.
--- segment-1.3.5~svn57+dfsg.orig/debian/changelog
+++ segment-1.3.5~svn57+dfsg/debian/changelog
@@ -0,0 +1,47 @@
+segment (1.3.5~svn57+dfsg-1.9.201411020658) ucs4-0-0-0; urgency=low
+
+  * UCS auto build. The following patches have been applied to the original source package
+    0001-bump-version-for-ucs400
+
+ -- Univention builddaemon <buildd@univention.de>  Sun, 02 Nov 2014 06:58:52 +0100
+
+segment (1.3.5~svn57+dfsg-1) unstable; urgency=low
+
+  * Bump version, otherwise the build stamp in UCS 3.2 is higher than the 4.0
+    build (Bug #35387)
+
+ -- Sönke Schwardt-Krummrich <schwardt@univention.de>  Fri, 30 Oct 2014 14:43:23 +0200
+
+segment (1.3.5~svn57+dfsg-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * debian/rules,control
+    - switch to default-jdk (Closes: #642792)
+
+ -- Hideki Yamane <henrich@debian.org>  Tue, 24 Jan 2012 03:33:44 +0900
+
+segment (1.3.5~svn57+dfsg-1) unstable; urgency=low
+
+  * New upstream version
+
+ -- Rail Aliev <rail@i-rs.ru>  Tue, 17 Nov 2009 09:41:39 +0300
+
+segment (1.2.2~svn58+dfsg-1) unstable; urgency=low
+
+  * New upstream version.
+  * Repack the upstream tarball.
+    - debian/rules:
+      - Don't remove XML schema needed by the library.
+  * debian/copyright:
+    - Use DEP 5 format.
+  * debian/patches/build.xml.diff:
+    - Prevent modification of build.number file by removing <buildnumber/>.
+  * Bump standards version. No changes needed.
+
+ -- Rail Aliev <rail@i-rs.ru>  Sun, 30 Aug 2009 18:59:33 +0400
+
+segment (1.2.2~svn44+dfsg-1) unstable; urgency=low
+
+  * Initial release. (Closes: #534048)
+
+ -- Rail Aliev <rail@i-rs.ru>  Wed, 26 Aug 2009 08:29:16 +0400
--- segment-1.3.5~svn57+dfsg.orig/debian/copyright
+++ segment-1.3.5~svn57+dfsg/debian/copyright
@@ -0,0 +1,51 @@
+Name: segment
+Maintainer: Jarek Lipski <loomchild@rootnode.net>
+Source: http://segment.sourceforge.net/
+
+Files: *
+Copyright: 2009 Jarek Lipski
+License: MIT
+ 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.
+
+Files: res/net/sourceforge/segment/res/xml/srx*.xsd
+Copyright: 2006-2008 The Localization Industry Standards Association [LISA]
+License: MIT
+ This document and translations of it may be copied and furnished to others, 
+ and derivative works that comment on or otherwise explain it or assist in 
+ its implementation may be prepared, copied, published and distributed, 
+ in whole or in part, without restriction of any kind, provided that 
+ the above copyright notice and this paragraph are included on all such copies 
+ and derivative works. However, this document itself may not be modified 
+ in any way, such as by removing the copyright notice or references to LISA.
+
+ The limited permissions granted above are perpetual and will not be revoked 
+ by LISA or its successors or assigns.
+
+ This document and the information contained herein is provided on an "AS IS" 
+ basis and LISA DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT 
+ NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT 
+ INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS 
+ FOR A PARTICULAR PURPOSE. 
+
+Files: debian/*
+Copyright: 2009, Rail Aliev <rail@i-rs.ru>
+License: GPL-3+
+ On Debian systems the full text of the GNU General Public
+ License can be found in the `/usr/share/common-licenses/GPL-3'
+ file.
--- segment-1.3.5~svn57+dfsg.orig/debian/patches/series
+++ segment-1.3.5~svn57+dfsg/debian/patches/series
@@ -0,0 +1,2 @@
+build.xml.diff
+junit4.diff
--- segment-1.3.5~svn57+dfsg.orig/debian/patches/build.xml.diff
+++ segment-1.3.5~svn57+dfsg/debian/patches/build.xml.diff
@@ -0,0 +1,36 @@
+# Description: Debian specific build changes 
+Index: segment-1.2.2~svn44+dfsg+1/build.xml
+===================================================================
+--- segment-1.2.2~svn44+dfsg+1.orig/build.xml	2009-05-27 15:42:20.000000000 -0400
++++ segment-1.2.2~svn44+dfsg+1/build.xml	2009-08-30 10:36:49.000000000 -0400
+@@ -14,7 +14,6 @@
+ 		<pathelement path="${java.class.path}"/>
+ 		<pathelement location="build/classes"/>
+ 		<pathelement location="res"/>
+-		<fileset dir="lib" includes="**/*.jar" />
+ 	</path>
+ 
+ 	<filterset id="filter.version">
+@@ -50,7 +49,6 @@
+ 
+ 	
+ 	<target name="jardist" depends="compile" description="generate binary jar archive">
+-		<buildnumber/>
+ 		<mkdir dir="build/dist"/>
+ 		<delete file="build/dist/${project.name}-*.jar" failonerror="false"/>
+ 		<jar destfile="build/dist/${project.fullname}.jar">
+@@ -76,7 +74,6 @@
+ 
+ 		<copy todir="build/dist/${project.fullname}">
+ 			<fileset dir=".">
+-				<include name="lib/**"/>
+ 				<include name="bin/**"/>
+ 				<include name="example/**"/>
+ 			</fileset>
+@@ -137,4 +134,4 @@
+ 	</target>
+ 
+ 	
+-</project>
+\ No newline at end of file
++</project>
--- segment-1.3.5~svn57+dfsg.orig/debian/patches/junit4.diff
+++ segment-1.3.5~svn57+dfsg/debian/patches/junit4.diff
@@ -0,0 +1,23 @@
+# Description: org.junit.internal.runners.TextListener is dropped in current
+# JUnit version 
+--- a/src/net/sourceforge/segment/ui/console/Segment.java
++++ b/src/net/sourceforge/segment/ui/console/Segment.java
+@@ -38,8 +38,6 @@
+ import org.apache.commons.cli.Options;
+ import org.apache.commons.cli.ParseException;
+ import org.apache.commons.cli.PosixParser;
+-import org.junit.internal.runners.TextListener;
+-import org.junit.runner.JUnitCore;
+ 
+ 
+ /**
+@@ -114,9 +112,6 @@
+ 	}
+ 	
+ 	private void test() {
+-        JUnitCore core = new JUnitCore();
+-        core.addListener(new TextListener());
+-        core.run(SegmentTestSuite.class);
+ 	}
+ 	
+ 	private void segment(CommandLine commandLine) throws IOException {
