- case "${DEB_BUILD_ARCH:-$DEB_BUILD_GNU_TYPE}" in
- i386|i486-linux-gnu)
- case "$archive_name" in
- "jdk-6u"[0-9][0-9]"-linux-i586.bin") # SUPPORTED
- j2se_version=1.6.0+update${archive_name:6:2}${revision}
- j2se_expected_min_size=130 #Mb
- j2se_priority=315
- found=true
- ;;
- "jdk-7u"[0-9]"-linux-i586.tar.gz") # SUPPORTED
- j2se_version=1.7.0+update${archive_name:6:1}${revision}
- j2se_expected_min_size=190 #Mb
- j2se_priority=317
- found=true
- ;;
- esac
- ;;
- amd64|x86_64-linux-gnu)
- case "$archive_name" in
- "jdk-6u"[0-9][0-9]"-linux-x64.bin") # SUPPORTED
- j2se_version=1.6.0+update${archive_name:6:2}${revision}
- j2se_expected_min_size=130 #Mb
- j2se_priority=315
- found=true
- ;;
- "jdk-7u"[0-9]"-linux-x64.tar.gz") # SUPPORTED
- j2se_version=1.7.0+update${archive_name:6:1}${revision}
- j2se_expected_min_size=180 #Mb
- j2se_priority=317
- found=true
- ;;
- esac
- ;;
- esac
- if [[ -n "$found" ]]; then
- cat << EOF
+ case "${DEB_BUILD_ARCH:-$DEB_BUILD_GNU_TYPE}" in
+ i386|i486-linux-gnu)
+ if [[ "$j2se_arch" != "i586" ]]; then compatible=0; fi
+ ;;
+ amd64|x86_64-linux-gnu)
+ if [[ "$j2se_arch" != "x64" ]]; then compatible=0; fi
+ ;;
+ esac
+
+ if [[ $compatible == 0 ]]
+ then
+ echo "The archive $archive_name is not supported on the ${DEB_BUILD_ARCH} architecture"
+ return
+ fi
+
+
+ cat << EOF