[Title] Added web samples 22/11022/2
authorGun Kim <gune.kim@samsung.com>
Wed, 16 Oct 2013 13:02:36 +0000 (22:02 +0900)
committerGun Kim <gune.kim@samsung.com>
Wed, 16 Oct 2013 13:15:34 +0000 (22:15 +0900)
[Type]
[Module]
[Priority]
[Jira#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

Change-Id: I18cab93dcc97a6abc1a7b6ffe4abe3be8a209c0c
Signed-off-by: Gun Kim <gune.kim@samsung.com>
package/build.linux
package/changelog
package/pkginfo.manifest
package/samples-git-list [new file with mode: 0644]

index 174b271..fac3268 100644 (file)
@@ -1,7 +1,10 @@
 #!/bin/sh -xe
 
-PLATFORM=mobile-3.0
 
+# git path of web samples is defined as WEB_SAMPLE_GIT_LIST and HYBRID_SAMPLE_GIT_LIST in samples-git-list
+. ${SRCDIR}/package/samples-git-list
+
+PLATFORM=mobile-3.0
 GIT_REPOSITORY=public-git
 WEB_TEMPLATE_GIT=${GIT_REPOSITORY}:profile/mobile/sdk/web-template
 # The BRANCH should be changed to environment variable of build system
@@ -27,14 +30,44 @@ build()
 
        mkdir -p ${SRCDIR}/temp
        mkdir -p ${SRCDIR}/samples/web
+       set +e
 # clone template
        cd ${SRCDIR}/temp
        git clone ${WEB_TEMPLATE_GIT}
        cd ${SRCDIR}/temp/web-template
        git checkout ${BRANCH}
-       cp -rf ${SRCDIR}/temp/web-template/Template ${SRCDIR}/samples/web/
-       cd ${SRCDIR}/temp
+       if [ $? = 0 ]
+       then
+               cp -rf ${SRCDIR}/temp/web-template/Template ${SRCDIR}/samples/web/
+       fi
 # clone samples (to be)
+       clone_samples
+       set -e
+}
+
+clone_samples()
+{
+       mkdir -p "${SRCDIR}/${WEB_SAMPLE_DEST_DIR}/"
+    for sample_git_path in ${WEB_SAMPLE_GIT_LIST}
+    do  
+        cd ${SRCDIR}/temp
+        git clone ${GIT_REPOSITORY}:${sample_git_path}
+        sampledir=`basename ${sample_git_path}`
+        cd "${SRCDIR}/temp/${sampledir}"
+        git checkout ${BRANCH}
+        cp -rf "${SRCDIR}/temp/${sampledir}" "${SRCDIR}/${WEB_SAMPLE_DEST_DIR}/"
+    done
+#clone hybrid webapp
+       mkdir -p "${SRCDIR}/${HYBRID_SAMPLE_DEST_DIR}/"
+    for sample_git_path in ${HYBRID_SAMPLE_GIT_LIST}
+    do  
+        cd ${SRCDIR}/temp
+        git clone ${GIT_REPOSITORY}:${sample_git_path}
+        sampledir=`basename ${sample_git_path}`
+        cd "${SRCDIR}/temp/${sampledir}"
+        git checkout ${BRANCH}
+        cp -rf "${SRCDIR}/temp/${sampledir}" "${SRCDIR}/${HYBRID_SAMPLE_DEST_DIR}/"
+    done
 }
  
 # install
index 9d66b6e..6bdb289 100644 (file)
@@ -1,3 +1,6 @@
+* 3.0.2
+- Added web samples
+== gune.kim <gune.kim@samsung.com> 2013-10-16
 * 3.0.1
 - Modified worng build script
 == gune.kim <gune.kim@samsung.com> 2013-10-02
index f7d867f..8410633 100644 (file)
@@ -1,4 +1,4 @@
-Version:3.0.1
+Version:3.0.2
 Maintainer: Shinjae Lee<poiema@samsung.com>, Junghak Kim<kjh5@samsung.com>, Kangho Kim<kh5325.kim@samsung.com>, Gun Kim<gune.kim@samsung.com>
 
 Package:mobile-3.0-web-sample
diff --git a/package/samples-git-list b/package/samples-git-list
new file mode 100644 (file)
index 0000000..56fbaf1
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh -xe
+#[Web Sample Git packaged in samples/web/Sample/Tizen/Web App]
+
+WEB_SAMPLE_DEST_DIR="samples/web/Sample/Tizen/Web App"
+WEB_SAMPLE_GIT_LIST="
+apps/web/sample/AnalogWatch
+apps/web/sample/AudioFilter
+apps/web/sample/BluetoothChat
+apps/web/sample/CallLog
+apps/web/sample/Chatter
+apps/web/sample/Compass
+apps/web/sample/ContactsExchanger
+apps/web/sample/DeviceMotionCapture
+apps/web/sample/DynamicBox
+apps/web/sample/EventManager
+apps/web/sample/ExercisePlanner
+apps/web/sample/FileManager
+apps/web/sample/ImageRotation
+apps/web/sample/MediaContent
+apps/web/sample/NPRuntime
+apps/web/sample/OfflineClockImage
+apps/web/sample/Piano
+apps/web/sample/SelfCamera
+apps/web/sample/SensorBall
+apps/web/sample/SystemInfo
+apps/web/sample/Template
+apps/web/sample/TemporaryStorage
+apps/web/sample/TizenWinset
+apps/web/sample/TouchPaint
+"
+
+#[Web Sample Git packaged in samples/web/Sample/Tizen/Hybrid Application]
+
+HYBRID_SAMPLE_DEST_DIR="samples/web/Sample/Tizen/Hybrid Application"
+HYBRID_SAMPLE_GIT_LIST="
+apps/web/sample/HybridWebApp
+"