summaryrefslogtreecommitdiffhomepage
path: root/pkg/rpm/Makefile.jsc8
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2019-09-16 13:28:06 +0300
committerAndrei Belov <defan@nginx.com>2019-09-16 13:28:06 +0300
commit6f1f3b48b2af56c96825dbcd149771ace67404ee (patch)
treea8a9c2c4fac9984f8ce1eae79709293575e39324 /pkg/rpm/Makefile.jsc8
parent2a6af1d21407cffbb687fffa8b6a1e7c8a273ddd (diff)
downloadunit-6f1f3b48b2af56c96825dbcd149771ace67404ee.tar.gz
unit-6f1f3b48b2af56c96825dbcd149771ace67404ee.tar.bz2
Packages: added explicit library path for Java on RPM based distros.
This helps to avoid using excessive strictness in RPATH of Java modules.
Diffstat (limited to 'pkg/rpm/Makefile.jsc8')
-rw-r--r--pkg/rpm/Makefile.jsc85
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/rpm/Makefile.jsc8 b/pkg/rpm/Makefile.jsc8
index 919e8f06..58e2368b 100644
--- a/pkg/rpm/Makefile.jsc8
+++ b/pkg/rpm/Makefile.jsc8
@@ -6,7 +6,9 @@ MODULE_SUMMARY_jsc8= Java 8 module for NGINX Unit
MODULE_VERSION_jsc8= $(VERSION)
MODULE_RELEASE_jsc8= 1
-MODULE_CONFARGS_jsc8= java --module=java8 --home=/usr/lib/jvm/java-1.8.0 --jars=/usr/share/unit-jsc-common/
+JAVA_ARCH_jsc8= $(shell /usr/lib/jvm/java-1.8.0/bin/java -XshowSettings 2>&1 | grep -F -e os.arch | sed -e 's/^.*= //')
+
+MODULE_CONFARGS_jsc8= java --module=java8 --home=/usr/lib/jvm/java-1.8.0 --lib-path=/usr/lib/jvm/jre-1.8.0/lib/$(JAVA_ARCH_jsc8)/server --jars=/usr/share/unit-jsc-common/
MODULE_MAKEARGS_jsc8= java8
MODULE_INSTARGS_jsc8= java8-install
@@ -18,6 +20,7 @@ BUILD_DEPENDS+= $(BUILD_DEPENDS_jsc8)
define MODULE_DEFINITIONS_jsc8
Requires: unit-jsc-common == $(MODULE_VERSION_jsc_common)-$(MODULE_RELEASE_jsc_common)%{?dist}.ngx
+Requires: java-1.8.0-headless
endef
export MODULE_DEFINITIONS_jsc8