create_rootstrap.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/bin/bash
  2. set -e
  3. CURDIR=$PWD
  4. SCRIPTDIR=$(dirname $0)
  5. cd $SCRIPTDIR
  6. SCRIPTDIR=$PWD
  7. cd $CURDIR
  8. if [[ ! "$OUTPUT_FILE_NAME" == "/"* ]]; then
  9. cd $(dirname $OUTPUT_FILE_NAME)
  10. OUTPUT_FILE_NAME=$PWD/$OUTPUT_FILE_NAME
  11. cd $CURDIR
  12. fi
  13. $SCRIPTDIR/../scripts/create_tizen_gbs_conf -p "$GBS_PROFILE_NAME" -r "$GBS_ROOT_DIR" -b "$BASE_REPO" -m "$MAIN_REPO" -q "$QT_REPO" -f "$SCRIPTDIR/gbs.conf.template" -o "$OUTPUT_FILE_NAME"
  14. source $SCRIPTDIR/../common/qt_for_tizen_version
  15. if [ "$DELETE_GBS_CACHE" == "1" ]; then
  16. CACHE_DIR=$(find $GBS_ROOT_DIR/local/cache -name 'qt*' 2> /dev/null | head -1)
  17. if [ "$CACHE_DIR" != "" ]; then
  18. rm -rf $(dirname "$CACHE_DIR")
  19. fi
  20. rm -rf $GBS_ROOT_DIR/local/order/.repo.cache
  21. fi
  22. DUMMY_NAME=qt5Dummy
  23. if [ "$ROOTSTRAP_WITHOUT_QT" == "1" ]; then
  24. DUMMY_NAME=qt5DummyWithoutQt
  25. GBS_PROFILE_NAME="$GBS_PROFILE_NAME""_crosscompile"
  26. fi
  27. rm -rf $DUMMY_NAME
  28. mkdir -p $DUMMY_NAME/packaging
  29. cp $DUMMY_NAME.spec $DUMMY_NAME/packaging
  30. cd $DUMMY_NAME
  31. git init .
  32. git config user.email qtfortizen@tizen.org
  33. git add .
  34. git commit -m "init"
  35. git checkout -b $QT_FOR_TIZEN_PACKAGING_BRANCH
  36. gbs --conf $OUTPUT_FILE_NAME --debug build -A $BUILD_ARCHITECTURE -P $GBS_PROFILE_NAME --clean
  37. cd ..
  38. rm -rf $DUMMY_NAME
  39. cd $CURDIR