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
27 echo $TARGET_TRANSPORT
40 cp -R ./extlibs/tinycbor $sourcedir/tmp/extlibs
41 cp -R ./extlibs/cjson $sourcedir/tmp/extlibs
42 cp -R ./extlibs/tinydtls $sourcedir/tmp/extlibs
43 cp -R ./extlibs/timer $sourcedir/tmp/extlibs
44 cp -R ./extlibs/rapidxml $sourcedir/tmp/extlibs
45 cp -R ./resource/csdk/stack/samples/tizen/build/packaging/*.spec $sourcedir/tmp/packaging
46 cp -R ./resource $sourcedir/tmp/
47 cp -R ./build_common/external_libs.scons $sourcedir/tmp/
50 cd ./resource/csdk/stack/samples/tizen/build/
52 cp -R ./* $sourcedir/tmp/
53 rm -f $sourcedir/tmp/SConscript
54 cp SConstruct $sourcedir/tmp/
55 cp scons/SConscript $sourcedir/tmp/scons/
57 mkdir -p $sourcedir/tmp/iotivityconfig
58 cd $sourcedir/build_common/
59 cp -R ./iotivityconfig/* $sourcedir/tmp/iotivityconfig/
60 cp -R ./SConscript $sourcedir/tmp/
67 # Initialize Git repository
68 if [ ! -d .git ]; then
70 git config user.email "you@example.com"
71 git config user.name "Your Name"
73 git commit -m "Initial commit"
76 echo "Calling core gbs build command"
77 gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-RI --include-all --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --repository ./"
79 if eval $gbscommand; then
80 echo "Core build is successful"
82 echo "Core build failed. Try 'sudo find . -type f -exec dos2unix {} \;' in the 'connectivity/' folder"
88 if echo $BUILD_SAMPLE|grep -qi '^ON$'; then
89 cd resource/csdk/stack/samples/tizen/SimpleClientServer
91 # Initialize Git repository
92 if [ ! -d .git ]; then
94 git config user.email "you@example.com"
95 git config user.name "Your Name"
97 git commit -m "Initial commit"
99 echo "Calling sample gbs build command"
100 gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-RI --include-all --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --repository ./"
102 if eval $gbscommand; then
103 echo "Sample build is successful"
105 echo "Sample build is failed. Try 'sudo find . -type f -exec dos2unix {} \;' in the 'connectivity/' folder"
108 echo "Sample build is not enabled"
113 rm -rf $sourcedir/tmp