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
43 cp -LR ./extlibs/tinycbor $sourcedir/tmp/extlibs
44 rm -rf $sourcedir/tmp/extlibs/tinycbor/tinycbor/.git
45 cp -R ./extlibs/cjson $sourcedir/tmp/extlibs
46 cp -R ./extlibs/tinydtls $sourcedir/tmp/extlibs
47 cp -R ./extlibs/timer $sourcedir/tmp/extlibs
48 cp -R ./extlibs/rapidxml $sourcedir/tmp/extlibs
49 cp -LR ./extlibs/sqlite3 $sourcedir/tmp/extlibs
50 cp -R ./resource/csdk/stack/samples/tizen/build/packaging/*.spec $sourcedir/tmp/packaging
51 cp -R ./resource $sourcedir/tmp/
52 cp -R ./build_common/external_libs.scons $sourcedir/tmp/
53 mkdir -p $sourcedir/tmp/build_common/
54 cp -a ./build_common/*.scons $sourcedir/tmp/build_common/
56 # copy dependency RPMs and conf files for tizen build
57 cp ./tools/tizen/*.rpm $sourcedir/tmp
58 cp ./tools/tizen/*.rpm $sourcedir/tmp/resource/csdk/stack/samples/tizen/SimpleClientServer
59 cp ./tools/tizen/.gbs.conf ./tmp
60 cp ./tools/tizen/.gbs.conf ./tmp/resource/csdk/stack/samples/tizen/SimpleClientServer
63 cd ./resource/csdk/stack/samples/tizen/build/
65 cp -R ./* $sourcedir/tmp/
66 rm -f $sourcedir/tmp/SConscript
67 cp SConstruct $sourcedir/tmp/
68 cp scons/SConscript $sourcedir/tmp/scons/
70 mkdir -p $sourcedir/tmp/iotivityconfig
71 cd $sourcedir/build_common/
72 cp -R ./iotivityconfig/* $sourcedir/tmp/iotivityconfig/
73 cp -R ./SConscript $sourcedir/tmp/
75 cp -R $sourcedir/iotivity.pc.in $sourcedir/tmp/
82 # Initialize Git repository
83 if [ ! -d .git ]; then
85 git config user.email "you@example.com"
86 git config user.name "Your Name"
88 git commit -m "Initial commit"
91 echo "Calling core gbs build command"
92 gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-RI-OIC --include-all --repository ./ --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --define 'ROUTING $6'"
94 if eval $gbscommand; then
95 echo "Core build is successful"
97 echo "Core build failed. Try 'find . -type f -exec dos2unix {} \;' in the 'connectivity/' folder"
103 if echo $BUILD_SAMPLE|grep -qi '^ON$'; then
104 cd resource/csdk/stack/samples/tizen/SimpleClientServer
106 # Initialize Git repository
107 if [ ! -d .git ]; then
109 git config user.email "you@example.com"
110 git config user.name "Your Name"
112 git commit -m "Initial commit"
114 echo "Calling sample gbs build command"
115 gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-RI-OIC --include-all --repository ./ --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --define 'ROUTING $6'"
117 if eval $gbscommand; then
118 echo "Sample build is successful"
120 echo "Sample build is failed. Try 'find . -type f -exec dos2unix {} \;' in the 'connectivity/' folder"
124 echo "Sample build is not enabled"
128 rm -rf $sourcedir/tmp