From 51ee7c61c7b019c94c424e7651ddc2ce9dd27b14 Mon Sep 17 00:00:00 2001 From: Ladios Jonquil Date: Thu, 16 Jan 2014 11:58:02 +0800 Subject: [PATCH 1/2] Update condition on downloading binary file(s) Since upstream v7.45-2, it requires binary files for both architectures again. This patch updates the condition on detecting whether we need both files or just one for the version we are building against. --- oab-java.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/oab-java.sh b/oab-java.sh index c732cb4..7d059c9 100755 --- a/oab-java.sh +++ b/oab-java.sh @@ -482,11 +482,11 @@ if [ "${JAVA_UPSTREAM}" == "sun-java6" ]; then else JAVA_EXT=.tar.gz fi -if grep -q ia32 ${WORK_PATH}/src/debian/rules; then - # Upstream still builds ia32 package, download both architectures +if grep -q 'srcdir.*:=.*$(arch)' ${WORK_PATH}/src/debian/rules; then + # Upstream requires binary files for both architectures JAVA_BINS="jdk-${JAVA_VER}u${JAVA_UPD}-linux-i586${JAVA_EXT} jdk-${JAVA_VER}u${JAVA_UPD}-linux-x64${JAVA_EXT}" else - # Upstream has removed ia32 package, just download the appropriate one + # Upstream requires binary file of the machine's architecture only if [ "${LSB_ARCH}" == "amd64" ]; then JAVA_BINS="jdk-${JAVA_VER}u${JAVA_UPD}-linux-x64${JAVA_EXT}" else From 70408f49e9e5b44820354b630220ca2c0c1060a7 Mon Sep 17 00:00:00 2001 From: Ladios Jonquil Date: Thu, 16 Jan 2014 13:21:58 +0800 Subject: [PATCH 2/2] Run upstream's preparing script if it exists Upstream v7.45-2 introduced a preparing script to download and inflate archives. If the version we are building against contains that script, then run it to inflate archives in order to build packages. --- oab-java.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/oab-java.sh b/oab-java.sh index 7d059c9..86b2391 100755 --- a/oab-java.sh +++ b/oab-java.sh @@ -562,6 +562,13 @@ BUILD_MESSAGE="Automated build for ${LSB_REL} using https://github.com/rraptorr/ # Change directory to the build directory cd ${WORK_PATH}/src +# Run upstream's preparing script if it exists +if [ -f prepare.sh ]; then + ncecho " [x] Inflating archives " + ./prepare.sh >> "$log" 2>&1 & + pid=$!;progress $pid +fi + # Update the changelog ncecho " [x] Updating the changelog " dch --distribution ${LSB_CODE} --force-distribution --newversion ${NEW_VERSION} --force-bad-version --urgency=${DEB_URGENCY} "${BUILD_MESSAGE}" >> "$log" 2>&1 &