rm -rf $name-$version
-echo $1
-export ES_SAMPLE=$1
-
builddir=`pwd`
sourcedir=`pwd`
rm -rf $sourcedir/tmp/extlibs/tinycbor/tinycbor/.git
cp -R ./extlibs/cjson $sourcedir/tmp/extlibs
+cp -R ./extlibs/mbedtls $sourcedir/tmp/extlibs
cp -R ./extlibs/gtest $sourcedir/tmp/extlibs
cp -R ./extlibs/tinydtls $sourcedir/tmp/extlibs
cp -LR ./extlibs/sqlite3 $sourcedir/tmp/extlibs
cd $sourcedir/tmp
echo `pwd`
+if [ -d ./extlibs/mbedtls/mbedtls ];then
+ cd ./extlibs/mbedtls/mbedtls
+ git reset --hard ad249f509fd62a3bbea7ccd1fef605dbd482a7bd ; git apply ../ocf.patch
+ cd -
+ rm -rf ./extlibs/mbedtls/mbedtls/.git*
+
+else
+ echo ""
+ echo "*********************************** Error: ****************************************"
+ echo "* Please download mbedtls using the following command: *"
+ echo "* $ git clone https://github.com/ARMmbed/mbedtls.git extlibs/mbedtls/mbedtls *"
+ echo "***********************************************************************************"
+ echo ""
+ exit
+fi
rm -rf ./extlibs/tinycbor/tinycbor/.git*
+
# Initialize Git repository
if [ ! -d .git ]; then
git init ./
git commit -m "Initial commit"
fi
+withtcp=0
+withcloud=0
+if [ "WITH_TCP" = "$1" ] || [ "WITH_TCP" = "$2" ];then
+ withtcp=1
+fi
+if [ "WITH_CLOUD" = "$1" ] || [ "WITH_CLOUD" = "$2" ];then
+ withcloud=1
+fi
+
echo "Calling core gbs build command"
-gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-OIC --include-all --repository ./"
+gbscommand="gbs build -A armv7l --define 'WITH_TCP $withtcp' --define 'WITH_CLOUD $withcloud' -B ~/GBS-ROOT-OIC --include-all --repository ./"
echo $gbscommand
if eval $gbscommand; then
- echo "Build is successful"
+ echo "Build is successful"
else
- echo "Build failed!"
- exit 1
+ echo "Build failed!"
+ exit 1
fi
-# Build EasySetup App. if ES_ON is entered on command prompt
-if echo $ES_SAMPLE|grep -qi '^ES_ON$'; then
- cd service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample
- echo `pwd`
- echo "EasySetup Sample Build is enabled"
-
- # Initialize Git repository for EnrolleeSample
- if [ ! -d .git ]; then
- git init ./
- git config user.email "you@example.com"
- git config user.name "Your Name"
- git add ./
- git commit -m "Initial commit"
- fi
- echo "Calling EasySetup Sample gbs build command"
- gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-OIC --include-all --repository ./"
- echo $gbscommand
- if eval $gbscommand; then
- echo "EasySetup Sample build is successful"
- else
- echo "EasySetup Sample build is failed."
- exit 1
- fi
-else
- echo "EasySetup Sample Build is not enabled"
-fi
rm -rf tmp
cd $sourcedir