From: Wojciech Kosowicz Date: Fri, 12 Dec 2014 14:25:57 +0000 (+0100) Subject: Spec file and main changes in order to create build dependency X-Git-Tag: submit/tizen_tv/20150603.064601~1^2~831 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ade3c8f19c3261c749c52667259d383bd159cd9;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git Spec file and main changes in order to create build dependency Spec now is giving variable to gyp file that stores information about currently building profile. Gyp file distinguishes variable and builts proper files according to profile [Verification] Set profile mobile and try build with wearable gbs repo. It should not built. Change profile to gbs profile to mobile and the repo should built Change-Id: Id8fc09924a01e599c67ead4aac8d0ab409f6f57e Signed-off-by: Wojciech Kosowicz --- diff --git a/packaging/webapi-plugins.spec b/packaging/webapi-plugins.spec index a96ee5dc..2ca2e06b 100644 --- a/packaging/webapi-plugins.spec +++ b/packaging/webapi-plugins.spec @@ -13,17 +13,10 @@ Group: Development/Libraries Summary: Tizen Web APIs implemented Source0: %{name}-%{version}.tar.gz - - -# These should be provided by platform -%define tizen_profile_mobile 1 -%define tizen_profile_wearable 0 -%define tizen_profile_tv 0 - #################################################################### # Mobile Profile : Kiran(SM-Z130H), Redwood(SM-Z910F) # #################################################################### -%if 0%{?tizen_profile_mobile} +%if "%{?profile}" == "mobile" %define tizen_feature_account_support 0 %define tizen_feature_archive_support 0 @@ -43,8 +36,8 @@ Source0: %{name}-%{version}.tar.gz %define tizen_feature_fm_radio_support 0 %define tizen_feature_gamepad_support 0 %define tizen_feature_ham_support 0 -%define tizen_feature_messaging_email_support 0 -%define tizen_feature_messaging_support 0 +%define tizen_feature_messaging_email_support 1 +%define tizen_feature_messaging_support 1 %define tizen_feature_nbs_support 0 %define tizen_feature_nfc_emulation_support 0 %define tizen_feature_nfc_support 0 @@ -64,7 +57,7 @@ Source0: %{name}-%{version}.tar.gz #################################################################### # Wearable Profile : Gear3(Ponte) # #################################################################### -%if 0%{?tizen_profile_wearable} +%if "%{?profile}" == "wearable" %define tizen_feature_account_support 0 %define tizen_feature_archive_support 0 @@ -105,7 +98,7 @@ Source0: %{name}-%{version}.tar.gz #################################################################### # TV Profile # #################################################################### -%if 0%{?tizen_profile_tv} +%if "%{?profile}" == "tv" %define tizen_feature_account_support 0 %define tizen_feature_archive_support 0 @@ -154,7 +147,6 @@ BuildRequires: pkgconfig(capi-system-power) BuildRequires: pkgconfig(libpcrecpp) BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(dbus-glib-1) -BuildRequires: pkgconfig(email-service) BuildRequires: pkgconfig(evas) BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(glib-2.0) @@ -170,7 +162,10 @@ BuildRequires: pkgconfig(xrandr) BuildRequires: python BuildRequires: pkgconfig(tapi) BuildRequires: pkgconfig(libpcrecpp) -BuildRequires: pkgconfig(contacts-service2) + +%if 0%{?tizen_feature_messaging_support} +BuildRequires: pkgconfig(email-service) +%endif %if 0%{?tizen_feature_badge_support} BuildRequires: pkgconfig(badge) diff --git a/src/common/common.gypi b/src/common/common.gypi index 8ca39f05..f3aba324 100644 --- a/src/common/common.gypi +++ b/src/common/common.gypi @@ -8,7 +8,9 @@ }, 'target_defaults': { 'conditions': [ - ['extension_host_os != "mobile"', { + ['extension_host_os != "mobile"' and + 'extension_host_os != "wearable"' and + 'extension_host_os != "tv"', { 'sources/': [['exclude', '_mobile\\.cc$|mobile/']], 'includes/': [['exclude', '_mobile\\.gypi$|mobile/']], }], @@ -29,6 +31,8 @@ 'sources/': [['exclude', '_tizen\\.cc$|tizen/']], 'includes/': [['exclude', '_tizen\\.gypi$|tizen/']], }], + ['extension_host_os == "tv"', { 'defines': ['TIZEN_TV'] } ], + ['extension_host_os == "wearable"', { 'defines': ['TIZEN_WEARABLE'] } ], ['extension_host_os == "mobile"', { 'defines': ['TIZEN_MOBILE'] } ], ['extension_host_os == "ivi"', { 'defines': ['TIZEN_IVI'] } ], ['extension_host_os == "desktop"', { 'defines': ['GENERIC_DESKTOP'] } ], diff --git a/src/tizen-wrt.gyp b/src/tizen-wrt.gyp index cc82400f..7cd3c980 100644 --- a/src/tizen-wrt.gyp +++ b/src/tizen-wrt.gyp @@ -13,14 +13,21 @@ 'utils/utils.gyp:*', 'power/power.gyp:*', 'messageport/messageport.gyp:*', - #'calendar/calendar.gyp:*', - 'callhistory/callhistory.gyp:*', 'bookmark/bookmark.gyp:*', - #'datasync/datasync.gyp:*', - 'contact/contact.gyp:*', - 'messaging/messaging.gyp:*', 'archive/archive.gyp:*' ], + 'conditions': [ + [ 'extension_host_os == "mobile"', { + 'dependencies': [ + 'callhistory/callhistory.gyp:*', + 'contact/contact.gyp:*', + 'calendar/calendar.gyp:*', + 'datasync/datasync.gyp:*', + 'messaging/messaging.gyp:*', + ], + }, + ], + ], }, ], }