[jruby] 01/02: Build with maven-debian-helper 2

Miguel Landaeta nomadium at moszumanska.debian.org
Mon Dec 28 21:55:41 UTC 2015


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

nomadium pushed a commit to branch master
in repository jruby.

commit 37af637554d36fe2f933d87fdcdca78848fe2a70
Author: Miguel Landaeta <nomadium at debian.org>
Date:   Mon Dec 28 18:29:50 2015 -0300

    Build with maven-debian-helper 2
---
 debian/changelog              |  6 +++--
 debian/control                |  3 +--
 debian/m2.conf                |  7 ------
 debian/maven.cleanIgnoreRules |  0
 debian/maven.properties       |  1 +
 debian/maven3.mk              | 14 ------------
 debian/rules                  | 51 ++++++++-----------------------------------
 7 files changed, 15 insertions(+), 67 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index dd5a08b..31269c8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,11 @@
 jruby (1.7.22-2) UNRELEASED; urgency=medium
 
-  * Fix an FTBFS caused by a change in Maven 3.
+  * Build with maven-debian-helper 2.
+    - Simplify packaging.
+    - Avoid occasional FTBFS errors caused by changes in Maven.
   * Fix an FTBFS caused by some unit tests not working correctly in pbuilder.
 
- -- Miguel Landaeta <nomadium at debian.org>  Mon, 28 Dec 2015 13:02:06 -0300
+ -- Miguel Landaeta <nomadium at debian.org>  Mon, 28 Dec 2015 17:20:15 -0300
 
 jruby (1.7.22-1) unstable; urgency=medium
 
diff --git a/debian/control b/debian/control
index e407bde..0d324b8 100644
--- a/debian/control
+++ b/debian/control
@@ -45,8 +45,7 @@ Build-Depends: ant-optional,
                libyaml-snake-java,
                libyecht-java (>= 1.0~),
                locales-all,
-               maven (>= 3.3~),
-               maven-debian-helper,
+               maven-debian-helper (>= 2.0~),
                maven-repo-helper,
                nailgun (>= 0.9.1~),
                netbase,
diff --git a/debian/m2.conf b/debian/m2.conf
deleted file mode 100644
index a107568..0000000
--- a/debian/m2.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-main is org.apache.maven.cli.MavenCli from plexus.core
-
-set maven.home default /usr/share/maven
-
-[plexus.core]
-optionally ${maven.home}/lib/ext/*.jar
-load       ${maven.home}/lib/*.jar
diff --git a/debian/maven.cleanIgnoreRules b/debian/maven.cleanIgnoreRules
deleted file mode 100644
index e69de29..0000000
diff --git a/debian/maven.properties b/debian/maven.properties
index e69de29..e26b8dd 100644
--- a/debian/maven.properties
+++ b/debian/maven.properties
@@ -0,0 +1 @@
+jffi.version=debian
diff --git a/debian/maven3.mk b/debian/maven3.mk
deleted file mode 100644
index d4dd478..0000000
--- a/debian/maven3.mk
+++ /dev/null
@@ -1,14 +0,0 @@
-# replace this with a saner integration between maven3 and debhelper
-DEB_BUILDDIR = .
-JAVACMD = $(JAVA_HOME)/bin/java
-DEB_MAVEN_REPO := $(CURDIR)/debian/maven-repo
-MAVEN_HOME = /usr/share/maven
-DEB_CLASSPATH = $(MAVEN_HOME)/boot/plexus-classworlds-2.x.jar
-DEB_MAVEN_INVOKE = cd $(DEB_BUILDDIR) && $(JAVACMD) -classpath $(DEB_CLASSPATH) \
-                 $(JAVA_OPTS) -Dclassworlds.conf=$(CURDIR)/debian/m2.conf \
-                 -Dmaven.home=/usr/share/maven \
-                 -Dmaven.multiModuleProjectDirectory=$(CURDIR) \
-                 org.codehaus.plexus.classworlds.launcher.Launcher \
-                 -s/etc/maven/settings-debian.xml \
-                 -Dmaven.repo.local=$(DEB_MAVEN_REPO) \
-                 $(if $(DEB_MAVEN_ARGS_$(cdbs_curpkg)),$(DEB_MAVEN_ARGS_$(cdbs_curpkg)),$(DEB_MAVEN_ARGS))
diff --git a/debian/rules b/debian/rules
index babc982..4d4ded5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,58 +2,25 @@
 
 include /usr/share/dpkg/default.mk
 
-#JAVA_HOME := /usr/lib/jvm/default-java
+#export JAVA_HOME=/usr/lib/jvm/default-java
 # upstream code directly from git repo builds with openjdk-7-jdk
-# I have to find out how/why
-JAVA_HOME := /usr/lib/jvm/java-8-openjdk-$(DEB_BUILD_ARCH)
+# I have to find out how/why or just wait for openjdk-8-jdk to be default
+export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-$(DEB_BUILD_ARCH)
 export LC_ALL=en_US.UTF-8
 
-include $(CURDIR)/debian/maven3.mk
-
 %:
-	dh $@
+	dh $@ --buildsystem=maven
 
 override_dh_auto_clean:
-	-$(DEB_MAVEN_INVOKE) -Pdist clean
-	dh_clean
-	mh_unpatchpoms -pjruby
-	mh_clean
+	dh_auto_clean
 	rm -f lib/jruby.jar bin/jruby
-	for subp in stdlib dist complete; do \
-		rm -rf ./maven/jruby-$$subp/target ; \
-	done
-	rm -rf ./test/target/
 	rm -rf -- ./rubyspec_temp/
-	rm -rf -- "$(DEB_MAVEN_REPO)"
-
-	# this ugly hack is due to mh_unpatchpoms not restoring some POMs
-	# if you want to build jruby twice in a row, you need to restore
-	# everything correctly
-	-cd maven.bak && for pom in `find ./jruby-* -type f`; do \
-	  cp $$pom $(CURDIR)/maven/$$pom ; \
-	done
-	-cd maven.bak && cp ./test/pom.xml $(CURDIR)/test/pom.xml
-	rm -rf maven.bak
-
-override_dh_auto_configure:
-	# this ugly hack is due to mh_unpatchpoms not restoring some POMs
-	# if you want to build jruby twice in a row, you need to restore
-	# everything correctly
-	mkdir -p maven.bak
-	cd maven.bak && mkdir -p jruby-complete jruby-stdlib test
-	cp maven/jruby-complete/pom.xml maven.bak/jruby-complete
-	cp maven/jruby-stdlib/pom.xml maven.bak/jruby-stdlib
-	cp test/pom.xml maven.bak/test
-
-	/usr/share/maven-debian-helper/copy-repo.sh "$(CURDIR)/debian"
-	mh_patchpoms -pjruby --debian-build --keep-pom-version \
-	  --maven-repo="$(DEB_MAVEN_REPO)" --build-no-docs
+	cd lib/ruby/shared/ && rm -rf *openssl* ./org
 
 override_dh_auto_build:
 	mkdir -p lib/jni
-	mkdir -p $(CURDIR)/maven/jruby-complete/target/classes
-	$(DEB_MAVEN_INVOKE) -Pcomplete
-	$(DEB_MAVEN_INVOKE) -Pdist package
+	dh_auto_build -- -Pcomplete
+	dh_auto_build -- -Pdist package
 
 # this got ugly fast
 # there must be a better way to do this
@@ -99,7 +66,7 @@ ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
 		ln -s $$file ./lib/ruby/shared ; \
 	done
 
-	$(DEB_MAVEN_INVOKE) -Ptest test
+	dh_auto_test -- -Ptest test
 	./bin/jruby spec/mspec/bin/mspec ci
 	# enable it when minitest-excludes is available in the archive
 	#./bin/jruby -S ./bin/rake test:mri19

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



More information about the pkg-java-commits mailing list