[DRE-commits] [ruby-psych] 01/03: Separate arch specific build steps from arch-indep ones

Miguel Landaeta nomadium at moszumanska.debian.org
Fri Sep 15 18:47:57 UTC 2017


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

nomadium pushed a commit to branch master
in repository ruby-psych.

commit b7c16a4a4ff5e05f93ac9ce18e2cb18d96f84839
Author: Miguel Landaeta <nomadium at debian.org>
Date:   Fri Sep 15 17:59:17 2017 +0100

    Separate arch specific build steps from arch-indep ones
---
 debian/bootstrap-psych-jar | 54 ----------------------------------------------
 debian/changelog           |  6 ++++++
 debian/rules               | 26 ++++++----------------
 3 files changed, 13 insertions(+), 73 deletions(-)

diff --git a/debian/bootstrap-psych-jar b/debian/bootstrap-psych-jar
deleted file mode 100755
index 7943423..0000000
--- a/debian/bootstrap-psych-jar
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/sh
-set -e
-
-# This script builds Psych java extension.
-# I just copied the commands emitted by Rake.
-# Should be useful when you are trying to build this package for the
-# first time in a new archiecture. Not ideal, but for subsequent package
-# builds since ruby-psych build depends on itself indirectly through jruby,
-# the script will not be needed and the psych jar will be pulled from
-# the previous release available in the archive.
-
-BOOTSTRAP_PATH=tmp/bootstrap/java/psych
-JRE=/usr/lib/jvm/default-java/jre
-CLASSPATH=
-MAVEN_REPO=/usr/share/maven-repo
-EXT_JAVA_SRC=ext/java
-EXT_JAVA_CLASSES=org/jruby/ext/psych
-
-for jar in resources rt sunrsasign jsse jce charsets jfr; do
-    CLASSPATH="${CLASSPATH}:${JRE}/lib/${jar}.jar"
-done
-
-CLASSPATH="${CLASSPATH}:${JRE}/classes"
-CLASSPATH="${CLASSPATH}:/usr/share/jruby/lib/jruby.jar"
-CLASSPATH="${CLASSPATH}:${MAVEN_REPO}/org/yaml/snakeyaml/1.x/snakeyaml-1.x.jar"
-
-mkdir -p "${BOOTSTRAP_PATH}"
-
-javac -extdirs "${JRE}/lib/ext:/usr/java/packages/lib/ext" \
-    -target 1.7                          \
-    -source 1.7                          \
-    -Xlint:unchecked                     \
-    -cp "${CLASSPATH}"                   \
-    -d "${BOOTSTRAP_PATH}"               \
-    "${EXT_JAVA_SRC}/PsychEmitter.java"  \
-    "${EXT_JAVA_SRC}/PsychLibrary.java"  \
-    "${EXT_JAVA_SRC}/PsychParser.java"   \
-    "${EXT_JAVA_SRC}/PsychToRuby.java"   \
-    "${EXT_JAVA_SRC}/PsychYamlTree.java"
-
-jar cf "${BOOTSTRAP_PATH}/psych.jar" \
-    -C "${BOOTSTRAP_PATH}" "${EXT_JAVA_CLASSES}/PsychEmitter\$1.class"            \
-    -C "${BOOTSTRAP_PATH}" "${EXT_JAVA_CLASSES}/PsychEmitter.class"               \
-    -C "${BOOTSTRAP_PATH}" "${EXT_JAVA_CLASSES}/PsychLibrary\$1.class"            \
-    -C "${BOOTSTRAP_PATH}" "${EXT_JAVA_CLASSES}/PsychLibrary\$YAMLEncoding.class" \
-    -C "${BOOTSTRAP_PATH}" "${EXT_JAVA_CLASSES}/PsychLibrary.class"               \
-    -C "${BOOTSTRAP_PATH}" "${EXT_JAVA_CLASSES}/PsychParser\$1.class"             \
-    -C "${BOOTSTRAP_PATH}" "${EXT_JAVA_CLASSES}/PsychParser.class"                \
-    -C "${BOOTSTRAP_PATH}" "${EXT_JAVA_CLASSES}/PsychToRuby\$ClassLoader.class"   \
-    -C "${BOOTSTRAP_PATH}" "${EXT_JAVA_CLASSES}/PsychToRuby\$ToRuby.class"        \
-    -C "${BOOTSTRAP_PATH}" "${EXT_JAVA_CLASSES}/PsychToRuby.class"                \
-    -C "${BOOTSTRAP_PATH}" "${EXT_JAVA_CLASSES}/PsychYamlTree.class"
-
-install -c "${BOOTSTRAP_PATH}/psych.jar" lib/psych.jar
diff --git a/debian/changelog b/debian/changelog
index 8d9dd98..fba1792 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+ruby-psych (2.2.4-5) UNRELEASED; urgency=medium
+
+  * Separate arch specific build steps from arch-indep ones.
+
+ -- Miguel Landaeta <nomadium at debian.org>  Fri, 15 Sep 2017 17:58:59 +0100
+
 ruby-psych (2.2.4-4) unstable; urgency=medium
 
   * Introduce libpsych-java binary package.
diff --git a/debian/rules b/debian/rules
index 3634e0f..fd61e69 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,34 +5,22 @@ export GEM2DEB_TEST_RUNNER = --check-dependencies
 %:
 	dh $@ --buildsystem=ruby --with ruby
 
-EXTRA_DEB_BUILD_OPTIONS := bootstrap
-bootstrap-psych-jar:
-	./debian/bootstrap-psych-jar
-	ls -ld lib/psych.jar
-
-ifeq (,$(findstring bootstrap,$(EXTRA_DEB_BUILD_OPTIONS)))
-override_dh_auto_build:
-	dh_auto_build
+override_dh_auto_build-indep:
 	jruby -S rake compile
-else
-override_dh_auto_build: bootstrap-psych-jar
-	dh_auto_build
-	RUBYLIB=$$RUBYLIB:$$PWD/lib jruby -S rake compile
-endif
 
-override_dh_auto_install:
+override_dh_auto_install-arch:
 	dh_auto_install
-	cd ./debian/ruby-psych/usr && rm -rf ./bin ./lib/ruby/vendor_ruby/psych.jar
+	cd ./debian/ruby-psych/usr && rm -rf ./bin
+
+override_dh_auto_install-indep:
 	jh_installlibs
 
-override_dh_auto_test:
-	dh_auto_test
+override_dh_auto_test-indep:
 	# ignore failures with jruby, unfortunately upstream is failing in
 	# similar way and this is expected.
 	# (e.g. https://travis-ci.org/ruby/psych/jobs/208654321)
 	RUBYLIB=$$RUBYLIB:$$PWD/lib jruby -S rake test || true
 
-override_dh_auto_clean:
-	dh_auto_clean
+override_dh_auto_clean-indep:
 	-jruby -S rake clean
 	-rm -r ./pkg/ ./lib/psych.jar ./tmp/

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-psych.git



More information about the Pkg-ruby-extras-commits mailing list