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 -R ./resource/csdk/stack/samples/tizen/build/packaging/*.spec $sourcedir/tmp/packaging
50 cp -R ./resource $sourcedir/tmp/
51 cp -R ./build_common/external_libs.scons $sourcedir/tmp/
53 # copy dependency RPMs and conf files for tizen build
54 cp ./tools/tizen/*.rpm $sourcedir/tmp
55 cp ./tools/tizen/*.rpm $sourcedir/tmp/resource/csdk/stack/samples/tizen/SimpleClientServer
56 cp ./tools/tizen/.gbs.conf ./tmp
57 cp ./tools/tizen/.gbs.conf ./tmp/resource/csdk/stack/samples/tizen/SimpleClientServer
60 cd ./resource/csdk/stack/samples/tizen/build/
62 cp -R ./* $sourcedir/tmp/
63 rm -f $sourcedir/tmp/SConscript
64 cp SConstruct $sourcedir/tmp/
65 cp scons/SConscript $sourcedir/tmp/scons/
67 mkdir -p $sourcedir/tmp/iotivityconfig
68 cd $sourcedir/build_common/
69 cp -R ./iotivityconfig/* $sourcedir/tmp/iotivityconfig/
70 cp -R ./SConscript $sourcedir/tmp/
72 cp -R $sourcedir/iotivity.pc.in $sourcedir/tmp/
79 # Initialize Git repository
80 if [ ! -d .git ]; then
82 git config user.email "you@example.com"
83 git config user.name "Your Name"
85 git commit -m "Initial commit"
88 echo "Calling core gbs build command"
89 gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-RI --include-all --repository ./ --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --define 'ROUTING $6'"
91 if eval $gbscommand; then
92 echo "Core build is successful"
94 echo "Core build failed. Try 'find . -type f -exec dos2unix {} \;' in the 'connectivity/' folder"
100 if echo $BUILD_SAMPLE|grep -qi '^ON$'; then
101 cd resource/csdk/stack/samples/tizen/SimpleClientServer
103 # Initialize Git repository
104 if [ ! -d .git ]; then
106 git config user.email "you@example.com"
107 git config user.name "Your Name"
109 git commit -m "Initial commit"
111 echo "Calling sample gbs build command"
112 gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-RI --include-all --repository ./ --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --define 'ROUTING $6'"
114 if eval $gbscommand; then
115 echo "Sample build is successful"
117 echo "Sample build is failed. Try 'find . -type f -exec dos2unix {} \;' in the 'connectivity/' folder"
121 echo "Sample build is not enabled"
125 rm -rf $sourcedir/tmp