[jts] 19/23: Merge Jérôme Villeneuve Larouches GSoC changes.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Wed Aug 5 14:12:57 UTC 2015


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

sebastic pushed a commit to branch master
in repository jts.

commit a2ca7f132670a2b01e06c77a7649fb3af6814339
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Wed Aug 5 00:47:43 2015 +0200

    Merge Jérôme Villeneuve Larouches GSoC changes.
    
    - Switch from ant to debian-maven-helper
---
 debian/README.source                |  5 ++-
 debian/build.xml                    | 88 -------------------------------------
 debian/changelog                    |  2 +
 debian/control                      | 14 +++---
 debian/libjts-java-doc.doc-base.api | 10 +++++
 debian/libjts-java-doc.docs         |  2 -
 debian/libjts-java-doc.install      |  1 +
 debian/libjts-java.poms             | 28 ++++++++++++
 debian/maven.cleanIgnoreRules       |  1 +
 debian/maven.ignoreRules            |  1 +
 debian/maven.properties             |  5 +++
 debian/maven.publishedRules         |  1 +
 debian/maven.rules                  |  2 +
 debian/patches/pom.xml              | 23 ++++++++++
 debian/patches/series               |  1 +
 debian/rules                        | 13 +-----
 16 files changed, 88 insertions(+), 109 deletions(-)

diff --git a/debian/README.source b/debian/README.source
index 8b22c32..194fa25 100644
--- a/debian/README.source
+++ b/debian/README.source
@@ -8,8 +8,9 @@ The upstream source can be downloaded and repacked by running:
 The repacked upstream tarball excludes pre-built documentation, and
 the jars for the bundled dependencies.
 
-The upstream sources don't include an ANT build.xml, it needs to be
-taken from the project VCS repository and adapted.
+The upstream sources don't include an ANT build.xml, it was taken
+from the project VCS repository and adapted in the past, but a custom
+pom.xml is used to build the package with Maven now.
 
 Every new release tends to have one or more issues with building
 from scratch, so be warned and consult the development mailing list.
diff --git a/debian/build.xml b/debian/build.xml
deleted file mode 100644
index 0d01e46..0000000
--- a/debian/build.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<project name="JTS" default="compile" basedir="..">
-
-<!-- ========== Component Declarations ==================================== -->
-
-
-  <!-- The name of this component -->
-  <property name="component.name"          value="jts"/>
-
-  <!-- The base directory for compilation targets -->
-  <property name="build.home"              value="${basedir}/target"/>
-
-  <!-- The base directory for component sources -->
-  <property name="source.home"             value="${basedir}/src"/>
-
-  <!-- The base directory for component configuration files -->
-  <property name="conf.home"               value="${basedir}/src"/>
-
-<!-- ========== Compiler Defaults ========================================= -->
-
-
-  <!-- Should Java compilations set the 'debug' compiler option? -->
-  <property name="compile.debug"           value="true"/>
-
-  <!-- Should Java compilations set the 'deprecation' compiler option? -->
-  <property name="compile.deprecation"     value="false"/>
-
-  <!-- Should Java compilations set the 'optimize' compiler option? -->
-  <property name="compile.optimize"        value="false"/>
-
-  <!-- Construct compile classpath -->
-  <path id="compile.classpath">
-    <pathelement location="${build.home}/classes"/>
-  </path>
-
-
-<!-- ========== Executable Targets ======================================== -->
-  
-  <target name="prepare" description="Prepare build directory">
-    <mkdir dir="${build.home}"/>
-    <mkdir dir="${build.home}/classes"/>
-    <mkdir dir="${build.home}/conf"/>
-    <mkdir dir="${build.home}/docs"/>
-    <mkdir dir="${build.home}/docs/api"/>
-    <mkdir dir="${build.home}/docs/examples"/>
-  </target>
-
-  <target name="static" depends="prepare"
-   description="Copy static files to build directory">
-    <tstamp/>
-    <copy todir="${build.home}/conf" filtering="on">
-      <fileset dir="${conf.home}" includes="*.MF"/>
-      <fileset dir="${conf.home}" includes="*.properties"/>
-    </copy>
-    <copy todir="${build.home}/docs/examples" filtering="on">
-      <fileset dir="${source.home}" includes="**/jtsexample/**"/>
-    </copy>
-  </target>
-
-  <target name="compile" depends="static">
-    <javac srcdir="${source.home}" destdir="${build.home}/classes"
-           debug="${compile.debug}" deprecation="${compile.deprecation}"
-           optimize="${compile.optimize}" verbose="no" source="1.3" nowarn="yes">
-	<exclude name="**/jtsexample/**"/>
-        <classpath refid="compile.classpath"/>
-    </javac>
-
-    <mkdir dir="${build.home}/classes/META-INF"/>
-
-    <jar jarfile="${build.home}/${component.name}.jar"
-         basedir="${build.home}/classes"
-         manifest="${build.home}/conf/MANIFEST.MF">
-      <include name="com/vividsolutions/**" />
-    </jar>
-
-  </target>
-
-  <target name="clean" description="Clean build and distribution directories">
-    <delete dir="${build.home}"/>
-  </target>
-
-  <target name="all" depends="clean,compile"
-   description="Clean and compile all components">  
-	<javadoc packagenames="com.vividsolutions.jts.*" sourcepath="${source.home}" 
-		destdir="${build.home}/docs/api" defaultexcludes="yes">
-    	</javadoc>      
-  </target>
-
-</project>
diff --git a/debian/changelog b/debian/changelog
index 6153f92..49c0bd5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,8 @@ jts (1.13+ds-1) UNRELEASED; urgency=medium
   * Bump Standards-Version to 3.9.6, changes:
     - Canonical Vcs-* URLs
     - copyright-format 1.0
+  * Merge Jérôme Villeneuve Larouches GSoC changes:
+    - Switch from ant to debian-maven-helper
 
  -- Bas Couwenberg <sebastic at debian.org>  Tue, 04 Aug 2015 23:52:21 +0200
 
diff --git a/debian/control b/debian/control
index bdbf079..af0b1d3 100644
--- a/debian/control
+++ b/debian/control
@@ -5,8 +5,10 @@ Section: java
 Priority: optional
 Build-Depends: debhelper (>= 9),
                cdbs,
-               ant,
-               default-jdk
+               default-jdk,
+               maven-debian-helper
+Build-Depends-Indep: default-jdk-doc,
+                     libmaven-javadoc-plugin-java
 Standards-Version: 3.9.6
 Vcs-Browser: http://anonscm.debian.org/cgit/pkg-grass/jts.git
 Vcs-Git: git://anonscm.debian.org/pkg-grass/jts.git
@@ -14,9 +16,9 @@ Homepage: http://tsusiatsoftware.net/jts/main.html
 
 Package: libjts-java
 Architecture: all
-Depends: libjdom1-java,
-         libxerces2-java,
+Depends: ${maven:Depends},
          ${misc:Depends}
+Recommends: ${maven:OptionalDepends},
 Suggests: libjts-java-doc
 Description: JTS Topology Suite 
  JTS is a java library which provides:
@@ -31,7 +33,9 @@ Description: JTS Topology Suite
 Package: libjts-java-doc
 Architecture: all
 Section: doc
-Depends: ${misc:Depends}
+Depends: ${maven:DocDepends},
+         ${misc:Depends}
+Recommends: ${maven:DocOptionalDepends}
 Suggests: libjts-java
 Description: Documentation for the JTS Topology Suite
  This package includes documentation for programmers:
diff --git a/debian/libjts-java-doc.doc-base.api b/debian/libjts-java-doc.doc-base.api
new file mode 100644
index 0000000..bc09c41
--- /dev/null
+++ b/debian/libjts-java-doc.doc-base.api
@@ -0,0 +1,10 @@
+Document: libjts-java
+Title: API Javadoc for jts
+Author: jts developers
+Abstract: This is the API Javadoc provided for the
+ libjts-java library.
+Section: Programming
+
+Format: HTML
+Index: /usr/share/doc/libjts-java/api/index.html
+Files: /usr/share/doc/libjts-java/api/*
diff --git a/debian/libjts-java-doc.docs b/debian/libjts-java-doc.docs
index 9272834..1776ad4 100644
--- a/debian/libjts-java-doc.docs
+++ b/debian/libjts-java-doc.docs
@@ -1,3 +1 @@
 doc/*.html
-target/docs/api
-target/docs/examples
diff --git a/debian/libjts-java-doc.install b/debian/libjts-java-doc.install
new file mode 100644
index 0000000..c571675
--- /dev/null
+++ b/debian/libjts-java-doc.install
@@ -0,0 +1 @@
+target/apidocs/* usr/share/doc/libjts-java/api
diff --git a/debian/libjts-java.poms b/debian/libjts-java.poms
new file mode 100644
index 0000000..0417132
--- /dev/null
+++ b/debian/libjts-java.poms
@@ -0,0 +1,28 @@
+# 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 --has-package-version
diff --git a/debian/maven.cleanIgnoreRules b/debian/maven.cleanIgnoreRules
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/debian/maven.cleanIgnoreRules
@@ -0,0 +1 @@
+
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/debian/maven.ignoreRules
@@ -0,0 +1 @@
+
diff --git a/debian/maven.properties b/debian/maven.properties
new file mode 100644
index 0000000..e593715
--- /dev/null
+++ b/debian/maven.properties
@@ -0,0 +1,5 @@
+# Include here properties to pass to Maven during the build.
+# For example:
+# maven.test.skip=true
+
+maven.test.skip=true
diff --git a/debian/maven.publishedRules b/debian/maven.publishedRules
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/debian/maven.publishedRules
@@ -0,0 +1 @@
+
diff --git a/debian/maven.rules b/debian/maven.rules
new file mode 100644
index 0000000..340abac
--- /dev/null
+++ b/debian/maven.rules
@@ -0,0 +1,2 @@
+
+com.vividsolutions jts jar s/.*/debian/ * *
diff --git a/debian/patches/pom.xml b/debian/patches/pom.xml
new file mode 100644
index 0000000..a84dcc5
--- /dev/null
+++ b/debian/patches/pom.xml
@@ -0,0 +1,23 @@
+Description: Add pom.xml for Maven build.
+Author: Jérôme Villeneuve Larouche <jlarouche at mapgears.com>
+Forwarded: not-needed
+
+--- /dev/null
++++ b/pom.xml
+@@ -0,0 +1,16 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<project xmlns="http://maven.apache.org/POM/4.0.0"
++         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
++         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
++    <modelVersion>4.0.0</modelVersion>
++
++    <groupId>com.vividsolutions</groupId>
++    <artifactId>jts</artifactId>
++    <version>1.13</version>
++
++    <build>
++        <sourceDirectory>${basedir}/src</sourceDirectory>
++        <finalName>jts</finalName>
++    </build>
++
++</project>
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..d4f7111
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+pom.xml
diff --git a/debian/rules b/debian/rules
index cf65247..762e15f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,20 +1,9 @@
 #!/usr/bin/make -f
-# debian/rules file for jts (uses cdbs)
 
 include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/ant.mk
+include /usr/share/cdbs/1/class/maven.mk
 
 export UPSTREAM_VERSION = $(shell head -1 debian/changelog | cut -f2 -d\( | cut -f1 -d\) | cut -f1 -d\-)
 
 JAVA_HOME := /usr/lib/jvm/default-java
-JAVA_CMD := /usr/bin/java
-ANT_HOME := /usr/share/ant
-
-DEB_JARS := $(ANT_HOME)/lib/ant-launcher.jar
-DEB_ANT_BUILDFILE := debian/build.xml
-DEB_ANT_BUILD_TARGET := all
-
-install/libjts-java::
-	install -m 644 target/jts.jar debian/libjts-java/usr/share/java/jts-$(UPSTREAM_VERSION).jar
-	ln -s jts-$(UPSTREAM_VERSION).jar debian/libjts-java/usr/share/java/jts.jar
 

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



More information about the Pkg-grass-devel mailing list