Spec file and main changes in order to create build dependency
authorWojciech Kosowicz <w.kosowicz@samsung.com>
Fri, 12 Dec 2014 14:25:57 +0000 (15:25 +0100)
committerWojciech Kosowicz <w.kosowicz@samsung.com>
Mon, 15 Dec 2014 11:22:04 +0000 (12:22 +0100)
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 <w.kosowicz@samsung.com>
packaging/webapi-plugins.spec
src/common/common.gypi
src/tizen-wrt.gyp

index a96ee5dc98ed5f4b8ce9c9d551c42de760e28ea6..2ca2e06bc89065f9d67a4ee0f46f81c217bd8f3c 100644 (file)
@@ -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)
index 8ca39f0586eb91d2f96439982f32a5485132c8a8..f3aba32421335f56e235a830cc47c11c60dfc343 100644 (file)
@@ -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'] } ],
index cc82400fed5b3322a0f49f6c60caa5bc4a3cd063..7cd3c98063392397cd1dde266782f7cc7d546c14 100644 (file)
         '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:*',
+          ],
+        },
+       ],
+     ],
     },
   ],
 }