[txw2] 02/02: update packaging for new version, take 1

Timo Aaltonen tjaalton-guest at moszumanska.debian.org
Mon Dec 16 15:54:31 UTC 2013


This is an automated email from the git hooks/post-receive script.

tjaalton-guest pushed a commit to branch master
in repository txw2.

commit d18560ea80bc484f0ba4298361bfefc24fb456a2
Author: Timo Aaltonen <tjaalton at ubuntu.com>
Date:   Mon Dec 16 17:54:21 2013 +0200

    update packaging for new version, take 1
---
 debian/README.source                       |  14 +--
 debian/changelog                           |   8 ++
 debian/control                             |  15 ++-
 debian/copyright                           |  38 +++++++-
 debian/libtxw2-java.poms                   |   1 -
 debian/patches/disable-txw2-compiler.patch |  53 -----------
 debian/patches/series                      |   3 +-
 debian/patches/txw2-20110809-args4j.patch  | 148 +++++++++++++++++++++++++++++
 debian/poms/txw2.pom                       |   6 --
 debian/rules                               |  16 +---
 debian/watch                               |   4 +
 11 files changed, 214 insertions(+), 92 deletions(-)

diff --git a/debian/README.source b/debian/README.source
index c0d7f10..5563eec 100644
--- a/debian/README.source
+++ b/debian/README.source
@@ -9,14 +9,8 @@ Notes about this package:
  - the upstream source is hard to find as its part of the jaxb RI sources:
     http://java.net/projects/jaxb/sources/version2/show/trunk/txw2     
  - the upstream source ships a number of libraries for the txw2 compiler;
-   these have been excluded from the orig.tar.gz and the part of the build
-   that compiles the compiler is patched out (its not that useful anyway).
- - upstream is currently refactoring to use a maven based build; once this 
-   is complete this package should be refreshed.
+   these have been excluded from the orig.tar.gz
 
-This package is built from a dated svn export using the following commands:
-
- svn export -r {2007-06-24} https://svn.java.net/svn/jaxb~version2/trunk/txw2
-
-The get-orig-source target in debian/rules will create the orig.tar.gz using
-this command.
+The get-orig-source target in debian/rules should create a clean orig.tar.gz,
+but the upstream repo is no longer available. Using the tarball from Fedora for
+now, included in pristie-tar git branch.
diff --git a/debian/changelog b/debian/changelog
index 6348e27..1880fa4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+txw2 (0.1+20110809-1) UNRELEASED; urgency=low
+
+  [ Ade Lee ]
+  * New upstream release.
+  * Use maven for the build.
+
+ -- Timo Aaltonen <tjaalton at ubuntu.com>  Mon, 16 Dec 2013 15:28:25 +0200
+
 txw2 (0.1+20070624-1) unstable; urgency=low
 
   * Initial release. (Closes: #628789)
diff --git a/debian/control b/debian/control
index cf361de..7735706 100644
--- a/debian/control
+++ b/debian/control
@@ -3,8 +3,16 @@ Section: java
 Priority: optional
 Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
 Uploaders: James Page <james.page at canonical.com>
-Build-Depends: ant, cdbs, debhelper (>= 7), default-jdk
-Build-Depends-Indep: default-jdk-doc, junit, maven-repo-helper
+Build-Depends: cdbs, debhelper (>= 7), default-jdk, maven-debian-helper (>= 1.5)
+Build-Depends-Indep: ant, default-jdk-doc, maven-repo-helper,
+ libargs4j-java (>= 1.0),
+ libcodemodel-java (>= 2.4),
+ libmaven-javadoc-plugin-java,
+ librelaxng-datatype-java (>= 1.0),
+ librngom-java,
+ libstax-java,
+ libxsom-java,
+ junit4,
 Standards-Version: 3.9.2
 Homepage: https://txw.dev.java.net/
 Vcs-Git: git://git.debian.org/git/pkg-java/txw2.git
@@ -12,7 +20,8 @@ Vcs-Browser: http://git.debian.org/?p=pkg-java/txw2.git
 
 Package: libtxw2-java
 Architecture: all
-Depends: ${misc:Depends}
+Depends: ${misc:Depends}, ${maven:Depends}
+Recommends: ${maven:OptionalDepends}
 Description: Typed XML Writer for Java
  A Java library that allows client applications to write arbitrary
  well-formed typed XML documents.
diff --git a/debian/copyright b/debian/copyright
index 8d6dca3..5f7b466 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,14 +1,15 @@
-Format-Specification: http://dep.debian.net/deps/dep5/
-Name: txw2: Typed XML Writer for Java
+Format-Specification: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: txw2: Typed XML Writer for Java
 Source: https://txw.dev.java.net/
 
 Files: *
-Copyright: 2010, Kohsuke Kawaguchi
-License: CDDL
+Copyright: 2010-2011, Kohsuke Kawaguchi
+License: CDDL or GPL-2 with classpath exception
 
 Files: debian/*
 Copyright: 2011, Canonical Ltd (http://www.canonical.com)
-License: CDDL
+           2013, Ade Lee <alee at redhat.com>
+License: CDDL or GPL-2 with classpath exception
 
 License: CDDL
   COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
@@ -391,3 +392,30 @@ License: CDDL
   distribute such responsibility on an equitable basis. Nothing
   herein is intended or shall be deemed to constitute any admission
   of liability.
+
+License: GPL-2 with classpath exception
+ "CLASSPATH" EXCEPTION TO THE GPL VERSION 2
+ .
+ Certain source files distributed by Oracle are subject to the following
+ clarification and special exception to the GPL Version 2, but only where
+ Oracle has expressly included in the particular source file's header the
+ words "Oracle designates this particular file as subject to the
+ "Classpath" exception as provided by Oracle in the License file that
+ accompanied this code."
+ .
+ Linking this library statically or dynamically with other modules is
+ making a combined work based on this library. Thus, the terms and
+ conditions of the GNU General Public License Version 2 cover the whole
+ combination.
+ .
+ As a special exception, the copyright holders of this library give you
+ permission to link this library with independent modules to produce an
+ executable, regardless of the license terms of these independent
+ modules, and to copy and distribute the resulting executable under terms
+ of your choice, provided that you also meet, for each linked independent
+ module, the terms and conditions of the license of that module. An
+ independent module is a module which is not derived from or based on
+ this library. If you modify this library, you may extend this exception
+ to your version of the library, but you are not obligated to do so. If
+ you do not wish to do so, delete this exception statement from your
+ version.
diff --git a/debian/libtxw2-java.poms b/debian/libtxw2-java.poms
deleted file mode 100644
index 96ff8fc..0000000
--- a/debian/libtxw2-java.poms
+++ /dev/null
@@ -1 +0,0 @@
-debian/poms/txw2.pom
diff --git a/debian/patches/disable-txw2-compiler.patch b/debian/patches/disable-txw2-compiler.patch
deleted file mode 100644
index 6433d69..0000000
--- a/debian/patches/disable-txw2-compiler.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Description: Disable compilation of txw2 compiler; can't fulfill
- dependencies at the moment through Debian and runtime is the part
- of the library that's critical path.
-Author: James Page <james.page at canonical.com>
-Forwarded: not-needed
-
-Index: txw2/build.xml
-===================================================================
---- txw2.orig/build.xml	2011-06-01 12:15:46.558045202 +0100
-+++ txw2/build.xml	2011-06-01 12:15:46.578045202 +0100
-@@ -33,13 +33,6 @@
-     	<classpath refid="runtime.lib"/>
-     </javac>
-     
--    <javac source="1.5" srcdir="src/compiler" destdir="build/compiler-classes" debug="on">
--    	<classpath refid="runtime.lib"/>
--    	<classpath>
--    		<pathelement path="build/runtime-classes"/>
--    		<fileset dir="lib" includes="compiler/*.jar"/>
--    	</classpath>
--    </javac>
-   </target>
-   
-   <target name="test" depends="compile">
-@@ -74,9 +67,6 @@
-     <zip destfile="build/txw2-src.zip">
-       <fileset dir="src/runtime" includes="**/*" defaultexcludes="no"/>
-     </zip>
--    <zip destfile="build/txw2c-src.zip">
--      <fileset dir="src/compiler" includes="**/*" defaultexcludes="no"/>
--    </zip>
-     <jar destfile="build/txw2.jar">
-       <manifest>
-         <attribute name="Date" value="${TODAY}"/>
-@@ -87,18 +77,6 @@
-       <fileset dir="build/runtime-classes" includes="**/*.class, **/*.properties"/>
-       <fileset dir="src" includes="**/*.properties"/>
-     </jar>
--    <jar destfile="build/txwc2.jar">
--      <manifest>
--        <attribute name="Date" value="${TODAY}"/>
--        <attribute name="Build-Id" value="${build.id}"/>
--        <attribute name="Class-Path" value="txw2.jar lib/relaxngDatatype.jar lib/rngom.jar lib/xsdlib.jar lib/commons-cli-1.0.jar"/>
--        <attribute name="Main-Class" value="com.sun.tools.txw2.Main"/>
--      </manifest>
--      <!--metainf dir="doc" includes="lib/*LICENSE.txt"/-->
--      
--      <fileset dir="build/compiler-classes" includes="**/*.class, **/*.properties"/>
--      <fileset dir="src" includes="**/*.properties"/>
--    </jar>
-   </target>
-   
-   <target name="dist" depends="clean, javadoc, jar">
diff --git a/debian/patches/series b/debian/patches/series
index 10c8401..4cc8841 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1 @@
-system-javadoc.patch
-disable-txw2-compiler.patch
+txw2-20110809-args4j.patch
diff --git a/debian/patches/txw2-20110809-args4j.patch b/debian/patches/txw2-20110809-args4j.patch
new file mode 100644
index 0000000..b54c1bb
--- /dev/null
+++ b/debian/patches/txw2-20110809-args4j.patch
@@ -0,0 +1,148 @@
+Description: Update to use the version of args4j available in the distribution
+
+diff -Naur txw2-20110809/compiler/src/main/java/com/sun/tools/txw2/Main.java txw2-20110809-work/compiler/src/main/java/com/sun/tools/txw2/Main.java
+--- txw2-20110809/compiler/src/main/java/com/sun/tools/txw2/Main.java	2011-03-29 02:59:19.000000000 -0400
++++ txw2-20110809-work/compiler/src/main/java/com/sun/tools/txw2/Main.java	2012-01-19 13:06:40.049998255 -0500
+@@ -43,10 +43,10 @@
+ import com.sun.codemodel.writer.FileCodeWriter;
+ import com.sun.codemodel.writer.SingleStreamCodeWriter;
+ import com.sun.tools.txw2.model.NodeSet;
++import org.kohsuke.args4j.Argument;
++import org.kohsuke.args4j.Option;
+ import org.kohsuke.args4j.CmdLineException;
+ import org.kohsuke.args4j.CmdLineParser;
+-import org.kohsuke.args4j.opts.BooleanOption;
+-import org.kohsuke.args4j.opts.StringOption;
+ import org.kohsuke.rngom.parse.IllegalSchemaException;
+ import org.kohsuke.rngom.parse.Parseable;
+ import org.kohsuke.rngom.parse.compact.CompactParseable;
+@@ -60,6 +60,8 @@
+ import java.io.IOException;
+ import java.net.MalformedURLException;
+ import java.util.Properties;
++import java.util.List;
++import java.util.ArrayList;
+ 
+ /**
+  * Programatic entry point to the TXW compiler.
+@@ -73,26 +75,39 @@
+         this.opts = opts;
+     }
+ 
+-    public static void main(String[] args) {
+-        System.exit(run(args));
++    public static class Options {
++        @Argument
++        public List<String> arguments = new ArrayList<String>();
++
++        @Option(name="-o")
++        public String output;
++
++        @Option(name="-p")
++        public String pkg;
++
++        @Option(name="-c")
++        public boolean compact;
++
++        @Option(name="-x")
++        public boolean xml;
++
++        @Option(name="-xsd")
++        public boolean xsd;
++
++        @Option(name="-h")
++        public boolean chain;
+     }
+ 
+-    public static class Options {
+-        public StringOption output = new StringOption("-o");
+-        public StringOption pkg = new StringOption("-p");
+-        public BooleanOption compact = new BooleanOption("-c");
+-        public BooleanOption xml = new BooleanOption("-x");
+-        public BooleanOption xsd = new BooleanOption("-xsd");
+-        public BooleanOption chain = new BooleanOption("-h");
++    public static void main(String[] args) {
++        System.exit(run(args));
+     }
+ 
+     public static int run(String[] args) {
+         Options opts = new Options();
+-        CmdLineParser parser = new CmdLineParser();
+-        parser.addOptionClass(opts);
++        CmdLineParser parser = new CmdLineParser(opts);
+ 
+         try {
+-            parser.parse(args);
++            parser.parseArgument(args);
+         } catch (CmdLineException e) {
+             System.out.println(e.getMessage());
+             printUsage();
+@@ -102,9 +117,9 @@
+         TxwOptions topts = new TxwOptions();
+         topts.errorListener = new ConsoleErrorReporter(System.out);
+ 
+-        if(opts.output.value!=null) {
++        if(opts.output != null) {
+             try {
+-                topts.codeWriter = new FileCodeWriter(new File(opts.output.value));
++                topts.codeWriter = new FileCodeWriter(new File(opts.output));
+             } catch( IOException e ) {
+                 System.out.println(e.getMessage());
+                 printUsage();
+@@ -114,12 +129,12 @@
+             topts.codeWriter = new SingleStreamCodeWriter(System.out);
+         }
+ 
+-        if(opts.chain.isOn()) {
++        if(opts.chain) {
+             topts.chainMethod = true;
+         }
+ 
+-        if(opts.pkg.value!=null) {
+-            topts._package = topts.codeModel._package(opts.pkg.value);
++        if(opts.pkg != null) {
++            topts._package = topts.codeModel._package(opts.pkg);
+         } else {
+             topts._package = topts.codeModel.rootPackage();
+         }
+@@ -146,21 +161,21 @@
+      * out of the specified schema file.
+      */
+     private static SchemaBuilder makeSourceSchema(CmdLineParser parser, Options opts, ErrorHandler eh) throws MalformedURLException {
+-        File f = new File((String)parser.getArguments().get(0));
++        File f = new File(opts.arguments.get(0));
+         final InputSource in = new InputSource(f.toURL().toExternalForm());
+ 
+-        if(opts.xsd.isOff() && opts.xml.isOff() && opts.compact.isOff()) {
++        if(!opts.xsd && !opts.xml && !opts.compact) {
+             // auto detect
+             if(in.getSystemId().endsWith(".rnc"))
+-                opts.compact.value=true;
++                opts.compact = true;
+             else
+             if(in.getSystemId().endsWith(".rng"))
+-                opts.xml.value=true;
++                opts.xml = true;
+             else
+-                opts.xsd.value=true;
++                opts.xsd = true;
+         }
+ 
+-        if(opts.xsd.isOn())
++        if(opts.xsd)
+             return new XmlSchemaLoader(in);
+ 
+         final Parseable parseable = makeRELAXNGSource(opts, in, eh, f);
+@@ -169,10 +184,10 @@
+     }
+ 
+     private static Parseable makeRELAXNGSource(Options opts, final InputSource in, ErrorHandler eh, File f) {
+-        if(opts.compact.isOn())
++        if(opts.compact)
+             return new CompactParseable(in,eh);
+ 
+-        if(opts.xml.isOn())
++        if(opts.xml)
+             return new SAXParseable(in,eh);
+ 
+         // otherwise sniff from the file extension
diff --git a/debian/poms/txw2.pom b/debian/poms/txw2.pom
deleted file mode 100644
index a18075e..0000000
--- a/debian/poms/txw2.pom
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><project>
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>com.sun.xml.txw2</groupId>
-  <artifactId>txw2</artifactId>
-  <version>20070624</version>
-</project>
\ No newline at end of file
diff --git a/debian/rules b/debian/rules
index 885453a..022d754 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,19 +1,11 @@
 #!/usr/bin/make -f
 
-include /usr/share/cdbs/1/class/ant.mk
 include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/maven.mk
 
 JAVA_HOME         := /usr/lib/jvm/default-java
-PACKAGE           := txw2
-VERSION           := 20070624
-DEB_ANT_BUILD_TARGET := jar javadoc
-
-binary-post-install/lib$(PACKAGE)-java::
-	mh_installpoms -plib$(PACKAGE)-java
-	mh_installjar -plib$(PACKAGE)-java -l debian/poms/$(PACKAGE).pom build/$(PACKAGE).jar 
+DEB_MAVEN_DOC_TARGET := javadoc:javadoc javadoc:aggregate
+#DEB_MAVEN_DOC_TARGET := javadoc:aggregate
 
 get-orig-source:
-	svn export -r {2007-06-24} https://svn.java.net/svn/jaxb~version2/trunk/txw2
-	tar -czf ../txw2_0.1+$(VERSION).orig.tar.gz txw2 --exclude "*.jar" --exclude "*.zip"
-	rm -Rf txw2
-
+	uscan --download-version 20110809 --force-download --rename
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..ef1b482
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=3
+opts="uversionmangle=s/-(alpha|beta)-/~$1/" \
+  https://svn.java.net/svn/jaxb~version2/tags/ \
+  txw2-project-(\d.*)/ debian debian/orig-tar.sh

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/txw2.git



More information about the pkg-java-commits mailing list