[libpdfbox-java] 01/06: Build with maven-debian-helper instead of ant

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Wed Jun 1 09:09:09 UTC 2016


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

ebourg-guest pushed a commit to branch master
in repository libpdfbox-java.

commit 25e7bf1ea32e50610258bbc6bf2f95aa9d78dd72
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Wed Jun 1 10:30:25 2016 +0200

    Build with maven-debian-helper instead of ant
---
 debian/changelog                      |  1 +
 debian/control                        |  9 +++------
 debian/libfontbox-java-doc.doc-base   |  4 ++--
 debian/libfontbox-java-doc.install    |  2 +-
 debian/libfontbox-java.poms           | 28 ---------------------------
 debian/libjempbox-java-doc.doc-base   |  4 ++--
 debian/libjempbox-java-doc.install    |  2 +-
 debian/libjempbox-java.poms           | 28 ---------------------------
 debian/libpdfbox-java-doc.doc-base    |  4 ++--
 debian/libpdfbox-java-doc.install     |  2 +-
 debian/libpdfbox-java.poms            | 14 +++++++++++++-
 debian/maven.ignoreRules              |  8 +++++++-
 debian/maven.properties               |  7 +++++++
 debian/maven.rules                    |  6 ++++++
 debian/patches/02-jar-packaging.patch | 36 +++++++++++++++++++++++++++++++++++
 debian/patches/series                 |  8 +++++---
 debian/rules                          | 29 +++++++---------------------
 17 files changed, 94 insertions(+), 98 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 2f47b37..7b455bc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
 libpdfbox-java (1:1.8.11+dfsg-2) UNRELEASED; urgency=medium
 
+  * Build with maven-debian-helper instead of ant
   * Standards-Version updated to 3.9.8 (no changes)
   * Use a secure Vcs-Git URL
 
diff --git a/debian/control b/debian/control
index 090456e..0456d42 100644
--- a/debian/control
+++ b/debian/control
@@ -5,11 +5,8 @@ Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.or
 Uploaders: tony mancill <tmancill at debian.org>,
            gregor herrmann <gregoa at debian.org>,
            Emmanuel Bourg <ebourg at apache.org>
-Build-Depends: ant,
-               debhelper (>= 9)
-Build-Depends-Indep: ant-optional,
-                     checkstyle,
-                     default-jdk,
+Build-Depends: debhelper (>= 9), maven-debian-helper
+Build-Depends-Indep: default-jdk,
                      htmldoc-common,
                      javahelper,
                      junit4,
@@ -20,7 +17,7 @@ Build-Depends-Indep: ant-optional,
                      libcommons-beanutils-java,
                      libcommons-logging-java,
                      libicu4j-java,
-                     maven-repo-helper,
+                     libmaven-javadoc-plugin-java,
                      poppler-data
 Standards-Version: 3.9.8
 Vcs-Git: https://anonscm.debian.org/git/pkg-java/libpdfbox-java.git
diff --git a/debian/libfontbox-java-doc.doc-base b/debian/libfontbox-java-doc.doc-base
index f3ebfcd..22083aa 100644
--- a/debian/libfontbox-java-doc.doc-base
+++ b/debian/libfontbox-java-doc.doc-base
@@ -4,5 +4,5 @@ Abstract: Javadocs containing the FontBox API documentation.
 Section: Programming/Java
 
 Format: HTML
-Index: /usr/share/doc/libfontbox-java-doc/html/index.html
-Files: /usr/share/doc/libfontbox-java-doc/html/*.html
+Index: /usr/share/doc/libfontbox-java/api/index.html
+Files: /usr/share/doc/libfontbox-java/api/*.html
diff --git a/debian/libfontbox-java-doc.install b/debian/libfontbox-java-doc.install
index 390065e..fbdcc9e 100644
--- a/debian/libfontbox-java-doc.install
+++ b/debian/libfontbox-java-doc.install
@@ -1 +1 @@
-fontbox/target/javadoc/* usr/share/doc/libfontbox-java-doc/html
+fontbox/target/apidocs/* usr/share/doc/libfontbox-java/api
diff --git a/debian/libfontbox-java.poms b/debian/libfontbox-java.poms
deleted file mode 100644
index 059e98e..0000000
--- a/debian/libfontbox-java.poms
+++ /dev/null
@@ -1,28 +0,0 @@
-# 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]
-#
-fontbox/pom.xml --has-package-version --no-parent --java-lib --artifact=fontbox/target/fontbox-*.jar
diff --git a/debian/libjempbox-java-doc.doc-base b/debian/libjempbox-java-doc.doc-base
index 228dd1a..c7636c0 100644
--- a/debian/libjempbox-java-doc.doc-base
+++ b/debian/libjempbox-java-doc.doc-base
@@ -4,5 +4,5 @@ Abstract: Javadocs containing the JempBox API documentation.
 Section: Programming/Java
 
 Format: HTML
-Index: /usr/share/doc/libjempbox-java-doc/html/index.html
-Files: /usr/share/doc/libjempbox-java-doc/html/*.html
+Index: /usr/share/doc/libjempbox-java/api/index.html
+Files: /usr/share/doc/libjempbox-java/api/*.html
diff --git a/debian/libjempbox-java-doc.install b/debian/libjempbox-java-doc.install
index e56ae30..062797d 100644
--- a/debian/libjempbox-java-doc.install
+++ b/debian/libjempbox-java-doc.install
@@ -1 +1 @@
-jempbox/target/javadoc/* usr/share/doc/libjempbox-java-doc/html
+jempbox/target/apidocs/* usr/share/doc/libjempbox-java/api
diff --git a/debian/libjempbox-java.poms b/debian/libjempbox-java.poms
deleted file mode 100644
index 1014636..0000000
--- a/debian/libjempbox-java.poms
+++ /dev/null
@@ -1,28 +0,0 @@
-# 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]
-#
-jempbox/pom.xml --has-package-version --no-parent --java-lib --artifact=jempbox/target/jempbox-*.jar
diff --git a/debian/libpdfbox-java-doc.doc-base b/debian/libpdfbox-java-doc.doc-base
index b23508c..a9e5649 100644
--- a/debian/libpdfbox-java-doc.doc-base
+++ b/debian/libpdfbox-java-doc.doc-base
@@ -4,5 +4,5 @@ Abstract: Javadocs containing the PDFBox API documentation.
 Section: Programming/Java
 
 Format: HTML
-Index: /usr/share/doc/libpdfbox-java-doc/html/index.html
-Files: /usr/share/doc/libpdfbox-java-doc/html/*.html
+Index: /usr/share/doc/libpdfbox-java/api/index.html
+Files: /usr/share/doc/libpdfbox-java/api/*.html
diff --git a/debian/libpdfbox-java-doc.install b/debian/libpdfbox-java-doc.install
index 378e256..005a07c 100644
--- a/debian/libpdfbox-java-doc.install
+++ b/debian/libpdfbox-java-doc.install
@@ -1 +1 @@
-pdfbox/target/javadoc/* usr/share/doc/libpdfbox-java-doc/html
+pdfbox/target/apidocs/* usr/share/doc/libpdfbox-java/api
diff --git a/debian/libpdfbox-java.poms b/debian/libpdfbox-java.poms
index e341e96..3fe0440 100644
--- a/debian/libpdfbox-java.poms
+++ b/debian/libpdfbox-java.poms
@@ -25,4 +25,16 @@
 #   --site-xml=<location>: Optional, the location for site.xml if it needs to be installed.
 #     Empty by default. [mh_install]
 #
-pdfbox/pom.xml --has-package-version --no-parent --java-lib --artifact=pdfbox/target/pdfbox-*.jar
+pom.xml --no-parent
+pdfbox/pom.xml --no-parent --has-package-version --package=libpdfbox-java --java-lib
+jempbox/pom.xml --no-parent --has-package-version --package=libjempbox-java --java-lib
+fontbox/pom.xml --no-parent --has-package-version --package=libfontbox-java --java-lib
+parent/pom.xml --ignore
+xmpbox/pom.xml --ignore
+preflight/pom.xml --ignore
+preflight-app/pom.xml --ignore
+lucene/pom.xml --ignore
+ant/pom.xml --ignore
+war/pom.xml --ignore
+app/pom.xml --ignore
+examples/pom.xml --ignore
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
index efbc049..fadea98 100644
--- a/debian/maven.ignoreRules
+++ b/debian/maven.ignoreRules
@@ -1,9 +1,15 @@
 
+com.levigo.jbig2 levigo-jbig2-imageio * * * *
 commons-io commons-io * * * *
-junit junit * * * *
+net.java.dev.jai-imageio jai-imageio-core-standalone * * * *
 org.apache.ant ant-nodeps * * * *
+org.apache.felix maven-bundle-plugin * * * *
+org.apache.maven.plugins maven-antrun-plugin * * * *
+org.apache.maven.plugins maven-assembly-plugin * * * *
 org.apache.maven.plugins maven-checkstyle-plugin * * * *
 org.apache.maven.plugins maven-deploy-plugin * * * *
+org.apache.maven.plugins maven-release-plugin * * * *
+org.apache.maven.plugins maven-site-plugin * * * *
 org.apache.maven.plugins maven-surefire-plugin * * * *
 org.apache.maven.plugins maven-surefire-report-plugin * * * *
 org.apache.rat apache-rat-plugin * * * *
diff --git a/debian/maven.properties b/debian/maven.properties
new file mode 100644
index 0000000..98f1946
--- /dev/null
+++ b/debian/maven.properties
@@ -0,0 +1,7 @@
+# Include here properties to pass to Maven during the build.
+# For example:
+# maven.test.skip=true
+
+maven.test.skip=true
+
+project.build.sourceEncoding=ISO-8859-1
diff --git a/debian/maven.rules b/debian/maven.rules
index 2ec0c3f..1c6a273 100644
--- a/debian/maven.rules
+++ b/debian/maven.rules
@@ -1,2 +1,8 @@
 
+junit junit jar s/4\..*/4.x/ * *
 commons-logging s/commons-logging-api/commons-logging/ * s/.*/debian/ * *
+junit junit * s/.*/4.x/ * *
+org.bouncycastle s/bcmail-jdk15/bcmail/ * s/.*/debian/ * *
+org.bouncycastle s/bcmail-jdk15on/bcmail/ * s/.*/debian/ * *
+org.bouncycastle s/bcprov-jdk15/bcprov/ * s/.*/debian/ * *
+org.bouncycastle s/bcprov-jdk15on/bcprov/ * s/.*/debian/ * *
diff --git a/debian/patches/02-jar-packaging.patch b/debian/patches/02-jar-packaging.patch
new file mode 100644
index 0000000..45070f3
--- /dev/null
+++ b/debian/patches/02-jar-packaging.patch
@@ -0,0 +1,36 @@
+Description: Change the packaging type since the bundle plugin is disabled
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/fontbox/pom.xml
++++ b/fontbox/pom.xml
+@@ -26,7 +26,7 @@
+   </parent>
+ 
+   <artifactId>fontbox</artifactId>
+-  <packaging>bundle</packaging>
++  <packaging>jar</packaging>
+ 
+   <name>Apache FontBox</name>
+   <description>
+--- a/jempbox/pom.xml
++++ b/jempbox/pom.xml
+@@ -26,7 +26,7 @@
+   </parent>
+ 
+   <artifactId>jempbox</artifactId>
+-  <packaging>bundle</packaging>
++  <packaging>jar</packaging>
+ 
+   <name>Apache JempBox</name>
+   <description>
+--- a/pdfbox/pom.xml
++++ b/pdfbox/pom.xml
+@@ -28,7 +28,7 @@
+     </parent>
+ 
+     <artifactId>pdfbox</artifactId>
+-    <packaging>bundle</packaging>
++    <packaging>jar</packaging>
+ 
+     <name>Apache PDFBox</name>
+     <description>
diff --git a/debian/patches/series b/debian/patches/series
index 8be8488..45a47f2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,7 @@
-build.xml.patch
-build-subproject-docs.patch
+#build.xml.patch
+#build-subproject-docs.patch
 bc-1.47.patch
-reproducible-build.patch
+#reproducible-build.patch
 05_bc1.51.patch
+#02-bundle-dependencies.patch
+02-jar-packaging.patch
diff --git a/debian/rules b/debian/rules
index e02f8a8..90273cb 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,22 +1,11 @@
 #!/usr/bin/make -f
-#
-# debian/rules
-# 20100806/tm	convert to javahelper
-
-export JAVA_HOME=/usr/lib/jvm/default-java
-export CLASSPATH=/usr/share/java/bcmail.jar:/usr/share/java/bcprov.jar:/usr/share/java/bcpkix.jar:/usr/share/java/checkstyle.jar:/usr/share/java/junit4.jar:/usr/share/java/commons-logging.jar:/usr/share/java/icu4j.jar:/usr/share/java/commons-beanutils.jar
 
 htmldoc-common_source := $(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W htmldoc-common)
 lcdf-typetools_source := $(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W lcdf-typetools)
 poppler-data_source   := $(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W poppler-data)
 
 %:
-	dh $@ --buildsystem ant
-
-override_dh_auto_clean:
-	dh_auto_clean -- -buildfile pdfbox/build.xml
-	rm -Rf pdfbox/src/main/resources/org/apache/pdfbox/resources/pdfbox.version
-	mh_clean
+	dh $@ --buildsystem=maven --with javahelper
 
 override_dh_auto_configure:
 	# replace what we delete in repacking. never used ...
@@ -28,18 +17,12 @@ override_dh_auto_build:
 	# work around downloading adobe file
 	mkdir -p pdfbox/target/classes/org/apache/pdfbox/resources/cmap
 	cp pdfbox/src/main/resources/org/apache/pdfbox/resources/cmap/* pdfbox/target/classes/org/apache/pdfbox/resources/cmap/
+
 	mkdir -p pdfbox/target/classes/org/apache/pdfbox/resources/afm
-	cp /usr/share/htmldoc/fonts/*.afm pdfbox/target/classes/org/apache/pdfbox/resources/afm/
+	cp /usr/share/htmldoc/fonts/*.afm          pdfbox/target/classes/org/apache/pdfbox/resources/afm/
 	cp /usr/share/lcdf-typetools/glyphlist.txt pdfbox/target/classes/org/apache/pdfbox/resources
 
-	dh_auto_build -- -buildfile pdfbox/build.xml pdfbox.package fontbox.package jempbox.package pdfbox.javadoc fontbox.javadoc jempbox.javadoc
-
-override_dh_link:
-	mh_install -plibpdfbox-java
-	mh_install -plibjempbox-java
-	mh_install -plibfontbox-java
-
-	jh_classpath
+	dh_auto_build
 
 override_dh_installchangelogs:
 	dh_installchangelogs $(CURDIR)/RELEASE-NOTES.txt
@@ -49,8 +32,10 @@ override_dh_installexamples:
 	# empty directory since we remove the contents during repackaging.
 	rmdir --verbose --parents --ignore-fail-on-non-empty $(CURDIR)/debian/libpdfbox-java-doc/usr/share/doc/libpdfbox-java-doc/examples/src/main/resources/org/apache/pdfbox/resources/pdfa
 
+	rm $(CURDIR)/debian/libpdfbox-java-doc/usr/share/doc/libpdfbox-java-doc/examples/pom.xml.save
+
 override_dh_gencontrol:
 	dh_gencontrol -- "-Vmisc:Built-Using=$(htmldoc-common_source)$(lcdf-typetools_source)$(poppler-data_source)"
 
 get-orig-source:
-	uscan --force-download --repack --rename
+	uscan --force-download --repack --rename --compression xz

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



More information about the pkg-java-commits mailing list