echo `pwd`
+# Clean tmp directory.
+rm -rf ./tmp
+
+# Create directory structure for GBS Build
mkdir ./tmp
mkdir ./tmp/extlibs/
mkdir ./tmp/packaging
cp -R ./build_common $sourcedir/tmp
cp -R ./examples $sourcedir/tmp
-cp -R ./extlibs/cereal $sourcedir/tmp/extlibs
+
+# tinycbor is available as soft-link, so copying with 'dereference' option.
+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/gtest $sourcedir/tmp/extlibs
cp -R ./extlibs/tinydtls $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
cp -R ./service $sourcedir/tmp
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 -R $sourcedir/iotivity.pc.in $sourcedir/tmp
+
cd $sourcedir/tmp
echo `pwd`
-rm -rf ./extlibs/cereal/cereal/.git*
+rm -rf ./extlibs/tinycbor/tinycbor/.git*
# Initialize Git repository
if [ ! -d .git ]; then
fi
echo "Calling core gbs build command"
-gbscommand="gbs build -A armv7l -B ~/GBS-ROOT --include-all --repository ./"
+gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-OIC --include-all --repository ./"
echo $gbscommand
if eval $gbscommand; then
echo "Build is successful"
else
echo "Build failed!"
+ exit 1
fi
cd $sourcedir
rm -rf $sourcedir/tmp
+
+exit 0