[java-policy] 165/198: * Provide a /usr/share/java/java_defaults.mk makefile fragment for supported java architectures and versions.
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Wed Sep 23 07:49:41 UTC 2015
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository java-policy.
commit 784cb6529af6a501facd98f204bf00eb7a9e12c5
Author: Matthias Klose <doko at debian.org>
Date: Thu Aug 1 14:21:07 2013 +0000
* Provide a /usr/share/java/java_defaults.mk makefile fragment for
supported java architectures and versions.
---
debian/changelog | 2 ++
debian/java_defaults.mk | 23 +++++++++++++++++++++++
debian/rules | 8 ++++++--
3 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 6e34132..d73fac6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,8 @@ java-common (0.49) UNRELEASED; urgency=low
[ Matthias Klose ]
* Don't blindly update to OpenJDK7 on architectures where it is not
supported or not even built.
+ * Provide a /usr/share/java/java_defaults.mk makefile fragment for
+ supported java architectures and versions.
-- Matthias Klose <doko at debian.org> Sun, 30 Jun 2013 18:54:53 +0200
diff --git a/debian/java_defaults.mk b/debian/java_defaults.mk
new file mode 100644
index 0000000..4f4fd0c
--- /dev/null
+++ b/debian/java_defaults.mk
@@ -0,0 +1,23 @@
+
+# makefile fragment to define the macros java_default_version,
+# java{,5,6,7,8}_architectures
+
+java8_architectures =
+java7_architectures = alpha amd64 armel armhf arm64 i386 ia64 lpia \
+ powerpc ppc64 s390x sh4 sparc sparc64
+java6_architectures = $(java7_architectures) \
+ mips mipsel powerpcspe s390
+java5_architectures = $(java6_architectures) \
+ hppa m68k x32 kfreebsd-amd64 kfreebsd-i386 hurd-i386
+java_architectures = $(java5_architectures)
+
+_java_host_arch := $(if $(DEB_HOST_ARCH),$(DEB_HOST_ARCH),$(shell dpkg-architecture -qDEB_HOST_ARCH))
+ifneq (,$(filter $(_java_host_arch),$(java8_architectures)))
+ java_default_version = 8
+else ifneq (,$(filter $(_java_host_arch),$(java6_architectures)))
+ java_default_version = 7
+else ifneq (,$(filter $(_java_host_arch),$(java6_architectures)))
+ java_default_version = 6
+else ifneq (,$(filter $(_java_host_arch),$(java5_architectures)))
+ java_default_version = 5
+endif
diff --git a/debian/rules b/debian/rules
index bf25a31..f27d544 100755
--- a/debian/rules
+++ b/debian/rules
@@ -28,7 +28,9 @@ jvmdir = java-gcj
p_doc = openjdk-7-doc
-ifneq (,$(filter $(DEB_HOST_ARCH), alpha amd64 armel armhf i386 ia64 lpia powerpc ppc64 s390x sparc sh4))
+include debian/java_defaults.mk
+
+ifneq (,$(filter $(DEB_HOST_ARCH),$(java7_architectures)))
p_jre = openjdk-7-jre
p_jhl = openjdk-7-jre-headless
p_jdk = openjdk-7-jdk
@@ -38,7 +40,7 @@ ifneq (,$(filter $(DEB_HOST_ARCH), alpha amd64 armel armhf i386 ia64 lpia powerp
provides = java java2 java5 java6 java7
dversion = 1:1.7-$(jrel)
jvmdir = java-1.7.0-openjdk$(if $(DEB_HOST_MULTIARCH),-$(DEB_HOST_ARCH))
-else ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel powerpcspe s390))
+else ifneq (,$(filter $(DEB_HOST_ARCH),$(java6_architectures)))
p_jre = openjdk-6-jre
p_jhl = openjdk-6-jre-headless
p_jdk = openjdk-6-jdk
@@ -133,6 +135,8 @@ binary-indep: build-indep install-indep
dh_testdir -i
dh_testroot -i
dh_install -i
+ mkdir -p debian/java-common/usr/share/java
+ cp debian/java_defaults.mk debian/java-common/usr/share/java/.
mkdir -p debian/default-jdk-doc/usr/share/doc/default-jre-headless
ln -sf ../$(p_doc)/api debian/default-jdk-doc/usr/share/doc/default-jre-headless/api
ln -sf ../$(p_doc)/api debian/default-jdk-doc/usr/share/doc/default-jdk-doc/api
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/java-policy.git
More information about the pkg-java-commits
mailing list