[pkg-java] r17106 - trunk/java-common/debian

Matthias Klose doko at alioth.debian.org
Thu Aug 1 14:21:07 UTC 2013


Author: doko
Date: 2013-08-01 14:21:07 +0000 (Thu, 01 Aug 2013)
New Revision: 17106

Added:
   trunk/java-common/debian/java_defaults.mk
Modified:
   trunk/java-common/debian/changelog
   trunk/java-common/debian/rules
Log:
  * Provide a /usr/share/java/java_defaults.mk makefile fragment for
    supported java architectures and versions.


Modified: trunk/java-common/debian/changelog
===================================================================
--- trunk/java-common/debian/changelog	2013-07-30 23:15:04 UTC (rev 17105)
+++ trunk/java-common/debian/changelog	2013-08-01 14:21:07 UTC (rev 17106)
@@ -23,6 +23,8 @@
   [ 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
 

Added: trunk/java-common/debian/java_defaults.mk
===================================================================
--- trunk/java-common/debian/java_defaults.mk	                        (rev 0)
+++ trunk/java-common/debian/java_defaults.mk	2013-08-01 14:21:07 UTC (rev 17106)
@@ -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

Modified: trunk/java-common/debian/rules
===================================================================
--- trunk/java-common/debian/rules	2013-07-30 23:15:04 UTC (rev 17105)
+++ trunk/java-common/debian/rules	2013-08-01 14:21:07 UTC (rev 17106)
@@ -28,7 +28,9 @@
 
 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 @@
   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 @@
 	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




More information about the pkg-java-commits mailing list