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
32 echo $TARGET_TRANSPORT
46 cp -LR ./extlibs/tinycbor $sourcedir/tmp/extlibs
47 rm -rf $sourcedir/tmp/extlibs/tinycbor/tinycbor/.git
48 cp -R ./extlibs/cjson $sourcedir/tmp/extlibs
49 cp -R ./extlibs/tinydtls $sourcedir/tmp/extlibs
50 cp -R ./extlibs/timer $sourcedir/tmp/extlibs
51 cp -R ./extlibs/rapidxml $sourcedir/tmp/extlibs
52 cp -LR ./extlibs/sqlite3 $sourcedir/tmp/extlibs
53 cp -R ./resource/csdk/stack/samples/tizen/build/packaging/*.spec $sourcedir/tmp/packaging
54 cp -R ./resource $sourcedir/tmp/
55 cp -R ./build_common/external_libs.scons $sourcedir/tmp/
56 mkdir -p $sourcedir/tmp/build_common/
57 cp -a ./build_common/*.scons $sourcedir/tmp/build_common/
59 # copy dependency RPMs and conf files for tizen build
60 cp ./tools/tizen/*.rpm $sourcedir/tmp
61 cp ./tools/tizen/*.rpm $sourcedir/tmp/resource/csdk/stack/samples/tizen/SimpleClientServer
62 cp ./tools/tizen/.gbs.conf ./tmp
63 cp ./tools/tizen/.gbs.conf ./tmp/resource/csdk/stack/samples/tizen/SimpleClientServer
66 cd ./resource/csdk/stack/samples/tizen/build/
68 cp -R ./* $sourcedir/tmp/
69 rm -f $sourcedir/tmp/SConscript
70 cp SConstruct $sourcedir/tmp/
71 cp scons/SConscript $sourcedir/tmp/scons/
73 mkdir -p $sourcedir/tmp/iotivityconfig
74 cd $sourcedir/build_common/
75 cp -R ./iotivityconfig/* $sourcedir/tmp/iotivityconfig/
76 cp -R ./SConscript $sourcedir/tmp/
78 cp -R $sourcedir/iotivity.pc.in $sourcedir/tmp/
85 # Initialize Git repository
86 if [ ! -d .git ]; then
88 git config user.email "you@example.com"
89 git config user.name "Your Name"
91 git commit -m "Initial commit"
94 echo "Calling core gbs build command"
95 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' --define 'WITH_TCP $7'"
97 if eval $gbscommand; then
98 echo "Core build is successful"
100 echo "Core build failed. Try 'find . -type f -exec dos2unix {} \;' in the 'connectivity/' folder"
102 rm -rf $sourcedir/tmp
106 if echo $BUILD_SAMPLE|grep -qi '^ON$'; then
107 cd resource/csdk/stack/samples/tizen/SimpleClientServer
109 # Initialize Git repository
110 if [ ! -d .git ]; then
112 git config user.email "you@example.com"
113 git config user.name "Your Name"
115 git commit -m "Initial commit"
117 echo "Calling sample gbs build command"
118 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' --define 'WITH_TCP $7'"
120 if eval $gbscommand; then
121 echo "Sample build is successful"
123 echo "Sample build is failed. Try 'find . -type f -exec dos2unix {} \;' in the 'connectivity/' folder"
127 echo "Sample build is not enabled"
131 rm -rf $sourcedir/tmp