3 spec=`ls tools/tizen/*.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`
21 # Clean tmp directory.
24 # Create directory structure for GBS Build
28 cp -R ./build_common $sourcedir/tmp
29 cp -R ./examples $sourcedir/tmp
31 # tinycbor is available as soft-link, so copying with 'dereference' option.
32 cp -LR ./extlibs/tinycbor $sourcedir/tmp/extlibs
33 rm -rf $sourcedir/tmp/extlibs/tinycbor/tinycbor/.git
35 cp -R ./extlibs/cjson $sourcedir/tmp/extlibs
36 cp -R ./extlibs/gtest $sourcedir/tmp/extlibs
37 cp -R ./extlibs/tinydtls $sourcedir/tmp/extlibs
38 cp -LR ./extlibs/sqlite3 $sourcedir/tmp/extlibs
39 cp -R ./extlibs/timer $sourcedir/tmp/extlibs
40 cp -R ./extlibs/rapidxml $sourcedir/tmp/extlibs
41 cp -R ./resource $sourcedir/tmp
42 cp -R ./service $sourcedir/tmp
43 cp ./extra_options.scons $sourcedir/tmp
44 cp ./tools/tizen/*.spec ./tmp/packaging
45 cp ./tools/tizen/*.manifest ./tmp/packaging
49 # copy dependency RPMs and conf files for tizen build
50 cp ./tools/tizen/*.rpm ./tmp
51 cp ./tools/tizen/.gbs.conf ./tmp
52 cp ./tools/tizen/*.rpm $sourcedir/tmp/service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample
53 cp ./tools/tizen/.gbs.conf ./tmp/service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample
55 cp -R $sourcedir/iotivity.pc.in $sourcedir/tmp
60 rm -rf ./extlibs/tinycbor/tinycbor/.git*
62 # Initialize Git repository
63 if [ ! -d .git ]; then
65 git config user.email "you@example.com"
66 git config user.name "Your Name"
68 git commit -m "Initial commit"
71 echo "Calling core gbs build command"
72 gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-OIC --include-all --repository ./"
74 if eval $gbscommand; then
75 echo "Build is successful"
81 # Build EasySetup App. if ES_ON is entered on command prompt
82 if echo $ES_SAMPLE|grep -qi '^ES_ON$'; then
83 cd service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample
85 echo "EasySetup Sample Build is enabled"
87 # Initialize Git repository for EnrolleeSample
88 if [ ! -d .git ]; then
90 git config user.email "you@example.com"
91 git config user.name "Your Name"
93 git commit -m "Initial commit"
95 echo "Calling EasySetup Sample gbs build command"
96 gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-OIC --include-all --repository ./"
98 if eval $gbscommand; then
99 echo "EasySetup Sample build is successful"
101 echo "EasySetup Sample build is failed."
105 echo "EasySetup Sample Build is not enabled"
110 rm -rf $sourcedir/tmp