X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gbsbuild.sh;h=633a2866dab399bbaa79756695f14e27ce5e5946;hb=af7778798364d4a7792b09ec6c608b72335c239d;hp=d9ab2462a0d2e522745c2328913c4b4f3f88a1a7;hpb=d0baf5ae6936a16de6a49588428204d8c386ac9e;p=platform%2Fupstream%2Fiotivity.git diff --git a/gbsbuild.sh b/gbsbuild.sh index d9ab246..633a286 100755 --- a/gbsbuild.sh +++ b/gbsbuild.sh @@ -30,8 +30,10 @@ cp -LR ./extlibs/tinycbor $sourcedir/tmp/extlibs 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 -R ./extlibs/sqlite3 $sourcedir/tmp/extlibs +cp -LR ./extlibs/sqlite3 $sourcedir/tmp/extlibs cp -R ./extlibs/timer $sourcedir/tmp/extlibs cp -R ./extlibs/rapidxml $sourcedir/tmp/extlibs cp -R ./resource $sourcedir/tmp @@ -40,18 +42,37 @@ cp ./extra_options.scons $sourcedir/tmp cp ./tools/tizen/*.spec ./tmp/packaging cp ./tools/tizen/*.manifest ./tmp/packaging cp ./SConstruct ./tmp +cp ./LICENSE.md ./tmp # copy dependency RPMs and conf files for tizen build cp ./tools/tizen/*.rpm ./tmp cp ./tools/tizen/.gbs.conf ./tmp +cp ./tools/tizen/*.rpm $sourcedir/tmp/service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample +cp ./tools/tizen/.gbs.conf ./tmp/service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample cp -R $sourcedir/iotivity.pc.in $sourcedir/tmp 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 ./ @@ -61,16 +82,27 @@ if [ ! -d .git ]; then 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 --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 + +rm -rf tmp cd $sourcedir rm -rf $sourcedir/tmp