3 spec=`ls ./resource/csdk/stack/samples/tizen/build/packaging/*.spec`
4 version=`rpm --query --queryformat '%{version}\n' --specfile $spec`
6 name=`echo $name|cut -d" " -f 1`
7 version=`echo $version|cut -d" " -f 1`
12 export TARGET_TRANSPORT=$1
18 export BUILD_SAMPLE=$3
29 echo $TARGET_TRANSPORT
42 cp -R ./extlibs/tinycbor $sourcedir/tmp/extlibs
43 cp -R ./extlibs/cjson $sourcedir/tmp/extlibs
44 cp -R ./extlibs/tinydtls $sourcedir/tmp/extlibs
45 cp -R ./extlibs/timer $sourcedir/tmp/extlibs
46 cp -R ./extlibs/rapidxml $sourcedir/tmp/extlibs
47 cp -R ./resource/csdk/stack/samples/tizen/build/packaging/*.spec $sourcedir/tmp/packaging
48 cp -R ./resource $sourcedir/tmp/
49 cp -R ./build_common/external_libs.scons $sourcedir/tmp/
52 cd ./resource/csdk/stack/samples/tizen/build/
54 cp -R ./* $sourcedir/tmp/
55 rm -f $sourcedir/tmp/SConscript
56 cp SConstruct $sourcedir/tmp/
57 cp scons/SConscript $sourcedir/tmp/scons/
59 mkdir -p $sourcedir/tmp/iotivityconfig
60 cd $sourcedir/build_common/
61 cp -R ./iotivityconfig/* $sourcedir/tmp/iotivityconfig/
62 cp -R ./SConscript $sourcedir/tmp/
69 # Initialize Git repository
70 if [ ! -d .git ]; then
72 git config user.email "you@example.com"
73 git config user.name "Your Name"
75 git commit -m "Initial commit"
78 echo "Calling core gbs build command"
79 gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-RI --include-all --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --define 'ROUTING $6' --repository ./"
81 if eval $gbscommand; then
82 echo "Core build is successful"
84 echo "Core build failed. Try 'sudo find . -type f -exec dos2unix {} \;' in the 'connectivity/' folder"
90 if echo $BUILD_SAMPLE|grep -qi '^ON$'; then
91 cd resource/csdk/stack/samples/tizen/SimpleClientServer
93 # Initialize Git repository
94 if [ ! -d .git ]; then
96 git config user.email "you@example.com"
97 git config user.name "Your Name"
99 git commit -m "Initial commit"
101 echo "Calling sample gbs build command"
102 gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-RI --include-all --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --define 'ROUTING $6' --repository ./"
104 if eval $gbscommand; then
105 echo "Sample build is successful"
107 echo "Sample build is failed. Try 'sudo find . -type f -exec dos2unix {} \;' in the 'connectivity/' folder"
110 echo "Sample build is not enabled"
115 rm -rf $sourcedir/tmp