3 cur_dir="./service/easy-setup"
5 spec=`ls ./service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/packaging/*.spec`
6 version=`rpm --query --queryformat '%{version}\n' --specfile $spec`
8 name=`echo $name|cut -d" " -f 1`
9 version=`echo $version|cut -d" " -f 1`
22 # Create directory structure for GBS Build
27 cp -R ./build_common $sourcedir/tmp
28 cp -R ./examples $sourcedir/tmp
30 # tinycbor is available as soft-link, so copying with 'dereference' option.
31 cp -LR ./extlibs/tinycbor $sourcedir/tmp/extlibs
32 rm -rf $sourcedir/tmp/extlibs/tinycbor/tinycbor/.git
34 cp -R ./extlibs/cjson $sourcedir/tmp/extlibs
35 cp -R ./extlibs/tinydtls $sourcedir/tmp/extlibs
36 cp -R ./extlibs/sqlite3 $sourcedir/tmp/extlibs
37 cp -R ./extlibs/timer $sourcedir/tmp/extlibs
38 cp -R ./extlibs/rapidxml $sourcedir/tmp/extlibs
39 cp -R ./resource $sourcedir/tmp
40 cp -R ./service $sourcedir/tmp
41 cp ./extra_options.scons $sourcedir/tmp
42 cp ./tools/tizen/*.spec ./tmp/packaging
43 cp ./tools/tizen/*.manifest ./tmp/packaging
46 # copy dependency RPMs and conf files for tizen build
47 cp ./tools/tizen/*.rpm ./tmp
48 cp ./tools/tizen/.gbs.conf ./tmp
49 cp ./tools/tizen/*.rpm $sourcedir/tmp/service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample
50 cp ./tools/tizen/.gbs.conf ./tmp/service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample
51 cp -R $sourcedir/iotivity.pc.in $sourcedir/tmp
58 # Initialize Git repository
59 if [ ! -d .git ]; then
61 git config user.email "you@example.com"
62 git config user.name "Your Name"
64 git commit -m "Initial commit"
67 echo "Calling core gbs build command"
68 gbscommand="gbs build -A armv7l --include-all --repository ./ --define 'TARGET_TRANSPORT IP' --define 'SECURED 0' --define 'RELEASE 0' --define 'LOGGING true'"
70 if eval $gbscommand; then
71 echo "Core build is successful"
73 echo "Core build failed."
79 cd service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample
81 # Initialize Git repository
82 if [ ! -d .git ]; then
84 git config user.email "you@example.com"
85 git config user.name "Your Name"
87 git commit -m "Initial commit"
89 echo "Calling sample gbs build command"
90 gbscommand="gbs build -A armv7l -B ~/GBS-ROOT --include-all --repository ./ --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'ROUTING $4' --define 'RELEASE $5' --define 'LOGGING $6' --define 'ES_ROLE $7' --define 'ES_TARGET_ENROLLEE $8' --define 'ES_SOFTAP_MODE $9'"
92 if eval $gbscommand; then
93 echo "Sample build is successful"
95 echo "Sample build is failed."
100 rm -rf $sourcedir/tmp