[Tizen] Remove profile build dependencies 09/115909/6
authorhk57.kim <hk57.kim@samsung.com>
Wed, 22 Feb 2017 03:47:54 +0000 (12:47 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Wed, 22 Feb 2017 09:32:48 +0000 (18:32 +0900)
- This is for Tizen 4.0.
- Added backward-compatibility that does not deteriorate 4.0 Configurability

- When you SR this, you need to create JIRA-TRE issue of:
  : add tel-plugin-packetservice-profile_tv for TV

(It's add, not replace.)

Change-Id: Id77d8b7eeec7d1959a4965c9142c5f74a9e39792
Signed-off-by: hk57.kim <hk57.kim@samsung.com>
packaging/tel-plugin-packetservice.spec
src/ps_service.c
src/ps_tcore-interface.c

index 27e92be..c8ee778 100644 (file)
@@ -1,6 +1,10 @@
+# Do not create provides fro profile-tv because the main package
+# should anchor any reverse-dependencies
+%global __provides_exclude_from ^(.*\\.tv)$
+
 %define major 0
 %define minor 3
-%define patchlevel 38
+%define patchlevel 39
 
 Name:           tel-plugin-packetservice
 Version:        %{major}.%{minor}.%{patchlevel}
@@ -32,6 +36,18 @@ Recommends:  %{name}-dbinit-profile_common = %{version}-%{release}
 %description
 Telephony Packet Service library
 
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if tv || "undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "mobile" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+# Extension for TV
+%package profile_tv
+Summary:       Extension for TV
+Requires:      %{name} = %{version}-%{release}
+
+%description profile_tv
+Telephony Packet Service library Extension for TV
+%endif # End of extension for TV
+
 %package dbinit-profile_common
 SUmmary:       DB Init Script for non-IVI (tel-plugin-packageservice)
 Provides:      %{name}-dbinit = %{version}-%{release}
@@ -60,16 +76,31 @@ DB init script for %{name} installation specialized for ivi profile.
 %prep
 %setup -q
 
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if tv || "undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "mobile" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+# Extension for TV
+
+%cmake . -DSYSCONFDIR=%{_sysconfdir} \
+       -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+       -DLIB_INSTALL_DIR=%{_libdir} \
+       -DPREPAID_SIM_APN_SUPPORT=1 \
+
+make %{?_smp_mflags}
+
+mkdir -p build_tv
+
+%make_install
+
+cp -a %{buildroot}%{_libdir}/telephony/plugins/ps-plugin* build_tv/
+
+%endif # End of extension for TV
+
 %build
 %cmake . -DSYSCONFDIR=%{_sysconfdir} \
        -DCMAKE_INSTALL_PREFIX=%{_prefix} \
        -DLIB_INSTALL_DIR=%{_libdir} \
-#%if 0%{?model_build_feature_connect_default_connection_without_timer}
-#      -DCONNECT_DEFAULT_CONNECTION_WITHOUT_TIMER=1 \
-#%endif
-#%if 0%{?prepaid_sim_apn_support}
-#      -DPREPAID_SIM_APN_SUPPORT=1 \
-#%endif
+       -DPREPAID_SIM_APN_SUPPORT=0 \
 
 make %{?_smp_mflags}
 
@@ -141,6 +172,35 @@ cp %{SOURCE1} %{buildroot}/etc/dbus-1/system.d/tel-plugin-ps.conf
 cp resources/tv/dnet_db_init.sql %{buildroot}%{_datadir}/ps-plugin/dnet_db_init.sql.tv
 cp resources/ivi/dnet_db_init.sql %{buildroot}%{_datadir}/ps-plugin/dnet_db_init.sql.ivi
 
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if tv || "undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "mobile" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+# Extension for TV
+mv build_tv/ps-plugin.so %{buildroot}%{_libdir}/telephony/plugins/ps-plugin.so.tv
+
+%post profile_tv
+mv %{_libdir}/telephony/plugins/ps-plugin.so.tv %{_libdir}/telephony/plugins/ps-plugin.so
+/sbin/ldconfig
+
+%preun profile_tv
+case "$1" in
+  0)
+    # This is an un-installation.
+       rm %{_libdir}/telephony/plugins/ps-plugin.so
+    /sbin/ldconfig
+  ;;
+  1)
+    # This is an upgrade.
+    # Do nothing.
+    :
+  ;;
+esac
+
+%files profile_tv
+%manifest tel-plugin-packetservice.manifest
+%{_libdir}/telephony/plugins/ps-plugin*.tv
+%endif # End of extension for TV
+
 %files
 %manifest tel-plugin-packetservice.manifest
 %defattr(644,root,root,-)
@@ -150,6 +210,12 @@ cp resources/ivi/dnet_db_init.sql %{buildroot}%{_datadir}/ps-plugin/dnet_db_init
 %{_datadir}/upgrade/scripts/500.dnet_db_upgrade_24_30.sh
 #%{_datadir}/ps-plugin/apns-conf.xml
 %{_libdir}/telephony/plugins/ps-plugin*
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if tv || "undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "mobile" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+# Extension for TV
+%exclude %{_libdir}/telephony/plugins/ps-plugin*.tv
+%endif # End of extension for TV
 %{_datadir}/license/tel-plugin-packetservice
 /etc/dbus-1/system.d/tel-plugin-ps.conf
 
index c9f4eb7..a23568c 100644 (file)
@@ -864,6 +864,9 @@ void _ps_service_connection_timer(gpointer object, gpointer context)
 void _ps_service_reset_connection_timer(gpointer context)
 {
        gboolean f_awo = FALSE;
+#ifdef PREPAID_SIM_APN_SUPPORT
+       gboolean p_awo = FALSE;
+#endif
        gboolean ims_activation_requested = FALSE;
        ps_service_t *service = NULL;
        ps_context_t *ps_context = context;
@@ -877,8 +880,6 @@ void _ps_service_reset_connection_timer(gpointer context)
        }
 
 #ifdef PREPAID_SIM_APN_SUPPORT
-       gboolean p_awo = FALSE;
-
        p_awo = _ps_context_get_prepaid_alwayson_enable(context);
        if (!f_awo && !p_awo)
                return;
index 3650878..82ed11c 100644 (file)
@@ -1250,9 +1250,7 @@ static enum tcore_hook_return __on_hook_call_status(Server *s, CoreObject *sourc
 #ifdef PREPAID_SIM_APN_SUPPORT
        Storage *strg_vconf = NULL;
        TcorePlugin *plg;
-       gchar *operator = NULL;
        ps_context_t *context = NULL;
-       int profile_id;
 #endif
 
        dbg("ps call status event");