[Tizen][OBS] Changes for Tizen OBS Build
authorYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Feb 2015 10:32:40 +0000 (19:32 +0900)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
[Issue]
OBS build does not support running script 'build_{target].sh'.

1) GBS Build Options
In OBS build, definitions, coming through gbs build option, can NOT be used,
such as 'chromium_efl_tizen_version'.

2) Package Name
In OBS build, using macros around property 'Name' in spec file is not allowed.

3) Supplementary Repository
In OBS build, the supplementary repository is not allowed.

[Resolve]
1) GBS Build Options
The definitions, coming through gbs repository, are used,
instead of the definitions coming through gbs build option.

2) Package Name
In Tizen v3.0, appid should be consist of '.',
but package name doesn't need to follow that rule.

3) Supplementary Repository
The supplementary repository is removed in the file 'gbs.conf'.
Currently, chromium-efl doesn't have dependency of supplementary repository.

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=11500
Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=11502
Reviewed by: Antonio Gomes, KC Park, SeungSeop Park

Change-Id: I91876dadbd3643dec2046e87d7e0658a68292d81
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
tizen_src/build/build_emulator.sh
tizen_src/build/build_mobile.sh
tizen_src/build/build_tv.sh
tizen_src/build/gbs.conf
tizen_src/impl/chromium-efl.gypi
tizen_src/packaging/chromium-efl.spec

index 34c6093..46c30e6 100755 (executable)
@@ -2,10 +2,6 @@
 
 # source common functions and vars
 . `dirname $0`/common.sh
-trap '${SCRIPTDIR}/apply_patches.sh -r ${SCRIPTDIR}/patches;\
-      error_report $0 $LINENO' ERR SIGINT SIGTERM SIGQUIT
-
-${SCRIPTDIR}/apply_patches.sh ${SCRIPTDIR}/patches
 
 # "|| :" means "or always succeeding built-in command"
 PROFILE_NAME=$(echo "$@" | grep -Po "(?<=\-P\s)[^\s]*" || :)
@@ -15,14 +11,8 @@ if [ "$PROFILE_NAME" == "" ]; then
   PROFILE_FLAG="-P $PROFILE_NAME"
 fi
 
-TIZEN_VERSION="chromium_efl_tizen_version 2.4"
-
 if [ "$USE_GLOBAL_GBS_CONF" == "" ]; then
   CONF_FLAG="--conf ${SCRIPTDIR}/gbs.conf"
 fi
 
-gbs $CONF_FLAG build $PROFILE_FLAG -A i586 --incremental \
-    --define "${TIZEN_VERSION}" "$@"
-
-${SCRIPTDIR}/apply_patches.sh -r ${SCRIPTDIR}/patches
-
+gbs $CONF_FLAG build $PROFILE_FLAG -A i586 --incremental "$@"
index 53d82c7..ba1833d 100755 (executable)
@@ -2,10 +2,6 @@
 
 # source common functions and vars
 . `dirname $0`/common.sh
-trap '${SCRIPTDIR}/apply_patches.sh -r ${SCRIPTDIR}/patches;\
-      error_report $0 $LINENO' ERR SIGINT SIGTERM SIGQUIT
-
-${SCRIPTDIR}/apply_patches.sh ${SCRIPTDIR}/patches
 
 # "|| :" means "or always succeeding built-in command"
 PROFILE_NAME=$(echo "$@" | grep -Po "(?<=\-P\s)[^\s]*" || :)
@@ -15,14 +11,8 @@ if [ "$PROFILE_NAME" == "" ]; then
   PROFILE_FLAG="-P $PROFILE_NAME"
 fi
 
-TIZEN_VERSION="chromium_efl_tizen_version 2.4"
-
 if [ "$USE_GLOBAL_GBS_CONF" == "" ]; then
   CONF_FLAG="--conf ${SCRIPTDIR}/gbs.conf"
 fi
 
-gbs $CONF_FLAG build $PROFILE_FLAG -A armv7l --incremental \
-    --define "${TIZEN_VERSION}" "$@"
-
-${SCRIPTDIR}/apply_patches.sh -r ${SCRIPTDIR}/patches
-
+gbs $CONF_FLAG build $PROFILE_FLAG -A armv7l --incremental "$@"
index 9018860..f4f75b2 100755 (executable)
@@ -2,20 +2,14 @@
 
 # source common functions and vars
 . `dirname $0`/common.sh
-trap '${SCRIPTDIR}/apply_patches.sh -r ${SCRIPTDIR}/patches;\
-      error_report $0 $LINENO' ERR SIGINT SIGTERM SIGQUIT
-
-${SCRIPTDIR}/apply_patches.sh ${SCRIPTDIR}/patches
 
 # "|| :" means "or always succeeding built-in command"
 PROFILE_NAME=$(echo "$@" | grep -Po "(?<=\-P\s)[^\s]*" || :)
 
 ARCH="armv7l"
-TIZEN_VERSION="chromium_efl_tizen_version 2.2.1"
 EXTRA_PACK_OPTS="--extra-packs python-base-x86-arm,python-x86-arm,python-xml-x86-arm"
 if [ "${PROFILE_NAME:0:9}" == "tztv_v3.0" ]; then
   EXTRA_PACK_OPTS=""
-  TIZEN_VERSION="chromium_efl_tizen_version 3.0"
 else
   PROFILE_NAME="tztv_v2.2.1_prehawk"
 fi
@@ -31,8 +25,4 @@ if [ "$USE_GLOBAL_GBS_CONF" == "" ]; then
 fi
 
 gbs $CONF_FLAG build $PROFILE_FLAG -A "${ARCH}" --incremental \
-    --define 'TIZEN_PROFILE_TV 1' \
-    ${EXTRA_PACK_OPTS} \
-    --define "${TIZEN_VERSION}" "$@"
-
-${SCRIPTDIR}/apply_patches.sh -r ${SCRIPTDIR}/patches
+    ${EXTRA_PACK_OPTS} "$@"
index c1149d5..1a077e8 100755 (executable)
@@ -1,12 +1,12 @@
 ###############################################
-##
-## Tizen v2.4 for mobile
-##
+#
+# Tizen v2.4 for mobile
+#
 [profile.tizenmb_v2.4]
 obs = obs.tizenmb
 # The order is IMPORTANT!
 repos = repo.tizenmb_base_v2.4_obs
-buildroot=~/GBS-ROOT-2.4-DEV
+buildroot = ~/GBS-ROOT-2.4-DEV
 
 [repo.tizenmb_base_v2.4_obs]
 url = http://168.219.209.55/download/snapshots/2.4-mobile/common/latest/repos/target/packages
@@ -19,7 +19,7 @@ url = http://168.219.209.55/download/snapshots/2.4-mobile/common/latest/repos/ta
 obs = obs.tizenmb
 # The order is IMPORTANT!
 repos = repo.tizen_emulator_base_v2.4_obs
-buildroot=~/GBS-ROOT-2.4-DEV
+buildroot = ~/GBS-ROOT-2.4-DEV
 
 [repo.tizen_emulator_base_v2.4_obs]
 url = http://168.219.209.55/download/snapshots/2.4-mobile/common/latest/repos/emulator/packages
@@ -32,7 +32,7 @@ url = http://168.219.209.55/download/snapshots/2.4-mobile/common/latest/repos/em
 obs = obs.tizenmb
 # The order is IMPORTANT!
 repos = repo.tizenmb_supplement_v2.3, repo.tizenmb_supplement_chromium_v2.3, repo.tizenmb_base_v2.3
-buildroot=~/GBS-ROOT-2.3-DEV
+buildroot = ~/GBS-ROOT-2.3-DEV
 
 [repo.tizenmb_supplement_v2.3]
 url = http://10.251.52.177/tizenrepo/eur-open/supplement_v2.3
@@ -94,10 +94,9 @@ url = http://10.251.52.177/tizenrepo/tv_repo/tizen-rsa/tizen-2.2.1
 url = http://10.251.52.177/tizenrepo/tv_repo/supplement_tv
 
 ###############################################
-##
-## Tizen v2.2.1 for tv (Prehawk Platform Binary)
-##
-
+#
+# Tizen v2.2.1 for tv (Prehawk Platform Binary)
+#
 [profile.tztv_v2.2.1_prehawk]
 repos = repo.tztv_2.2.1_prehawk_supplement, repo.tztv_2.2.1_prehawk_product, repo.tztv_2.2.1_prehawk_profile, repo.tztv_2.2.1_prehawk_base
 buildroot = ~/GBS-TV-2.2.1-PREHAWK
@@ -119,28 +118,24 @@ url = http://10.251.52.177/tizenrepo/tv_repo/tizen-2.2.1-vd-4.8_20140822.1
 url = http://10.251.52.177/tizenrepo/tv_repo/supplement_tv_prehawk_player
 
 ###############################################
-##
-## Tizen v3.0 for TV
-##
-
+#
+# Tizen v3.0 for TV
+#
 [obs.tizen]
 url = https://api.tizen.org
 
 [profile.tztv_v3.0]
 obs = obs.tizen
-repos = repo.supplement, repo.tv_arm-x11
-buildroot=~/GBS-ROOT-3.0-TV
+repos = repo.tv_arm-x11
+buildroot = ~/GBS-ROOT-3.0-TV
 
-# mirrored from http://download.tizen.org/snapshots/tizen/tv
 [repo.tv_arm-x11]
-url = http://10.251.52.177/tizenrepo/tv_repo/tizen-tv_v3.0/repos/arm-x11/packages
-
-[repo.supplement]
-url = http://10.251.52.177/tizenrepo/tv_repo/supplement_odroid_chromium_tizen_v3.0
+url = http://download.tizen.org/snapshots/tizen/tv/latest/repos/arm-x11/packages
 
 ###############################################
-## Tizen v3.0 for tv (Emulator)
-##
+#
+# Tizen v3.0 for tv (Emulator)
+#
 [obs.tizentv]
 url = https://api.tizen.org
 
index e080698..e1b3a9f 100644 (file)
         'gcc_4_6_x': 0,
       }],
     ],
-   'chromium_efl_tizen_version%': '2.4',
-   'custom_libc_dir%': '',
-   'prebuilt_ld_gold_dir%': '',
-   'grit_additional_defines': ['-D', 'use_efl',],
+    'chromium_efl_tizen_version%': '2.4',
+    'custom_libc_dir%': '',
+    'prebuilt_ld_gold_dir%': '',
+    'grit_additional_defines': ['-D', 'use_efl',],
   },
   'target_defaults': {
     'defines': [
index 83f05c3..bb870cf 100644 (file)
@@ -1,3 +1,20 @@
+Name: chromium-efl
+Summary: Chromium EFL
+# Set by by scripts/update-chromium-version.sh
+%define ChromiumVersion 40.2214.38
+%define Week 51
+Version: %{ChromiumVersion}.%{Week}
+Release: 1
+# The 'Group' should be specified as one of the following valid group list.
+# https://wiki.tizen.org/wiki/Packaging/Guidelines#Group_Tag
+Group: Web Framework/Web Engine
+# The 'License' should be specified as some of the following known license list.
+# http://spdx.org/licenses/
+License: LGPL-2.1 or BSD-2-Clause
+
+Source0: %{name}-%{version}.tar.gz
+Source1: content_shell.in
+
 %if 0%{?nodebug}
 %global __debug_install_post %{nil}
 %global debug_package %{nil}
 %define _debug_mode 1
 %endif
 
-%if "%{_repository}"=="arm-x11"
-Name: org.tizen.chromium-efl
-%else
-Name: chromium-efl
+# Conditions for OBS build
+# The OBS build does not support running script 'build_{target}.sh'.
+# TODO: There is a bug regarding mismatched versions from repository.
+#       So, the versions need to be considered as originally intended versions,
+#       until those versions are fixed by platform team.
+#       1) The value '2.3' of '%{tizen}' should be '2.4'.
+#       2) The value '2.0' of '%{tizen}' should be '2.3'.
+%if "%{tizen}" == "3.0"
+%define chromium_efl_tizen_version 3.0
+%endif
+%if "%{tizen}" == "2.3"
+%define chromium_efl_tizen_version 2.4
+%endif
+%if "%{tizen}" == "2.0"
+%define chromium_efl_tizen_version 2.3
+%endif
+%if "%{tizen}" == "2.2.1"
+%define chromium_efl_tizen_version 2.2.1
 %endif
-Summary: Chromium EFL
-# Set by by scripts/update-chromium-version.sh
-%define ChromiumVersion 40.2214.38
-%define Week 51
-Version: %{ChromiumVersion}.%{Week}
-Release: 1
-Group: Applications/Internet
-License: LGPLv2.1 or BSD
 
-Source0: %{name}-%{version}.tar.gz
-Source1: content_shell.in
+%if %{!?TIZEN_PROFILE_TV:0}%{?TIZEN_PROFILE_TV:1} || "%{!?profile:0}%{?profile}" == "tv"
+%define chromium_efl_tizen_profile tv
+%else
+%define chromium_efl_tizen_profile mobile
+%endif
 
 # Excluded wearable profile build
 # Chromium-efl doesn't support the wearable profile
@@ -83,37 +109,39 @@ BuildRequires: pkgconfig(ui-gadget-1)
 BuildRequires: pkgconfig(libexif)
 BuildRequires: pkgconfig(nspr)
 BuildRequires: pkgconfig(zlib)
-%if %{!?TIZEN_PROFILE_TV:1}%{?TIZEN_PROFILE_TV:0}
+BuildRequires: pkgconfig(capi-media-camera)
+BuildRequires: pkgconfig(capi-media-audio-io)
+BuildRequires: pkgconfig(capi-media-player)
+BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(libdri2)
+BuildRequires: pkgconfig(libtbm)
+BuildRequires: pkgconfig(x11)
+BuildRequires: pkgconfig(feedback)
+BuildRequires: pkgconfig(appcore-efl)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(ecore-imf)
+BuildRequires: pkgconfig(scim)
+# for Mobile
+%if %{!?chromium_efl_tizen_profile:0}%{?chromium_efl_tizen_profile} == "mobile"
 BuildRequires: bzip2-devel
 BuildRequires: pkgconfig(efl-assist)
 BuildRequires: pkgconfig(ttrace)
 BuildRequires: pkgconfig(capi-network-connection)
 BuildRequires: pkgconfig(capi-system-sensor)
-%else # TIZEN_PROFILE_TV
+%else # for TV
 BuildRequires: pkgconfig(audio-session-mgr)
 BuildRequires: pkgconfig(mm-session)
 %endif
-%if "%{?chromium_efl_tizen_version:%{chromium_efl_tizen_version}}%{!?chromium_efl_tizen_version:0}" >= "2.4"
+# for Tizen v3.0 and Tizen v2.4
+%if "%{?chromium_efl_tizen_version}%{!?chromium_efl_tizen_version:0}" >= "2.4"
 BuildRequires: pkgconfig(gstreamer-1.0)
 BuildRequires: pkgconfig(gstreamer-plugins-base-1.0)
 BuildRequires: pkgconfig(gstreamer-app-1.0)
-%else # for Tizen v2.X
+%else # <= Tizen v2.3
 BuildRequires: pkgconfig(gstreamer-0.10)
 BuildRequires: pkgconfig(gstreamer-plugins-base-0.10)
 BuildRequires: pkgconfig(gstreamer-app-0.10)
 %endif
-BuildRequires: pkgconfig(capi-media-camera)
-BuildRequires: pkgconfig(capi-media-audio-io)
-BuildRequires: pkgconfig(capi-media-player)
-BuildRequires: pkgconfig(vconf)
-BuildRequires: pkgconfig(libdri2)
-BuildRequires: pkgconfig(libtbm)
-BuildRequires: pkgconfig(x11)
-BuildRequires: pkgconfig(feedback)
-BuildRequires: pkgconfig(appcore-efl)
-BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(ecore-imf)
-BuildRequires: pkgconfig(scim)
 
 %description
 Browser Engine based on Chromium EFL (Shared Library)
@@ -123,7 +151,7 @@ Summary: Chromium EFL
 Group: Development/Libraries
 Requires: %{name} = %{version}-%{release}
 %description devel
-Browser Engine dev library based on Chromium EFL (developement files)
+Browser Engine dev library based on Chromium EFL (development files)
 
 %if 0%{?_enable_content_shell}
 %package shell
@@ -177,9 +205,10 @@ Selenium WebDriver for t-browser
 
 # TODO : This execution will be removed by multimedia team
 # Bug : http://107.108.218.239/bugzilla/show_bug.cgi?id=10516
-%if %{!?chromium_efl_tizen_version:1}%{?chromium_efl_tizen_version:0}
+trap 'build/apply_patches.sh -r build/patches;\
+      error_report $0 $LINENO' ERR SIGINT SIGTERM SIGQUIT
+
 build/apply_patches.sh build/patches
-%endif
 
 # workaround for new nss library : search it in /usr/lib first, rather than /lib (system nss)
 export LD_RUN_PATH=%{_libdir}
@@ -208,7 +237,7 @@ export LDFLAGS="$LDFLAGS -L/lib"
   CXXFLAGS=$(echo $CXXFLAGS | sed 's/ -g / /')
 %endif
 
-%if %{!?TIZEN_PROFILE_TV:1}%{?TIZEN_PROFILE_TV:0}
+%if %{!?chromium_efl_tizen_profile:0}%{?chromium_efl_tizen_profile} == "mobile"
   %define OUTPUT_BUILD_PROFILE_TARGET mobile
 %else
   %define OUTPUT_BUILD_PROFILE_TARGET tv
@@ -280,9 +309,7 @@ cp src/third_party/icu/android/icudtl.dat "%{OUTPUT_FOLDER}"
 
 # TODO : This execution will be removed by multimedia team
 # Bug : http://107.108.218.239/bugzilla/show_bug.cgi?id=10516
-%if %{!?chromium_efl_tizen_version:1}%{?chromium_efl_tizen_version:0}
 build/apply_patches.sh -r build/patches
-%endif
 
 # XXX Workaround for using rpmlint with emulator build on Tizen_TV 3.0
 #
@@ -346,19 +373,20 @@ install -m 0755 "%{OUTPUT_FOLDER}"/icudtl.dat    "%{buildroot}%{CHROMIUM_EXE_DIR
 install -m 0755 "%{OUTPUT_FOLDER}"/content_shell.pak "%{buildroot}%{CHROMIUM_EXE_DIR}"
 install -m 0644 "%{OUTPUT_FOLDER}"/resources/*.edj   "%{buildroot}%{CHROMIUM_DATA_DIR}"/themes
 
-%if "%{?chromium_efl_tizen_version:%{chromium_efl_tizen_version}}%{!?chromium_efl_tizen_version:0}" == "3.0"
-mkdir -p "%{buildroot}"/usr/apps/%{name}/bin
-install -m 0755 "%{OUTPUT_FOLDER}"/efl_webview_app   "%{buildroot}"/usr/apps/%{name}/bin/
-install -m 0755 "%{OUTPUT_FOLDER}"/mini_browser      "%{buildroot}"/usr/apps/%{name}/bin/
-install -m 0755 "%{OUTPUT_FOLDER}"/ubrowser          "%{buildroot}"/usr/apps/%{name}/bin/
+# for Tizen v3.0
+%if "%{?chromium_efl_tizen_version}%{!?chromium_efl_tizen_version:0}" == "3.0"
+mkdir -p "%{buildroot}"/usr/apps/org.tizen.%{name}/bin
+install -m 0755 "%{OUTPUT_FOLDER}"/efl_webview_app   "%{buildroot}"/usr/apps/org.tizen.%{name}/bin/
+install -m 0755 "%{OUTPUT_FOLDER}"/mini_browser      "%{buildroot}"/usr/apps/org.tizen.%{name}/bin/
+install -m 0755 "%{OUTPUT_FOLDER}"/ubrowser          "%{buildroot}"/usr/apps/org.tizen.%{name}/bin/
 
 install -d "%{buildroot}"/usr/share/packages
 install -m 0644 ewk/efl_webview_app/chromium-efl_v3.0.xml "%{buildroot}"/usr/share/packages
 
-mkdir -p "%{buildroot}"/usr/apps/%{name}/res/icons
+mkdir -p "%{buildroot}"/usr/apps/org.tizen.%{name}/res/icons
 install -d "%{buildroot}"/usr/share/icons
-install -m 0644 ewk/efl_webview_app/mini-browser.png "%{buildroot}"/usr/apps/%{name}/res/icons
-%else
+install -m 0644 ewk/efl_webview_app/mini-browser.png "%{buildroot}"/usr/apps/org.tizen.%{name}/res/icons
+%else # for Tizen v2.X
 install -m 0755 "%{OUTPUT_FOLDER}"/efl_webview_app   "%{buildroot}"%{_bindir}
 install -m 0755 "%{OUTPUT_FOLDER}"/mini_browser      "%{buildroot}"%{_bindir}
 install -m 0755 "%{OUTPUT_FOLDER}"/ubrowser          "%{buildroot}"%{_bindir}
@@ -417,14 +445,15 @@ chown -R app:app %{CHROMIUM_WEBDB_DIR}/data
 %postun
 
 %files
-%if "%{?chromium_efl_tizen_version:%{chromium_efl_tizen_version}}%{!?chromium_efl_tizen_version:0}" == "3.0"
+# for Tizen v3.0
+%if "%{?chromium_efl_tizen_version}%{!?chromium_efl_tizen_version:0}" == "3.0"
 %manifest packaging/chromium-efl_v3.0.manifest
-/usr/apps/%{name}/bin/efl_webview_app
-/usr/apps/%{name}/bin/mini_browser
-/usr/apps/%{name}/bin/ubrowser
+/usr/apps/org.tizen.%{name}/bin/efl_webview_app
+/usr/apps/org.tizen.%{name}/bin/mini_browser
+/usr/apps/org.tizen.%{name}/bin/ubrowser
 /usr/share/packages/chromium-efl_v3.0.xml
-/usr/apps/%{name}/res/icons/mini-browser.png
-%else
+/usr/apps/org.tizen.%{name}/res/icons/mini-browser.png
+%else # for Tizen v2.X
 %manifest packaging/%{name}.manifest
 %{_bindir}/efl_webview_app
 %{_bindir}/mini_browser