3 cur_dir="./service/easy-setup"
4 spec=`ls ./service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/packaging/*.spec`
5 version=`rpm --query --queryformat '%{version}\n' --specfile $spec`
7 name=`echo $name|cut -d" " -f 1`
8 version=`echo $version|cut -d" " -f 1`
19 # Clean tmp directory.
22 # 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
34 cp -R ./extlibs/cjson $sourcedir/tmp/extlibs
35 cp -R ./extlibs/mbedtls $sourcedir/tmp/extlibs
36 cp -R ./extlibs/gtest $sourcedir/tmp/extlibs
37 cp -LR ./extlibs/sqlite3 $sourcedir/tmp/extlibs
38 cp -R ./extlibs/timer $sourcedir/tmp/extlibs
39 cp -R ./extlibs/rapidxml $sourcedir/tmp/extlibs
40 cp -R ./extlibs/libcoap $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/iotivity.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 # Prepare mbedTLS dependency
61 $SHELL ./extlibs/mbedtls/prep.sh
63 # Prepare TinyCBOR dependency
64 $SHELL ./extlibs/tinycbor/prep.sh
67 # Initialize Git repository
68 if [ ! -d .git ]; then
70 git config user.email "you@example.com"
71 git config user.name "Your Name"
73 git commit -m "Initial commit"
76 buildoption="--define 'TARGET_TRANSPORT '$1 --define 'SECURED '$2 --define 'ROUTING '$3 --define 'RELEASE '$4 --define 'LOGGING '$5 --define 'ES_TARGET_ENROLLEE '$6 --define 'WITH_TCP '$7 --define 'WITH_CLOUD '$8"
77 echo "Calling core gbs build command"
78 gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-OIC $buildoption --include-all --repository ./"
80 if eval $gbscommand; then
81 echo "Core build is successful"
83 echo "Core build failed."
89 # Build Enrollee Sample App
90 cd service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample
92 # Initialize Git repository
93 if [ ! -d .git ]; then
95 git config user.email "you@example.com"
96 git config user.name "Your Name"
98 git commit -m "Initial commit"
100 echo "Calling sample gbs build command"
101 gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-OIC $buildoption --include-all --repository ./"
103 if eval $gbscommand; then
104 echo "Sample build is successful"
106 echo "Sample build is failed."
111 rm -rf $sourcedir/tmp