[jruby] 02/03: Replace cdbs with debhelper

Miguel Landaeta nomadium at moszumanska.debian.org
Wed May 27 02:53:10 UTC 2015


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

nomadium pushed a commit to branch experimental
in repository jruby.

commit 595e43eb91098ea77db4875f0893fe85d57042e8
Author: Miguel Landaeta <nomadium at debian.org>
Date:   Tue May 26 15:35:14 2015 -0300

    Replace cdbs with debhelper
---
 debian/changelog |  6 +++---
 debian/control   |  1 -
 debian/maven3.mk | 14 ++++----------
 debian/rules     | 49 ++++++++++++++++++++++++++-----------------------
 4 files changed, 33 insertions(+), 37 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 7e38e66..823cd78 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,8 @@ jruby (1.7.19-1) UNRELEASED; urgency=medium
 
   * New upstream release. (Closes: #636554, #773131, #750749).
   * Switch build system to Maven, upstream doesn't maintain Ant one anymore:
-    - Add B-D on: cdbs, maven, maven-{debian,repo}-helper and several
-      maven plugins.
+    - Add B-D on: maven, maven-{debian,repo}-helper and several maven plugins.
+    - Replace cdbs with debhelper.
   * Remove outdated packaging files:
     - d/dirs, d/links, d/README.Debian, d/NEWS.Debian and a couple of
       lintian overrides.
@@ -45,7 +45,7 @@ jruby (1.7.19-1) UNRELEASED; urgency=medium
     minified copy. This is to avoid lintian warnings, during build time
     a link symbolic to libjs-jquery is deployed.
 
- -- Miguel Landaeta <nomadium at debian.org>  Tue, 26 May 2015 11:51:28 -0300
+ -- Miguel Landaeta <nomadium at debian.org>  Tue, 26 May 2015 15:33:54 -0300
 
 jruby (1.5.6-10) unstable; urgency=medium
 
diff --git a/debian/control b/debian/control
index 2a29455..7ae1426 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,6 @@ Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.or
 Uploaders: Miguel Landaeta <nomadium at debian.org>
 Build-Depends: ant-optional,
                bnd,
-               cdbs,
                debhelper (>= 9~),
                junit4,
                libasm4-java,
diff --git a/debian/maven3.mk b/debian/maven3.mk
index 446106a..4e83ef0 100644
--- a/debian/maven3.mk
+++ b/debian/maven3.mk
@@ -1,3 +1,7 @@
+# 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_MAVEN_ARGS := -Pdist
 DEB_CLASSPATH = $(MAVEN_HOME)/boot/plexus-classworlds-2.x.jar
@@ -7,13 +11,3 @@ DEB_MAVEN_INVOKE = cd $(DEB_BUILDDIR) && $(JAVACMD) -classpath $(DEB_CLASSPATH)
                  -s/etc/maven2/settings-debian.xml \
                  -Dmaven.repo.local=$(DEB_MAVEN_REPO) \
                  $(if $(DEB_MAVEN_ARGS_$(cdbs_curpkg)),$(DEB_MAVEN_ARGS_$(cdbs_curpkg)),$(DEB_MAVEN_ARGS))
-
-maven-sanity-check:
-	@if ! test -x "$(JAVACMD)"; then \
-		echo "You must specify a valid JAVA_HOME or JAVACMD!"; \
-		exit 1; \
-	fi
-	@if ! test -r "$(MAVEN_HOME)/boot/plexus-classworlds-2.x.jar"; then \
-		echo "You must specify a valid MAVEN_HOME directory!"; \
-		exit 1; \
-	fi
diff --git a/debian/rules b/debian/rules
index 88827f2..f31d330 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,37 +1,40 @@
 #!/usr/bin/make -f
 
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/maven.mk
-include $(CURDIR)/debian/maven3.mk
+include /usr/share/dpkg/default.mk
 
 #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
+# 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)
 
-pre-build::
+include $(CURDIR)/debian/maven3.mk
+
+%:
+	dh $@
+
+override_dh_auto_clean:
+	-$(DEB_MAVEN_INVOKE) clean
+	dh_clean
+	mh_unpatchpoms -pjruby
+	mh_clean
+	rm -f lib/jruby.jar bin/jruby
+	rm -rf -- "$(DEB_MAVEN_REPO)"
+
+override_dh_auto_configure:
+	/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
+
+override_dh_auto_build:
 	mkdir -p lib/jni
+	$(DEB_MAVEN_INVOKE) package
 
-common-install-prehook-indep::
+override_dh_auto_install:
 	mkdir -p target/package
-	tar zxf ./maven/jruby-dist/target/jruby-dist-$(DEB_UPSTREAM_VERSION)-bin.tar.gz -C target/package --strip-components=1
+	tar zxf ./maven/jruby-dist/target/jruby-dist-$(DEB_VERSION_UPSTREAM)-bin.tar.gz \
+	  -C target/package --strip-components=1
 	cd target/package/bin && mv jruby.sh jruby
 	cd target/package/bin && chmod 0755 *
 	rm target/package/lib/ruby/2.0/rdoc/generator/template/darkfish/js/jquery.js
-
-install/jruby::
-	rm -rf debian/jruby/usr/share/maven-repo/*
-	rm debian/jruby/usr/share/java/*
 	mh_installpom -pjruby --no-parent core/pom.xml
 	mh_installjar -pjruby --java-lib  core/pom.xml target/package/lib/jruby.jar
-
-clean::
-	-rm -rf                     \
-	bin/jruby                  \
-	core/target/               \
-	lib/jruby.jar              \
-	target/                    \
-	maven/jruby-dist/target/   \
-	maven/jruby-stdlib/target/ \
-	maven/target/              \
-	core/src/main/java/org/jruby/runtime/Constants.java

-- 
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