From 2dad28363feff7dcbbebe5bee5ae403c2de6232f Mon Sep 17 00:00:00 2001 From: Gun Kim Date: Wed, 16 Oct 2013 22:02:36 +0900 Subject: [PATCH] [Title] Added web samples [Type] [Module] [Priority] [Jira#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] Change-Id: I18cab93dcc97a6abc1a7b6ffe4abe3be8a209c0c Signed-off-by: Gun Kim --- package/build.linux | 39 ++++++++++++++++++++++++++++++++++++--- package/changelog | 3 +++ package/pkginfo.manifest | 2 +- package/samples-git-list | 37 +++++++++++++++++++++++++++++++++++++ 4 files changed, 77 insertions(+), 4 deletions(-) create mode 100644 package/samples-git-list diff --git a/package/build.linux b/package/build.linux index 174b271..fac3268 100644 --- a/package/build.linux +++ b/package/build.linux @@ -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 diff --git a/package/changelog b/package/changelog index 9d66b6e..6bdb289 100644 --- a/package/changelog +++ b/package/changelog @@ -1,3 +1,6 @@ +* 3.0.2 +- Added web samples +== gune.kim 2013-10-16 * 3.0.1 - Modified worng build script == gune.kim 2013-10-02 diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest index f7d867f..8410633 100644 --- a/package/pkginfo.manifest +++ b/package/pkginfo.manifest @@ -1,4 +1,4 @@ -Version:3.0.1 +Version:3.0.2 Maintainer: Shinjae Lee, Junghak Kim, Kangho Kim, Gun Kim Package:mobile-3.0-web-sample diff --git a/package/samples-git-list b/package/samples-git-list new file mode 100644 index 0000000..56fbaf1 --- /dev/null +++ b/package/samples-git-list @@ -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 +" -- 2.7.4