]> git.ozlabs.org Git - next-scripts/blobdiff - common.sh
do_build: use the Debian standard cross compilers
[next-scripts] / common.sh
index 1cd814fea35e036d1cfcc66746eb49260dda96cd..827015a0190347ec25cfcb863eecc466ef13e8ae 100644 (file)
--- a/common.sh
+++ b/common.sh
@@ -6,21 +6,30 @@
 [ "$_next_common_included" ] && return 0
 _next_common_included=1
 
-bin_dir="$(dirname $0)"
+bin_dir=$(dirname "$0")
 
-LOG_FILE="../merge.log"
+[ "$LOG_FILE" ] || LOG_FILE="../merge.log"
 SHA1_FILE="../SHA1s"
 CTRL_FILE="../etc/control"
 
-build_host="alpine1.ozlabs.ibm.com"
-build_dir="/home/michael/linux-next/tmpfs/next"
-gcc_version="4.9.3"
-j_factor=640
-ssh_key_file="~/work/topics/korg/ssh/korg-mpe"
-gpg_key="C8E1A580"
+build_host="ash"
+build_dir="/home/sfr/next/next"
+gcc_version="4.9.0"
+j_factor=$(nproc)
+gpg_key=89F91C0A41D5C07A
+kup_gpg_key=015042F34957D06C
 
-[ "$NEXT_BUILD_HOST" ] && build_host="$NEXT_BUILD_HOST"
+[ "$NEXT_BUILD_HOST" ] && {
+       build_host="$NEXT_BUILD_HOST"
+       [ "$build_host" = "none" ] && build_host=""
+}
 [ "$NEXT_BUILD_DIR" ] && build_dir="$NEXT_BUILD_DIR"
+[ "$NEXT_GCC_VERSION" ] && gcc_version="$NEXT_GCC_VERSION"
+gcc_ppc_version=$gcc_version
+[ "$NEXT_GCC_PPC_VERSION" ] && gcc_ppc_version="$NEXT_GCC_PPC_VERSION"
+gcc_ppcle_version=$gcc_ppc_version
+[ "$NEXT_GCC_PPCLE_VERSION" ] && gcc_ppcle_version="$NEXT_GCC_PPCLE_VERSION"
+[ "$NEXT_J_FACTOR" ] && j_factor="$NEXT_J_FACTOR"
 
 [ -n "$1" ] && {
        build_host="$1"
@@ -31,7 +40,11 @@ gpg_key="C8E1A580"
        shift
 }
 
-export NEXT_BUILD_HOST="$build_host"
+export NEXT_BUILD_HOST="${build_host:-none}"
 export NEXT_BUILD_DIR="$build_dir"
+export NEXT_GCC_VERSION="$gcc_version"
+export NEXT_GCC_PPC_VERSION="$gcc_ppc_version"
+export NEXT_GCC_PPCLE_VERSION="$gcc_ppcle_version"
+export NEXT_J_FACTOR="$j_factor"
 
 true