Support strip depdning on gcc version from build.info file
[scm/meta/abs.git] / build.template
index d0adeeb..1a749f0 100644 (file)
@@ -49,14 +49,23 @@ done
 echo $tizen_studio_distribution >> $SHARE_ROOT/tizen_studio_distribution
 
 rs_list=`su - build -c "tizen list rootstrap | grep ${PROFILE}-.*.core.private.* | cut -d ' ' -f 1"`
-echo $rs_list >> $SHARE_ROOT/rsver
+#FIXME: remove hard-coded expression
+if [ "${PROFILE}" = "da-hfp" ]; then
+  rs_list=`su - build -c "tizen list rootstrap | grep ${PROFILE}-.*device.core.private.* | cut -d ' ' -f 1"`
+fi
+echo $rs_list > $SHARE_ROOT/rsver
+if [[ ! $rs_list =~ [0-9]{8}_[0-9] ]]; then
+  conf=`cat ${SDK_PATH}/tools/smart-build-interface/plugins/${rs_list}.xml`
+  dateversion=`echo $conf | sed "s/.*(\([0-9]\{8\}_[0-9]\{1\}\).*/\1/"`
+  echo ${rs_list}.${dateversion} > $SHARE_ROOT/rsver
+fi
 
 for rs in $rs_list; do
   echo "BUILDING START TIME: `date`"
   #if [[ $rs == *"64.core"* ]]; then
   #  echo "SKIP! 64-bit not supported!"; continue;
   #else
-    su - build -c "${ABS_CMD} build -r $rs -w ${BUILD_ROOT}/${PACKAGE} -s ABS -c ${BUILD_MODE} ${PARALLEL_JOBS}"
+    su - build -c "${ABS_CMD} build -r $rs -w ${BUILD_ROOT}/${PACKAGE} -s ABS -c ${BUILD_MODE} ${PARALLEL_JOBS} --profile-to-search ${PROFILE}"
   #fi
   mv ${TMP_DIR}/*.tpk ${SHARE_ROOT}
   ret=$?; echo "BUILDING FINISH TIME: `date`"
@@ -66,15 +75,15 @@ for rs in $rs_list; do
 done
 
 #FIXME: Check 64 bit rootstraps for mobile profile.
-if [[ $BUILD_TYPE = "SUBMIT" ]] && [[ $PROFILE = "mobile" ]]; then
-  if [[ $rs_list = *"device64"* ]] && [[ $rs_list = *"emulator64"* ]]; then
-    echo "OK. $PROFILE have 64 bit rootstraps"
-  else
-    echo "NOK. $PROFILE does not have 64 bit rootstraps"
-    echo "$PROFILE does not have 64 bit rootstraps" > ${SHARE_ROOT}/build_rootstrap_check.log
-    _clear 9
-  fi  
-fi
+#if [[ $BUILD_TYPE = "SUBMIT" ]] && [[ $PROFILE = "mobile" ]]; then
+#  if [[ $rs_list = *"device64"* ]] && [[ $rs_list = *"emulator64"* ]]; then
+#    echo "OK. $PROFILE have 64 bit rootstraps"
+#  else
+#    echo "NOK. $PROFILE does not have 64 bit rootstraps"
+#    echo "$PROFILE does not have 64 bit rootstraps" > ${SHARE_ROOT}/build_rootstrap_check.log
+#    _clear 9
+#  fi  
+#fi
 
 _clear 0
 su - build -c "df -hT"