[geronimo-jpa-2.0-spec] 06/08: Build with maven-debian-helper

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Wed Apr 27 20:50:01 UTC 2016


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

ebourg-guest pushed a commit to branch master
in repository geronimo-jpa-2.0-spec.

commit e83ad6f6b353cefe985bee8ab5e053d8ce3b7eba
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Wed Apr 27 22:16:19 2016 +0200

    Build with maven-debian-helper
---
 debian/changelog                                 |  1 +
 debian/control                                   | 15 ++++++++-----
 debian/libgeronimo-jpa-2.0-spec-java-doc.install |  1 +
 debian/libgeronimo-jpa-2.0-spec-java-doc.javadoc |  1 -
 debian/libgeronimo-jpa-2.0-spec-java.poms        | 28 ++++++++++++++++++++++++
 debian/maven.ignoreRules                         |  2 ++
 debian/maven.rules                               |  2 ++
 debian/patches/01-maven-bundle-extension.patch   | 14 ++++++++++++
 debian/patches/series                            |  1 +
 debian/rules                                     | 21 ++----------------
 10 files changed, 60 insertions(+), 26 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 4358c6e..a0efe56 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 geronimo-jpa-2.0-spec (1.1-3) UNRELEASED; urgency=medium
 
   * Team upload.
+  * Build with maven-debian-helper
   * Removed the unused dependency on aspectj
   * Standards-Version updated to 3.9.8 (no changes)
   * Use canonical Vcs-* URLs
diff --git a/debian/control b/debian/control
index 1d37f2f..b24f2ac 100644
--- a/debian/control
+++ b/debian/control
@@ -5,17 +5,20 @@ Section: java
 Priority: optional
 Build-Depends: debhelper (>= 9),
                default-jdk,
-               javahelper,
                libgeronimo-osgi-support-java,
-               maven-repo-helper
+               libmaven-bundle-plugin-java,
+               libmaven-javadoc-plugin-java,
+               libosgi-compendium-java,
+               libosgi-core-java,
+               maven-debian-helper
 Standards-Version: 3.9.8
 Vcs-Git: https://anonscm.debian.org/git/pkg-java/geronimo-jpa-2.0-spec.git
 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/geronimo-jpa-2.0-spec.git
 
 Package: libgeronimo-jpa-2.0-spec-java
 Architecture: all
-Depends: libgeronimo-osgi-support-java, ${misc:Depends}
-Suggests: libgeronimo-jpa-2.0-spec-java-doc (= ${binary:Version})
+Depends: ${maven:Depends}, ${misc:Depends}
+Suggests: ${maven:OptionalDepends}, libgeronimo-jpa-2.0-spec-java-doc (= ${binary:Version})
 Description: Geronimo JSR-317 Java Persistence (JPA) 2.0 Spec API
  The Java Persistence API is the Java API for the management of persistence
  and object/relational mapping for Java EE and Java SE environments.
@@ -40,8 +43,8 @@ Description: Geronimo JSR-317 Java Persistence (JPA) 2.0 Spec API
 Package: libgeronimo-jpa-2.0-spec-java-doc
 Architecture: all
 Section: doc
-Depends: ${misc:Depends}
-Suggests: libgeronimo-jpa-2.0-spec-java (= ${binary:Version})
+Depends: ${misc:Depends}, ${maven:DocDepends}
+Suggests: ${maven:DocOptionalDepends}, libgeronimo-jpa-2.0-spec-java (= ${binary:Version})
 Description: Documentation for libgeronimo-jpa-2.0-spec-java
  Documentation for the Java Persistence API that is the Java API for the
  management of persistence and object/relational mapping for Java EE and Java
diff --git a/debian/libgeronimo-jpa-2.0-spec-java-doc.install b/debian/libgeronimo-jpa-2.0-spec-java-doc.install
new file mode 100644
index 0000000..776ab32
--- /dev/null
+++ b/debian/libgeronimo-jpa-2.0-spec-java-doc.install
@@ -0,0 +1 @@
+target/apidocs/*  /usr/share/doc/libgeronimo-jpa-2.0-spec-java/api
diff --git a/debian/libgeronimo-jpa-2.0-spec-java-doc.javadoc b/debian/libgeronimo-jpa-2.0-spec-java-doc.javadoc
deleted file mode 100644
index 3530402..0000000
--- a/debian/libgeronimo-jpa-2.0-spec-java-doc.javadoc
+++ /dev/null
@@ -1 +0,0 @@
-internal  /usr/share/doc/libgeronimo-jpa-2.0-spec-java/api
diff --git a/debian/libgeronimo-jpa-2.0-spec-java.poms b/debian/libgeronimo-jpa-2.0-spec-java.poms
new file mode 100644
index 0000000..5ad70f2
--- /dev/null
+++ b/debian/libgeronimo-jpa-2.0-spec-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 --no-parent --has-package-version
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
new file mode 100644
index 0000000..3f475f8
--- /dev/null
+++ b/debian/maven.ignoreRules
@@ -0,0 +1,2 @@
+
+org.apache.maven.plugins maven-eclipse-plugin * * * *
diff --git a/debian/maven.rules b/debian/maven.rules
new file mode 100644
index 0000000..9f28f09
--- /dev/null
+++ b/debian/maven.rules
@@ -0,0 +1,2 @@
+s/org.apache.felix/org.osgi/ org.osgi.core * s/.*/debian/ * *
+s/org.apache.felix/org.osgi/ org.osgi.compendium * s/.*/debian/ * *
diff --git a/debian/patches/01-maven-bundle-extension.patch b/debian/patches/01-maven-bundle-extension.patch
new file mode 100644
index 0000000..700c4f9
--- /dev/null
+++ b/debian/patches/01-maven-bundle-extension.patch
@@ -0,0 +1,14 @@
+Description: Mark the maven-bundle-plugin as a extension to handle the 'bundle' packaging
+ (this parameter is defined in a parent pom not available in Debian)
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/pom.xml
++++ b/pom.xml
+@@ -125,6 +125,7 @@
+             <plugin>
+                 <groupId>org.apache.felix</groupId>
+                 <artifactId>maven-bundle-plugin</artifactId>
++                <extensions>true</extensions>
+                 <configuration>
+                     <instructions>
+                         <Bundle-SymbolicName>${groupId}.${artifactId};singleton=true</Bundle-SymbolicName>
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..bfe1816
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01-maven-bundle-extension.patch
diff --git a/debian/rules b/debian/rules
index 606b3ee..6acfe9d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,24 +1,7 @@
 #!/usr/bin/make -f
 
-export JAVA_HOME=/usr/lib/jvm/default-java
-export CLASSPATH=/usr/share/java/osgi.core.jar:/usr/share/java/geronimo-osgi-locator.jar
-
 %:
-	dh $@ --with javahelper
-
-override_jh_build:
-	jh_build geronimo-jpa-2.0-spec.jar src
-
-override_dh_auto_install:
-	mh_installpom -plibgeronimo-jpa-2.0-spec-java pom.xml --no-parent
-	mh_installjar -plibgeronimo-jpa-2.0-spec-java pom.xml \
-	  geronimo-jpa-2.0-spec.jar /usr/share/java/geronimo-jpa-2.0-spec.jar
+	dh $@ --buildsystem=maven
 
 get-orig-source:
-	cd $(dir $(firstword $(MAKEFILE_LIST)))../ && \
-	uscan \
-		--verbose \
-		--no-symlink \
-		--destdir $(CURDIR)      \
-		--watchfile debian/watch \
-		--force-download
+	uscan --download-current-version --no-symlink --force-download

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/geronimo-jpa-2.0-spec.git



More information about the pkg-java-commits mailing list