[pkg-java] r12533 - in trunk/libhamcrest-java/debian: . patches

Ludovic Claude ludovicc-guest at alioth.debian.org
Tue Jun 1 21:01:16 UTC 2010


Author: ludovicc-guest
Date: 2010-06-01 21:01:08 +0000 (Tue, 01 Jun 2010)
New Revision: 12533

Added:
   trunk/libhamcrest-java/debian/libhamcrest-java-doc.doc-base
   trunk/libhamcrest-java/debian/libhamcrest-java-doc.install
   trunk/libhamcrest-java/debian/patches/
   trunk/libhamcrest-java/debian/patches/001-build.patch
   trunk/libhamcrest-java/debian/patches/series
Removed:
   trunk/libhamcrest-java/debian/build.xml
Modified:
   trunk/libhamcrest-java/debian/changelog
   trunk/libhamcrest-java/debian/control
   trunk/libhamcrest-java/debian/orig-tar.sh
   trunk/libhamcrest-java/debian/rules
   trunk/libhamcrest-java/debian/watch
Log:
* Update watch file
* Use upstream build.xml with necessary patches for the build,
  delete debian/build.xml
* Add Build-Depends on libjarjar-java, default-jdk-doc, junit-doc
  junit4-doc, junit, junit4, libeasymock-java, libjmock-java, testng
* Add documentation package containing the javadoc for the package

Deleted: trunk/libhamcrest-java/debian/build.xml
===================================================================
--- trunk/libhamcrest-java/debian/build.xml	2010-05-31 13:51:25 UTC (rev 12532)
+++ trunk/libhamcrest-java/debian/build.xml	2010-06-01 21:01:08 UTC (rev 12533)
@@ -1,128 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project default="jar" name="${project.name}" basedir="..">
-
-  <target name="clean">
-    <delete dir="${hamcrest-text.dir}/${class.dir}" quiet="true"/>
-    <delete dir="${hamcrest-library.dir}/${class.dir}" quiet="true"/>
-    <delete dir="${hamcrest-integration.dir}/${class.dir}" quiet="true"/>
-    <delete dir="${hamcrest-generator.dir}/${class.dir}" quiet="true"/>
-    <delete dir="${hamcrest-core.dir}/${class.dir}" quiet="true"/>
-    <delete dir="generated" quiet="true"/>
-
-    <delete file="${hamcrest-text.jar}" quiet="true"/>
-    <delete file="${hamcrest-library.jar}" quiet="true"/>
-    <delete file="${hamcrest-integration.jar}" quiet="true"/>
-    <delete file="${hamcrest-generator.jar}" quiet="true"/>
-    <delete file="${hamcrest-core.jar}" quiet="true"/>
-  </target>
-
-  <target name="jar">
-    <mkdir dir="${hamcrest-core.dir}/${class.dir}"/>
-    <javac srcdir="${hamcrest-core.dir}/${source.dir}" destdir="${hamcrest-core.dir}/${class.dir}"
-      debug="true" source="1.5"/>
-
-    <jar jarfile="${hamcrest-core.jar}" manifest="debian/manifest/core.mf">
-      <fileset dir="${hamcrest-core.dir}/${class.dir}">
-          <include name="**"/>
-      </fileset>
-    </jar>
-
-    <mkdir dir="${hamcrest-integration.dir}/${class.dir}"/>
-    <javac srcdir="${hamcrest-integration.dir}/${source.dir}" destdir="${hamcrest-integration.dir}/${class.dir}"
-      debug="true" source="1.5" classpath="${hamcrest-core.jar}"/>
-
-    <jar jarfile="${hamcrest-integration.jar}" manifest="debian/manifest/integration.mf">
-      <fileset dir="${hamcrest-integration.dir}/${class.dir}">
-          <include name="**"/>
-      </fileset>
-    </jar>
-
-<!--     The below jars can be built only using sun-jdk -->
-
-    <mkdir dir="${hamcrest-generator.dir}/${class.dir}"/>
-    <javac srcdir="${hamcrest-generator.dir}/${source.dir}" destdir="${hamcrest-generator.dir}/${class.dir}"
-      debug="true" source="1.5" classpath="${hamcrest-core.jar}"/>
-
-    <jar jarfile="${hamcrest-generator.jar}" manifest="debian/manifest/generator.mf">
-      <fileset dir="${hamcrest-generator.dir}/${class.dir}">
-          <include name="**"/>
-      </fileset>
-    </jar>
-
-    <mkdir dir="generated/code"/>
-    <java classname="org.hamcrest.generator.config.XmlConfigurator"
-          fork="yes"
-          failonerror="yes"
-          classpath="${hamcrest-core.jar}:${hamcrest-generator.jar}:${qdox.jar}">
-      <arg value="core-matchers.xml"/>
-      <arg value="${hamcrest-core.dir}/${source.dir}"/>
-      <arg value="org.hamcrest.CoreMatchers"/>
-      <arg value="generated/code"/>
-    </java>
-    
-    <mkdir dir="generated/classes"/>
-    <javac srcdir="generated/code" destdir="generated/classes"
-           debug="true" source="1.5" classpath="${hamcrest-core.jar}"/>
-
-    <jar jarfile="${hamcrest-core.jar}" manifest="debian/manifest/core.mf">
-      <fileset dir="${hamcrest-core.dir}/${class.dir}">
-          <include name="**"/>
-      </fileset>
-      <fileset dir="generated/classes">
-        <include name="**"/>
-      </fileset>
-    </jar>
-
-    <mkdir dir="${hamcrest-library.dir}/${class.dir}"/>
-    <javac srcdir="${hamcrest-library.dir}/${source.dir}" destdir="${hamcrest-library.dir}/${class.dir}"
-	   debug="true" source="1.5" classpath="${hamcrest-core.jar}"/>
-    <jar jarfile="${hamcrest-library.jar}" manifest="debian/manifest/library.mf">
-      <fileset dir="${hamcrest-library.dir}/${class.dir}">
-        <include name="**"/>
-      </fileset>
-    </jar>
-    
-    <!-- Generate one class with all static imports -->
-    <mkdir dir="${hamcrest-library.dir}/generated-code"/>
-    <java classname="org.hamcrest.generator.config.XmlConfigurator"
-          fork="yes"
-          failonerror="yes"
-          classpath="
-            ${hamcrest-core.jar};
-            ${hamcrest-generator.jar};
-            ${hamcrest-library.jar};
-            ${qdox.jar};
-          ">
-        <arg value="matchers.xml"/>
-        <arg value="hamcrest-core/src/main/java,hamcrest-library/src/main/java"/>
-        <arg value="org.hamcrest.Matchers"/>
-        <arg value="${hamcrest-library.dir}/generated-code"/>
-    </java>
-    <mkdir dir="${hamcrest-library.dir}/generated-classes"/>
-    <javac srcdir="${hamcrest-library.dir}/generated-code" destdir="${hamcrest-library.dir}/generated-classes"
-           debug="true" source="1.5" classpath="${hamcrest-core.jar}:${hamcrest-library.jar};"/>
-
-    <!-- Append to library jar -->
-    <jar jarfile="${hamcrest-library.jar}" manifest="debian/manifest/library.mf">
-      <fileset dir="${hamcrest-library.dir}/${class.dir}">
-        <include name="**"/>
-      </fileset>
-      <fileset dir="${hamcrest-library.dir}/generated-classes">
-        <include name="**"/>
-      </fileset>
-    </jar>
-
-    <mkdir dir="${hamcrest-text.dir}/${class.dir}"/>
-    <javac srcdir="${hamcrest-text.dir}/${source.dir}" destdir="${hamcrest-text.dir}/${class.dir}"
-	   debug="true" source="1.5" classpath="${hamcrest-core.jar}:${hamcrest-library.jar}"/>
-    
-    <jar jarfile="${hamcrest-text.jar}" manifest="debian/manifest/text.mf">
-      <fileset dir="${hamcrest-text.dir}/${class.dir}">
-        <include name="**"/>
-      </fileset>
-    </jar>
-
-  </target>
-
-</project>

Modified: trunk/libhamcrest-java/debian/changelog
===================================================================
--- trunk/libhamcrest-java/debian/changelog	2010-05-31 13:51:25 UTC (rev 12532)
+++ trunk/libhamcrest-java/debian/changelog	2010-06-01 21:01:08 UTC (rev 12533)
@@ -1,3 +1,14 @@
+libhamcrest-java (1.1-7) lucid; urgency=low
+
+  * Update watch file
+  * Use upstream build.xml with necessary patches for the build,
+    delete debian/build.xml
+  * Add Build-Depends on libjarjar-java, default-jdk-doc, junit-doc
+    junit4-doc, junit, junit4, libeasymock-java, libjmock-java, testng
+  * Add documentation package containing the javadoc for the package
+
+ -- Ludovic Claude <ludovic.claude at laposte.net>  Fri, 28 May 2010 23:34:45 +0200
+
 libhamcrest-java (1.1-6) unstable; urgency=low
 
   [ Gabriele Giacone ]

Modified: trunk/libhamcrest-java/debian/control
===================================================================
--- trunk/libhamcrest-java/debian/control	2010-05-31 13:51:25 UTC (rev 12532)
+++ trunk/libhamcrest-java/debian/control	2010-06-01 21:01:08 UTC (rev 12533)
@@ -5,7 +5,9 @@
 Uploaders: Varun Hiremath <varun at debian.org>, Michael Koch <konqueror at gmx.de>,
  Damien Raude-Morvan <drazzib at debian.org>
 Build-Depends: cdbs, debhelper (>= 7), ant, default-jdk, maven-repo-helper
-Build-Depends-Indep: libqdox-java, libeasymock-java, libjmock-java
+Build-Depends-Indep: libqdox-java, libeasymock-java, libjmock-java, libjarjar-java,
+ default-jdk-doc, junit-doc, junit4-doc, junit, junit4, libeasymock-java,
+ libjmock-java, testng
 Standards-Version: 3.8.4
 Homepage: http://code.google.com/p/hamcrest/
 Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/libhamcrest-java
@@ -19,3 +21,17 @@
  predicates) allowing 'match' rules to be defined declaratively, to be
  used in other frameworks. Typical scenarios include testing
  frameworks, mocking libraries and UI validation rules.
+
+Package: libhamcrest-java-doc
+Architecture: all
+Section: doc
+Depends: ${misc:Depends}, default-jdk-doc, junit-doc, junit4-doc
+Suggests: libhamcrest-java
+Description: library of matchers for building test expressions - documentation
+ Provides a library of matcher objects (also known as constraints or
+ predicates) allowing 'match' rules to be defined declaratively, to be
+ used in other frameworks. Typical scenarios include testing
+ frameworks, mocking libraries and UI validation rules.
+ .
+ This package contains Javadoc API documentation of Hamcrest.
+

Added: trunk/libhamcrest-java/debian/libhamcrest-java-doc.doc-base
===================================================================
--- trunk/libhamcrest-java/debian/libhamcrest-java-doc.doc-base	                        (rev 0)
+++ trunk/libhamcrest-java/debian/libhamcrest-java-doc.doc-base	2010-06-01 21:01:08 UTC (rev 12533)
@@ -0,0 +1,10 @@
+Document: libhamcrest-javadoc
+Title: API Javadoc for Hamcrest
+Author: Hamcrest developers
+Abstract: This is the API Javadoc provided by the Hamcrest library.
+Section: Programming
+
+Format: HTML
+Index: /usr/share/doc/libhamcrest-java/api/index.html
+Files: /usr/share/doc/libhamcrest-java/api/*
+

Added: trunk/libhamcrest-java/debian/libhamcrest-java-doc.install
===================================================================
--- trunk/libhamcrest-java/debian/libhamcrest-java-doc.install	                        (rev 0)
+++ trunk/libhamcrest-java/debian/libhamcrest-java-doc.install	2010-06-01 21:01:08 UTC (rev 12533)
@@ -0,0 +1 @@
+build/javadoc/* /usr/share/doc/libhamcrest-java/api/

Modified: trunk/libhamcrest-java/debian/orig-tar.sh
===================================================================
--- trunk/libhamcrest-java/debian/orig-tar.sh	2010-05-31 13:51:25 UTC (rev 12532)
+++ trunk/libhamcrest-java/debian/orig-tar.sh	2010-06-01 21:01:08 UTC (rev 12533)
@@ -1,13 +1,16 @@
 #!/bin/sh -e
 
 # called by uscan with '--upstream-version' <version> <file>
+VERSION=$2
+TAR=../libhamcrest-java_$VERSION.orig.tar.gz
 SOURCE=$(dpkg-parsechangelog | sed -ne 's,Source: \(.*\),\1,p')
 DIR=${SOURCE}-$2
 
 # clean up the upstream tarball
 tar -z -x -f $3
+rm $3
 mv hamcrest-$2 $DIR
-GZIP=--best tar -c -z -f $3 --exclude '*.jar' --exclude '*/lib/*' $DIR
+GZIP=--best tar -c -z -f $TAR --exclude '*.jar' --exclude '*/lib/*' $DIR
 rm -rf $DIR
 
 # move to directory 'tarballs'

Added: trunk/libhamcrest-java/debian/patches/001-build.patch
===================================================================
--- trunk/libhamcrest-java/debian/patches/001-build.patch	                        (rev 0)
+++ trunk/libhamcrest-java/debian/patches/001-build.patch	2010-06-01 21:01:08 UTC (rev 12533)
@@ -0,0 +1,132 @@
+--- a/build.xml
++++ b/build.xml
+@@ -26,17 +26,17 @@
+         <java-to-jar srcdir="hamcrest-generator/src/main/java"
+                      destjar="build/temp/hamcrest-generator-${version}-nodeps.jar"
+                      classpath="
+-                       lib/generator/qdox-1.6.1.jar;
++                       /usr/share/java/qdox.jar
+                      "/>
+         <taskdef name="jarjar"
+                  classname="com.tonicsystems.jarjar.JarJarTask"
+-                 classpath="lib/generator/jarjar-1.0rc3.jar"/>
++                 classpath="/usr/share/java/jarjar.jar"/>
+         <!-- Bundle QDox classes in hamcrest-generator.jar so user doesn't need to care
+              about it's existence. Uses JarJar to place classes under a different package
+              to prevent conflict. -->
+         <jarjar jarfile="build/hamcrest-generator-${version}.jar">
+             <zipfileset src="build/temp/hamcrest-generator-${version}-nodeps.jar"/>
+-            <zipfileset src="lib/generator/qdox-1.6.1.jar"/>
++            <zipfileset src="/usr/share/java/qdox.jar"/>
+             <rule pattern="com.thoughtworks.qdox.**"
+                   result="org.hamcrest.generator.qdox. at 1"/>
+         </jarjar>
+@@ -94,16 +94,16 @@
+                      classpath="build/hamcrest-core-${version}.jar"/>
+     </target>
+ 
+-    <target name="text"
+-            depends="core, library"
+-            description="Build text pattern matcher">
+-        <java-to-jar srcdir="hamcrest-text/src/main/java"
+-                     destjar="build/hamcrest-text-${version}.jar"
+-                     classpath="
+-                        build/hamcrest-core-${version}.jar;
+-                        build/hamcrest-library-${version}.jar"/>
+-    </target>
+-	
++    <target name="text"
++            depends="core, library"
++            description="Build text pattern matcher">
++        <java-to-jar srcdir="hamcrest-text/src/main/java"
++                     destjar="build/hamcrest-text-${version}.jar"
++                     classpath="
++                        build/hamcrest-core-${version}.jar;
++                        build/hamcrest-library-${version}.jar"/>
++    </target>
++	
+     <target name="integration"
+             depends="core, library"
+             description="Build integration with external tools">
+@@ -121,7 +121,7 @@
+                      destjar="build/hamcrest-unit-test-${version}.jar"
+                      classpath="
+                         build/hamcrest-core-${version}.jar;
+-                        build/hamcrest-library-${version}.jar;
++                        build/hamcrest-library-${version}.jar;
+         				build/hamcrest-text-${version}.jar;
+                         build/hamcrest-integration-${version}.jar;
+                         build/hamcrest-generator-${version}.jar"/>
+@@ -164,7 +164,7 @@
+         <jar jarfile="build/hamcrest-all-${version}.jar" duplicate="preserve">
+             <zipfileset src="build/hamcrest-core-${version}.jar"/>
+             <zipfileset src="build/hamcrest-library-${version}.jar"/>
+-            <zipfileset src="build/hamcrest-text-${version}.jar"/>
++            <zipfileset src="build/hamcrest-text-${version}.jar"/>
+             <zipfileset src="build/hamcrest-generator-${version}.jar"/>
+             <zipfileset src="build/hamcrest-integration-${version}.jar"/>
+         </jar>
+@@ -211,27 +211,32 @@
+ 	<target name="javadoc" depends="library">
+ 		<mkdir dir="build/javadoc"/>
+ 		<javadoc destdir="build/javadoc" source="1.5" failonerror="yes"
+-			overview="overview.html">
++			>
+ 			
+             <classpath>
+-                <fileset dir="lib/integration">
+-                    <include name="*.jar"/>
++                <fileset dir="/usr/share/java">
++                    <include name="junit.jar"/>
++                    <include name="junit4.jar"/>
++                    <include name="testng.jar"/>
++                    <include name="easymock.jar"/>
++                    <include name="jmock.jar"/>
+                 </fileset>
+             </classpath>
+ 
+ 			<packageset dir="hamcrest-core/src/main/java"/>
+ 			<packageset dir="hamcrest-library/src/main/java" excludes="org/hamcrest/internal"/>
+-			<packageset dir="hamcrest-text/src/main/java" excludes="**/internal/**"/>
++			<packageset dir="hamcrest-text/src/main/java" excludes="**/internal/**"/>
+ 			<packageset dir="hamcrest-integration/src/main/java"/>
+-			<packageset dir="build/generated-code"/>
++			<packageset dir="build/temp/hamcrest-core/generated-code"/>
++			<packageset dir="build/temp/hamcrest-library/generated-code"/>
+ 			
+ 			<group title="Hamcrest API and Utility Classes" packages="org.hamcrest"/>
+ 			<group title="Matcher Library" packages="org.hamcrest.*"/>
+ 			<group title="Integration" packages="org.hamcrest.integration, org.hamcrest.integration.*"/>
+ 			
+-			<link offline="false" href="http://java.sun.com/j2se/1.5.0/docs/api/"/>
+-			<link offline="false" href="http://www.junit.org/junit/javadoc/3.8.1/"/>
+-			<link offline="false" href="http://junit.sourceforge.net/javadoc_40/"/>
++			<link offline="false" href="file:///usr/share/doc/default-jdk-doc/api"/>
++			<link offline="false" href="file:///usr/share/doc/junit-doc/doc/api"/>
++			<link offline="false" href="file:///usr/share/doc/junit4-doc/doc/api"/>
+ 		</javadoc>
+ 	</target>
+ 
+@@ -244,9 +249,13 @@
+             <mkdir dir="build/temp/@{destjar}.contents"/>
+             <javac srcdir="@{srcdir}" destdir="build/temp/@{destjar}.contents" debug="${debug}">
+                 <classpath>
+-                    <fileset dir="lib/integration">
+-                        <include name="*.jar"/>
+-                    </fileset>
++                <fileset dir="/usr/share/java">
++                    <include name="junit.jar"/>
++                    <include name="junit4.jar"/>
++                    <include name="testng.jar"/>
++                    <include name="easymock.jar"/>
++                    <include name="jmock.jar"/>
++                </fileset>
+                     <pathelement path="@{classpath}"/>
+                 </classpath>
+             </javac>
+@@ -261,4 +270,4 @@
+         </sequential>
+     </macrodef>
+ 
+-</project>
++</project>

Added: trunk/libhamcrest-java/debian/patches/series
===================================================================
--- trunk/libhamcrest-java/debian/patches/series	                        (rev 0)
+++ trunk/libhamcrest-java/debian/patches/series	2010-06-01 21:01:08 UTC (rev 12533)
@@ -0,0 +1 @@
+001-build.patch

Modified: trunk/libhamcrest-java/debian/rules
===================================================================
--- trunk/libhamcrest-java/debian/rules	2010-05-31 13:51:25 UTC (rev 12532)
+++ trunk/libhamcrest-java/debian/rules	2010-06-01 21:01:08 UTC (rev 12533)
@@ -4,10 +4,10 @@
 include /usr/share/cdbs/1/rules/debhelper.mk
 
 JAVA_HOME		:= /usr/lib/jvm/default-java
-DEB_ANT_BUILDFILE	:= debian/build.xml
-DEB_ANT_BUILD_TARGET	:= jar
+DEB_ANT_BUILDFILE	:= build.xml
+DEB_ANT_BUILD_TARGET	:= core generator integration library text javadoc
 DEB_JARS		:= easymock jmock qdox
-ANT_OPTS		:= -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5
+ANT_OPTS		:= -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 -Dversion=$(DEB_UPSTREAM_VERSION)
 POMS                    := core generator integration library
 
 DEST_DIR = $(DEB_DESTDIR)/usr/share/java
@@ -18,9 +18,9 @@
 		mh_installpom -o -e$(DEB_UPSTREAM_VERSION) \
 		-plibhamcrest-java $$pomfile; \
 		mh_installjar -l -e$(DEB_UPSTREAM_VERSION) -i$(DEB_UPSTREAM_VERSION) \
-		-plibhamcrest-java $$pomfile hamcrest-$$pom.jar; \
+		-plibhamcrest-java $$pomfile build/hamcrest-$$pom-$(DEB_UPSTREAM_VERSION).jar; \
 	done
-	install -m 644 -D hamcrest-text.jar \
+	install -m 644 -D build/hamcrest-text-$(DEB_UPSTREAM_VERSION).jar \
 		$(DEST_DIR)/hamcrest-text-$(DEB_UPSTREAM_VERSION).jar
 	ln -s hamcrest-text-$(DEB_UPSTREAM_VERSION).jar $(DEST_DIR)/hamcrest-text.jar
 
@@ -28,4 +28,4 @@
 	-rm -rf debian/tmp
 
 get-orig-source:
-	-uscan --upstream-version 0 --rename
+	-uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --debug --rename

Modified: trunk/libhamcrest-java/debian/watch
===================================================================
--- trunk/libhamcrest-java/debian/watch	2010-05-31 13:51:25 UTC (rev 12532)
+++ trunk/libhamcrest-java/debian/watch	2010-06-01 21:01:08 UTC (rev 12533)
@@ -1,2 +1,3 @@
 version=3
-http://code.google.com/p/hamcrest/downloads/list .*/hamcrest-(.*).tgz debian debian/orig-tar.sh
+opts="downloadurlmangle=s|.*(hamcrest-.*\.tgz).*|http://hamcrest.googlecode.com/files/$1|,filenamemangle=s/.*=(.*)/$1/" \
+  http://code.google.com/p/hamcrest/downloads/list .*?name=hamcrest-(.*).tgz&.* debian debian/orig-tar.sh




More information about the pkg-java-commits mailing list