[guava-libraries] 02/04: Changed the build to use maven-debian-helper

Emmanuel Bourg ebourg-guest at alioth.debian.org
Wed Sep 11 23:45:51 UTC 2013


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

ebourg-guest pushed a commit to branch master
in repository guava-libraries.

commit 28a5c1e9e1ad7b4d61647cb9ef9fa8ca6629ff84
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Wed Sep 11 16:55:53 2013 +0200

    Changed the build to use maven-debian-helper
---
 debian/changelog                                   |    9 ++++--
 debian/control                                     |   15 ++++++---
 debian/guava.bnd                                   |    5 ---
 debian/libguava-java-doc.doc-base.api              |    9 ++++++
 debian/libguava-java-doc.install                   |    2 ++
 debian/libguava-java-doc.javadoc                   |    1 -
 debian/libguava-java.poms                          |   33 +++++++++++++++++++-
 debian/maven.ignoreRules                           |   13 ++++++++
 debian/maven.publishedRules                        |    2 ++
 debian/maven.rules                                 |    4 +++
 debian/patches/01-maven2-compatibility.patch       |   14 +++++++++
 debian/patches/02-remove-source-in-javadoc.patch   |   14 +++++++++
 ...-inference.patch => 03-openjdk-inference.patch} |    8 ++---
 debian/patches/04-source-encoding.patch            |   15 +++++++++
 debian/patches/series                              |    5 ++-
 debian/rules                                       |   22 ++-----------
 16 files changed, 131 insertions(+), 40 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 36a2429..bada244 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,12 +1,15 @@
-guava-libraries (14.0.1-2) UNRELEASED; urgency=low
+guava-libraries (15.0-1) UNRELEASED; urgency=low
 
-  * debian/control: Use canonical URLs for the Vcs-* fields
-  * Use XZ compression for the upstream tarball
+  * New upstream release
   * Use the real upstream source downloaded from
     http://guava-libraries.googlecode.com/archive/v<VERSION>.zip
     instead of the sources jar from Maven central
+  * Changed the build to use maven-debian-helper
+  * Removed debian/pom.xml and debian/guava.bnd
   * Build depend on debhelper 9
   * debian/rules: Removed the get-orig-pom target
+  * debian/control: Use canonical URLs for the Vcs-* fields
+  * Use XZ compression for the upstream tarball
 
  -- Emmanuel Bourg <ebourg at apache.org>  Wed, 26 Jun 2013 19:17:42 +0200
 
diff --git a/debian/control b/debian/control
index 7ee8ff7..48e2f87 100644
--- a/debian/control
+++ b/debian/control
@@ -2,10 +2,15 @@ Source: guava-libraries
 Section: java
 Priority: optional
 Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
-Uploaders: Miguel Landaeta <miguel at miguel.cc>, Emmanuel Bourg <ebourg at apache.org>,
- James Page <james.page at canonical.com>
-Build-Depends: ant-optional, debhelper (>= 9~), default-jdk, javahelper, bnd
-Build-Depends-Indep: maven-repo-helper, libjsr305-java, libatinject-jsr330-api-java
+Uploaders: Miguel Landaeta <miguel at miguel.cc>,
+           Emmanuel Bourg <ebourg at apache.org>,
+           James Page <james.page at canonical.com>
+Build-Depends: cdbs, debhelper (>= 9~), default-jdk, maven-debian-helper
+Build-Depends-Indep: libatinject-jsr330-api-java,
+                     libjsr305-java,
+                     libmaven-bundle-plugin-java,
+                     libmaven-dependency-plugin-java,
+                     libmaven-javadoc-plugin-java
 Standards-Version: 3.9.4
 Vcs-Git: git://anonscm.debian.org/pkg-java/guava-libraries.git
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-java/guava-libraries.git
@@ -13,7 +18,7 @@ Homepage: http://code.google.com/p/guava-libraries/
 
 Package: libguava-java
 Architecture: all
-Depends: libjsr305-java, libatinject-jsr330-api-java, ${misc:Depends}
+Depends: libatinject-jsr330-api-java, libjsr305-java, ${misc:Depends}
 Description: suite of Google Common Libraries for Java 5.0
  Guava is a suite of core and expanded libraries that include
  utility classes, google's collections, io classes, concurrency
diff --git a/debian/guava.bnd b/debian/guava.bnd
deleted file mode 100644
index c7556cc..0000000
--- a/debian/guava.bnd
+++ /dev/null
@@ -1,5 +0,0 @@
-Bundle-Name: suite of Google Common Libraries for Java 5.0
-Bundle-SymbolicName: com.google.common
-Bundle-Version: 1.0.0
-Bundle-Vendor: Debian.org
-Import-Package: sun.misc;resolution:=optional, *
diff --git a/debian/libguava-java-doc.doc-base.api b/debian/libguava-java-doc.doc-base.api
new file mode 100644
index 0000000..1b2578c
--- /dev/null
+++ b/debian/libguava-java-doc.doc-base.api
@@ -0,0 +1,9 @@
+Document: libguava-java
+Title: API Javadoc for Guava
+Author: Google Inc.
+Abstract: This is the API Javadoc provided for the libguava-java library.
+Section: Programming
+
+Format: HTML
+Index: /usr/share/doc/libguava-java/api/index.html
+Files: /usr/share/doc/libguava-java/api/*
diff --git a/debian/libguava-java-doc.install b/debian/libguava-java-doc.install
new file mode 100644
index 0000000..f41d00e
--- /dev/null
+++ b/debian/libguava-java-doc.install
@@ -0,0 +1,2 @@
+
+guava/target/apidocs/* usr/share/doc/libguava-java/api
diff --git a/debian/libguava-java-doc.javadoc b/debian/libguava-java-doc.javadoc
deleted file mode 100644
index edd59af..0000000
--- a/debian/libguava-java-doc.javadoc
+++ /dev/null
@@ -1 +0,0 @@
-internal  /usr/share/doc/libguava-java/api
diff --git a/debian/libguava-java.poms b/debian/libguava-java.poms
index 623bd24..7e8c3b2 100644
--- a/debian/libguava-java.poms
+++ b/debian/libguava-java.poms
@@ -1 +1,32 @@
-debian/pom.xml --no-parent
+# List of POM files for the package
+# Format of this file is:
+# <path to pom file> [option]*
+# where option can be:
+#   --ignore: ignore this POM and its artifact if any
+#   --ignore-pom: don't install the POM. To use on POM files that are created
+#     temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms]
+#   --no-parent: remove the <parent> tag from the POM
+#   --package=<package>: an alternative package to use when installing this POM
+#      and its artifact
+#   --has-package-version: to indicate that the original version of the POM is the same as the upstream part
+#      of the version for the package.
+#   --keep-elements=<elem1,elem2>: a list of XML elements to keep in the POM
+#      during a clean operation with mh_cleanpom or mh_installpom
+#   --artifact=<path>: path to the build artifact associated with this POM,
+#      it will be installed when using the command mh_install. [mh_install]
+#   --java-lib: install the jar into /usr/share/java to comply with Debian
+#      packaging guidelines
+#   --usj-name=<name>: name to use when installing the library in /usr/share/java
+#   --usj-version=<version>: version to use when installing the library in /usr/share/java
+#   --no-usj-versionless: don't install the versionless link in /usr/share/java
+#   --dest-jar=<path>: the destination for the real jar.
+#     It will be installed with mh_install. [mh_install]
+#   --classifier=<classifier>: Optional, the classifier for the jar. Empty by default.
+#   --site-xml=<location>: Optional, the location for site.xml if it needs to be installed.
+#     Empty by default. [mh_install]
+#
+pom.xml --no-parent --has-package-version
+guava/pom.xml --has-package-version --java-lib
+guava-gwt/pom.xml --ignore
+guava-testlib/pom.xml --ignore
+guava-tests/pom.xml --ignore
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
new file mode 100644
index 0000000..2da7699
--- /dev/null
+++ b/debian/maven.ignoreRules
@@ -0,0 +1,13 @@
+
+org.sonatype.oss oss-parent * * * *
+com.google.guava guava-gwt jar * * *
+com.google.guava guava-testlib jar * * *
+com.google.guava guava-tests jar * * *
+com.google.caliper caliper * * * *
+junit junit * * * *
+org.apache.maven.plugins maven-gpg-plugin * * * *
+org.apache.maven.plugins maven-source-plugin * * * *
+org.easymock easymock * * * *
+org.mockito mockito-core * * * *
+org.truth0 truth * * * *
+org.codehaus.mojo animal-sniffer-maven-plugin * * * *
diff --git a/debian/maven.publishedRules b/debian/maven.publishedRules
new file mode 100644
index 0000000..b1a6f3d
--- /dev/null
+++ b/debian/maven.publishedRules
@@ -0,0 +1,2 @@
+
+com.google.guava guava s/jar/bundle/ s/.*/debian/ * *
diff --git a/debian/maven.rules b/debian/maven.rules
new file mode 100644
index 0000000..1c7f7a1
--- /dev/null
+++ b/debian/maven.rules
@@ -0,0 +1,4 @@
+
+com.google.guava guava-parent pom s/.*/debian/ * *
+com.google.guava guava bundle s/.*/debian/ * *
+s/com.google.code.findbugs/org.jsr-305/ jsr305 * s/.*/0.x/ * *
diff --git a/debian/patches/01-maven2-compatibility.patch b/debian/patches/01-maven2-compatibility.patch
new file mode 100644
index 0000000..d7680da
--- /dev/null
+++ b/debian/patches/01-maven2-compatibility.patch
@@ -0,0 +1,14 @@
+Description: Makes the project buildable with Maven 2
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/pom.xml
++++ b/pom.xml
+@@ -34,7 +34,7 @@
+     </license>
+   </licenses>
+   <prerequisites>
+-    <maven>3.0.3</maven>
++    <maven>2.2.1</maven>
+   </prerequisites>
+   <scm>
+     <connection>scm:git:https://code.google.com/p/guava-libraries/</connection>
diff --git a/debian/patches/02-remove-source-in-javadoc.patch b/debian/patches/02-remove-source-in-javadoc.patch
new file mode 100644
index 0000000..1d140ee
--- /dev/null
+++ b/debian/patches/02-remove-source-in-javadoc.patch
@@ -0,0 +1,14 @@
+Description: Removes the browsable source files generated with the Javadoc
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/guava/pom.xml
++++ b/guava/pom.xml
+@@ -110,7 +110,7 @@
+           <charset>UTF-8</charset>
+           <additionalparam>-XDignore.symbol.file</additionalparam>
+           <excludePackageNames>com.google.common.base.internal</excludePackageNames>
+-          <linksource>true</linksource>
++          <linksource>false</linksource>
+           <links>
+             <link>http://jsr-305.googlecode.com/svn/trunk/javadoc</link>
+           </links>
diff --git a/debian/patches/openjdk-inference.patch b/debian/patches/03-openjdk-inference.patch
similarity index 66%
rename from debian/patches/openjdk-inference.patch
rename to debian/patches/03-openjdk-inference.patch
index eef3f3a..00266a3 100644
--- a/debian/patches/openjdk-inference.patch
+++ b/debian/patches/03-openjdk-inference.patch
@@ -3,11 +3,9 @@ Description: Disables workaround for compilation failures on sun-jdk
 Author: James Page <james.page at canonical.com>
 Bug: http://code.google.com/p/guava-libraries/issues/detail?id=635
 
-Index: guava-libraries/src/main/java/com/google/common/collect/Maps.java
-===================================================================
---- guava-libraries.orig/src/main/java/com/google/common/collect/Maps.java	2011-06-01 14:09:15.078044106 +0100
-+++ guava-libraries/src/main/java/com/google/common/collect/Maps.java	2011-06-01 14:13:37.678044066 +0100
-@@ -224,8 +224,8 @@
+--- a/guava/src/com/google/common/collect/Maps.java
++++ b/guava/src/com/google/common/collect/Maps.java
+@@ -315,8 +315,8 @@
     * @param comparator the comparator to sort the keys with
     * @return a new, empty {@code TreeMap}
     */
diff --git a/debian/patches/04-source-encoding.patch b/debian/patches/04-source-encoding.patch
new file mode 100644
index 0000000..0334b25
--- /dev/null
+++ b/debian/patches/04-source-encoding.patch
@@ -0,0 +1,15 @@
+Description: Specifies the source encoding for the compiler to avoid unmappable
+ character errors. For some reason the project.build.sourceEncoding property
+ is ignored.
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/pom.xml
++++ b/pom.xml
+@@ -103,6 +103,7 @@
+           <configuration>
+             <source>1.6</source>
+             <target>1.6</target>
++            <encoding>UTF-8</encoding>
+           </configuration>
+         </plugin>
+         <plugin>
diff --git a/debian/patches/series b/debian/patches/series
index 850228b..1f03c8f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,4 @@
-openjdk-inference.patch
+01-maven2-compatibility.patch
+02-remove-source-in-javadoc.patch
+03-openjdk-inference.patch
+04-source-encoding.patch
diff --git a/debian/rules b/debian/rules
index b332af0..b0164e1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,25 +1,9 @@
 #!/usr/bin/make -f
 
-PACKAGE   := libguava-java
-VERSION   := $(shell dpkg-parsechangelog | grep ^Version: | sed -r 's/^Version: (.+)-.+$$/\1/')
-export JAVA_HOME := /usr/lib/jvm/default-java
-export CLASSPATH := /usr/share/java/jsr305.jar:/usr/share/java/atinject-jsr330-api.jar
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/maven.mk
 
-%:
-	dh $@ --with javahelper
-
-override_dh_auto_build:
-	jh_build --javacopts="-source 1.5 -target 1.5" --javadoc-opts="-source 1.5" guava.jar src
-	bnd wrap -properties debian/guava.bnd -output guava.jar guava.jar
-
-override_dh_auto_install:
-	mh_installpoms -p$(PACKAGE)
-	mh_installjar -p$(PACKAGE) -l debian/pom.xml guava.jar
-
-override_dh_auto_clean:
-	dh_auto_clean
-	mh_clean
-	rm -f guava.jar
+JAVA_HOME := /usr/lib/jvm/default-java
 
 get-orig-source:
 	-uscan --download-current-version --force-download --rename

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



More information about the pkg-java-commits mailing list