[jruby] 08/11: Update d/rules file

Miguel Landaeta nomadium at moszumanska.debian.org
Sat Feb 11 18:45:10 UTC 2017


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

nomadium pushed a commit to branch experimental
in repository jruby.

commit 36e3183d60648bc784abd45d50f590ebf50b2a3e
Author: Miguel Landaeta <nomadium at debian.org>
Date:   Sat Feb 11 16:32:42 2017 +0000

    Update d/rules file
---
 debian/changelog              |   3 ++
 debian/jruby.docs             |   5 --
 debian/jruby.examples         |   1 +
 debian/jruby.links            |  13 +++---
 debian/jruby.poms             |  35 ++++++++++++--
 debian/maven.cleanIgnoreRules |   1 +
 debian/maven.ignoreRules      |  31 ++++++++++---
 debian/maven.publishedRules   |   1 +
 debian/maven.rules            |  15 ++++--
 debian/rules                  | 103 ++++++++++++++++++++----------------------
 debian/source/local-options   |   1 -
 11 files changed, 127 insertions(+), 82 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 93958cd..f40ffce 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -47,6 +47,9 @@ jruby (9.1.6.0-1~exp1) UNRELEASED; urgency=medium
   * Rework all the patches, almost all of them were dropped since they
     were not necessary anymore. Also, upstream switched their build system
     to polyglot-maven, so new ones were introduced.
+  * Update d/rules.
+  * Drop jruby-core-noasm Maven artifact, is not provided by upstream
+    anymore.
 
  -- Miguel Landaeta <nomadium at debian.org>  Sat, 11 Feb 2017 16:18:12 +0000
 
diff --git a/debian/jruby.docs b/debian/jruby.docs
deleted file mode 100644
index 2450643..0000000
--- a/debian/jruby.docs
+++ /dev/null
@@ -1,5 +0,0 @@
-target/package/docs/CodeConventions.txt
-target/package/docs/README.cext
-target/package/docs/README.coverage
-target/package/docs/README.test.md
-target/package/samples
diff --git a/debian/jruby.examples b/debian/jruby.examples
new file mode 100644
index 0000000..4c54aac
--- /dev/null
+++ b/debian/jruby.examples
@@ -0,0 +1 @@
+target/package/samples/*
diff --git a/debian/jruby.links b/debian/jruby.links
index cdf9cfa..abefe2e 100644
--- a/debian/jruby.links
+++ b/debian/jruby.links
@@ -5,10 +5,6 @@ usr/share/jruby/bin/testrb             usr/bin/jruby-testrb
 
 usr/share/jruby/lib/jruby.jar          usr/share/java/jruby.jar
 
-usr/share/javascript/jquery/jquery.js  usr/share/jruby/lib/ruby/2.0/rdoc/generator/template/darkfish/js/jquery.js
-usr/share/jruby/lib/ruby/2.0/rdoc.rb   usr/share/jruby/lib/ruby/shared/rdoc.rb
-usr/share/jruby/lib/ruby/2.0/rdoc      usr/share/jruby/lib/ruby/shared/rdoc
-
 usr/share/jruby/bin/ast                usr/bin/ast
 usr/share/jruby/bin/jgem               usr/bin/jgem
 usr/share/jruby/bin/jirb               usr/bin/jirb
@@ -18,6 +14,9 @@ usr/share/jruby/bin/jrubyc             usr/bin/jrubyc
 
 usr/bin/ng-nailgun                     usr/share/jruby/tool/nailgun/ng
 
-usr/lib/i386-linux-gnu/jni/libjffi-1.2.so     usr/share/jruby/lib/jni/i386-Linux/libjffi-1.2.so
-usr/lib/x86_64-linux-gnu/jni/libjffi-1.2.so   usr/share/jruby/lib/jni/x86_64-Linux/libjffi-1.2.so
-usr/lib/arm-linux-gnueabi/jni/libjffi-1.2.so  usr/share/jruby/lib/jni/arm-Linux/libjffi-1.2.so
+usr/lib/i386-linux-gnu/jni/libjffi-1.2.so         usr/share/jruby/lib/jni/i386-Linux/libjffi-1.2.so
+usr/lib/x86_64-linux-gnu/jni/libjffi-1.2.so       usr/share/jruby/lib/jni/x86_64-Linux/libjffi-1.2.so
+usr/lib/arm-linux-gnueabi/jni/libjffi-1.2.so      usr/share/jruby/lib/jni/arm-Linux/libjffi-1.2.so
+usr/lib/aarch64-linux-gnu/jni/libjffi-1.2.so      usr/share/jruby/lib/jni/aarch64-Linux/libjffi-1.2.so
+usr/lib/powerpc64-linux-gnu/jni/libjffi-1.2.so    usr/share/jruby/lib/jni/ppc64-Linux/libjffi-1.2.so
+usr/lib/powerpc64le-linux-gnu/jni/libjffi-1.2.so  usr/share/jruby/lib/jni/ppc64le-Linux/libjffi-1.2.so
diff --git a/debian/jruby.poms b/debian/jruby.poms
index 0081c75..dfec934 100644
--- a/debian/jruby.poms
+++ b/debian/jruby.poms
@@ -1,9 +1,34 @@
+# 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
-core/pom.xml
+core/pom.xml --java-lib
 lib/pom.xml
-maven/jruby-stdlib/pom.xml
-maven/jruby-noasm/pom.xml
-ext/readline/pom.xml
-maven/jruby-dist/pom.xml
+maven/pom.xml
+maven/jruby/pom.xml
 maven/jruby-complete/pom.xml
 test/pom.xml
diff --git a/debian/maven.cleanIgnoreRules b/debian/maven.cleanIgnoreRules
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/debian/maven.cleanIgnoreRules
@@ -0,0 +1 @@
+
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
index 87e8393..8570291 100644
--- a/debian/maven.ignoreRules
+++ b/debian/maven.ignoreRules
@@ -1,11 +1,28 @@
+com.github.jnr jffi jar * native *
+com.headius coro-mock * * * *
+com.headius jsr292-mock * * * *
+de.saumya.mojo gem-maven-plugin * * * *
+io.tesla.polyglot tesla-polyglot-maven-plugin * s/.*/debian/ * *
+org.apache.maven.plugins maven-assembly-plugin * * * *
+org.apache.maven.plugins maven-changelog-plugin * * * *
+org.apache.maven.plugins maven-checkstyle-plugin * * * *
+org.apache.maven.plugins maven-deploy-plugin * * * *
+org.apache.maven.plugins maven-enforcer-plugin * * * *
+org.apache.maven.plugins maven-javadoc-plugin * * * *
+org.apache.maven.plugins maven-jxr-plugin * * * *
+org.apache.maven.plugins maven-pmd-plugin * * * *
+org.apache.maven.plugins maven-project-info-reports-plugin * * * *
+org.apache.maven.plugins maven-release-plugin * * * *
 org.apache.maven.plugins maven-scm-publish-plugin * * * *
+org.apache.maven.plugins maven-site-plugin * * * *
+org.apache.maven.plugins maven-source-plugin * * * *
+org.apache.maven.plugins maven-surefire-plugin * * * *
+org.apache.maven.plugins maven-surefire-report-plugin * * * *
 org.codehaus.mojo buildnumber-maven-plugin * * * *
-de.saumya.mojo gem-maven-plugin * * * *
-io.tesla.polyglot tesla-polyglot-maven-plugin
-
+org.codehaus.mojo cobertura-maven-plugin * * * *
+org.codehaus.mojo findbugs-maven-plugin * * * *
+org.codehaus.mojo taglist-maven-plugin * * * *
+org.torquebox.mojo mavengem-wagon * * * *
 org.jruby joda-timezones * * * *
-com.headius coro-mock * * * *
-com.headius jsr292-mock * * * *
-com.github.jnr jffi jar * native *
-
+org.slf4j slf4j-simple * * * *
 rubygems * * * * *
diff --git a/debian/maven.publishedRules b/debian/maven.publishedRules
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/debian/maven.publishedRules
@@ -0,0 +1 @@
+
diff --git a/debian/maven.rules b/debian/maven.rules
index 1734ff2..c01db5c 100644
--- a/debian/maven.rules
+++ b/debian/maven.rules
@@ -1,5 +1,14 @@
+
+org.jruby yecht jar s/.*/debian/ s/jruby// *
+com.github.jnr jnr-netdb jar s/.*/debian/ * *
+com.headius invokebinder jar s/.*/debian/ * *
+com.headius options jar s/.*/debian/ * *
+com.headius unsafe-mock jar s/.*/debian/ * *
+jline jline jar s/2\..*/2.x/ * *
+joda-time joda-time jar s/.*/debian/ * *
+junit junit jar s/.*/4.x/ * *
 org.jruby.extras bytelist jar s/.*/debian/ * *
 org.yaml snakeyaml jar s/.*/1.x/ * *
-junit junit jar s/.*/4.x/ * *
-jline jline jar s/2\..*/2.x/ * *
-org.jruby yecht jar s/.*/debian/ s/jruby// *
+s/org.apache.felix/org.osgi/ org.osgi.core * * * *
+s/ant/org.apache.ant/ * * s/.*/debian/ * *
+org.ow2.asm * * s/.*/debian/ * *
diff --git a/debian/rules b/debian/rules
index 8b09402..2ffae03 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,77 +2,72 @@
 
 include /usr/share/dpkg/default.mk
 
-export JAVA_HOME=/usr/lib/jvm/default-java
-export LC_ALL=en_US.UTF-8
-
 %:
 	dh $@ --buildsystem=maven
 
 override_dh_auto_clean:
 	dh_auto_clean
-	rm -f lib/jruby.jar bin/jruby
-	rm -rf -- ./rubyspec_temp/
-	cd lib/ruby/shared/ && rm -rf *openssl* ./org
+	@rm -f ./lib/jruby.jar ./lib/jruby-truffle.jar
+	@rm -f ./bin/jruby ./core/src/main/java/org/jruby/runtime/Constants.java
+	# restore POM files to a pre-patched state if there are backups
+	-test -d ./bak && ( cd ./bak \
+				&& cp ./pom.xml      ..      \
+				&& cp ./core/pom.xml ../core \
+				&& cp ./lib/pom.xml  ../lib  )
+	@rm -rf ./bak
+	-cd ./lib/ruby/stdlib/ && rm -r psych* *openssl* org/ jar* ./rubygems_plugin.rb
+	-rm ./core/dependency-reduced-pom.xml ./link* test/jruby/testapp/testapp
+	-find . -name pom.xml.save -delete
+	mh_clean
+
+override_dh_auto_configure:
+	mkdir -p ./bak/lib ./bak/core
+	# save POM files before being patched, otherwise sometimes they are not cleanly
+	# restored this prevent twice in a row builds
+	cp ./pom.xml ./bak && cp ./core/pom.xml ./bak/core && cp ./lib/pom.xml ./bak/lib
+	dh_auto_configure
 
 override_dh_auto_build:
-	mkdir -p lib/jni
+	dh_auto_build
 	dh_auto_build -- -Pcomplete
 	dh_auto_build -- -Pdist package
+	dh_auto_build -- -Pall
 
-# this got ugly fast
-# there must be a better way to do this
+DIST_TARBALL=./maven/jruby-dist/target/jruby-dist-$(DEB_VERSION_UPSTREAM)-bin.tar.gz
+DIST_TARGET_DIR=./target/package/
 override_dh_prep:
 	dh_prep
-	mkdir -p target/package
-	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.bash jruby
-	cd target/package/bin && chmod 0755 *
-	rm target/package/lib/ruby/2.0/rdoc/generator/template/darkfish/js/jquery.js
-	mkdir -p target/package/lib/ruby/gems/shared/
-	cd target/package/lib/ruby/gems/shared/ && mkdir -p cache gems specifications
-	rm -rf target/package/tool/nailgun/*
-	for platform in i386-Linux x86_64-Linux arm-Linux; do \
-		mkdir -p target/package/lib/jni/$$platform ; \
-	done
+	mkdir -p $(DIST_TARGET_DIR)
+	tar zxf $(DIST_TARBALL) -C $(DIST_TARGET_DIR) --strip-components=1
+	cd $(DIST_TARGET_DIR) && (                                                \
+		mv ./bin/jruby.bash ./bin/jruby                                   \
+		&& cp ./bin/jruby ../../bin                                       \
+		&& chmod 0755 ./bin/*                                             \
+		&& mkdir -p ./lib/jni/                                            \
+		&& find ./lib/ruby/truffle -name LICENSE -delete                  \
+	        && cp -a /usr/lib/ruby/2.3.0/psych* ./lib/ruby/stdlib/            \
+		&& sed '1d' -i ./lib/ruby/truffle/jruby+truffle/bin/jruby+truffle \
+		&& rm -r ./tool/nailgun/*                                         )
 
 override_dh_auto_install:
-	mh_installpom -pjruby --no-parent core/pom.xml
-	mh_installjar -pjruby --java-lib  core/pom.xml core/target/jruby-core-$(DEB_VERSION_UPSTREAM).jar
-	for subp in noasm stdlib complete; do \
-		mh_installpom -pjruby --no-parent maven/jruby-$$subp/pom.xml ; \
-	done
-	mh_installjar -pjruby maven/jruby-stdlib/pom.xml maven/jruby-stdlib/target/jruby-stdlib-$(DEB_VERSION_UPSTREAM).jar
-	mh_installjar -pjruby maven/jruby-complete/pom.xml maven/jruby-complete/target/jruby-complete-$(DEB_VERSION_UPSTREAM).jar
-
-override_dh_install:
-	dh_install
-	dh_install core/target/jruby-core-$(DEB_VERSION_UPSTREAM)-noasm.jar \
-		usr/share/maven-repo/org/jruby/jruby-core/$(DEB_VERSION_UPSTREAM)
-
-override_dh_link:
-	dh_link
-	dh_link usr/share/maven-repo/org/jruby/jruby-core/$(DEB_VERSION_UPSTREAM)/jruby-core-$(DEB_VERSION_UPSTREAM)-noasm.jar \
-		usr/share/maven-repo/org/jruby/jruby-core/debian/jruby-core-debian-noasm.jar
+	dh_auto_install
+	mh_installpom -pjruby ./maven/pom.xml
+	mh_installpom -pjruby ./maven/jruby-complete/pom.xml
+	mh_installjar -pjruby ./maven/jruby-complete/pom.xml \
+		./maven/jruby-complete/target/jruby-complete-$(DEB_VERSION_UPSTREAM).jar
+	mh_installpom -pjruby ./maven/jruby/pom.xml
+	mh_installjar -pjruby ./maven/jruby/pom.xml \
+		./maven/jruby/target/jruby-$(DEB_VERSION_UPSTREAM).jar
 
 override_dh_auto_test:
 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
-	# setup links to jruby-openssl library, so tests relying on that can work
-	for file in /usr/share/jruby/lib/ruby/shared/*ssl* \
-	/usr/share/jruby/lib/ruby/shared/*org*; do \
-		ln -s $$file ./lib/ruby/shared ; \
-	done
-
-	dh_auto_test -- -Ptest test
-	./bin/jruby spec/mspec/bin/mspec ci
-	./bin/jruby -S ./bin/rake spec:ruby:fast
-	# many tests are broken in test:extended, help is needed to debug them
-	#./bin/jruby -S ./bin/rake test:extended
-
-	# remove links to jruby-openssl library
-	for file in ./lib/ruby/shared/*ssl* ./lib/ruby/shared/*org*; do \
-		unlink $$file ; \
-	done
+	cp -a /usr/lib/ruby/2.3.0/psych* ./lib/ruby/stdlib/
+	# to-do: package psych java extension
+	-dh_auto_build -- package -B -Dinvoker.skip=false -Prake -Dtask=test:mri
+	# these tests will be enabled once the following gems are packaged:
+        # jar-dependencies and recent jruby-openssl (>= 0.9.17)
+#	-dh_auto_build -- package -B -Dinvoker.skip=false -Prake -Dtask=test:jruby
+	dh_auto_build -- package -B -Dinvoker.skip=false -Prake -Dtask=spec:jruby
 endif
 
 get-orig-source:
diff --git a/debian/source/local-options b/debian/source/local-options
deleted file mode 100644
index 4aceb10..0000000
--- a/debian/source/local-options
+++ /dev/null
@@ -1 +0,0 @@
-unapply-patches

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