Exclude shortcut package from wearable 82/73982/2 submit/tizen/20160613.064514
authorseungha.son <seungha.son@samsung.com>
Fri, 10 Jun 2016 08:10:21 +0000 (17:10 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Mon, 13 Jun 2016 04:22:18 +0000 (21:22 -0700)
Signed-off-by: seungha.son <seungha.son@samsung.com>
Change-Id: I058747689c64c48c981ff9106c80e6f49bd9e070

CMakeLists.txt
include/service_common.h
packaging/data-provider-master.spec
src/main.c
src/service_common.c

index 39b3d46..72edd7a 100644 (file)
@@ -6,31 +6,56 @@ SET(EXEC_PREFIX "\${prefix}")
 SET(LIBDIR ${LIB_INSTALL_DIR})
 SET(INCLUDEDIR "\${prefix}/include")
 
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(pkg REQUIRED
-       dlog
-       aul
-       vconf
-       sqlite3
-       db-util
-       glib-2.0
-       gio-2.0
-       bundle
-       ecore
-       eina
-       pkgmgr
-       notification
-       badge
-       libsmack
-       shortcut
-       pkgmgr-info
-       libsystemd-daemon
-       capi-appfw-app-manager
-       cynara-client
-       cynara-session
-       cynara-creds-socket
-)
+IF (MOBILE)
+       INCLUDE(FindPkgConfig)
+       pkg_check_modules(pkg REQUIRED
+               dlog
+               aul
+               vconf
+               sqlite3
+               db-util
+               glib-2.0
+               gio-2.0
+               bundle
+               ecore
+               eina
+               pkgmgr
+               notification
+               badge
+               shortcut
+               libsmack
+               pkgmgr-info
+               libsystemd-daemon
+               capi-appfw-app-manager
+               cynara-client
+               cynara-session
+               cynara-creds-socket
+               )
+ELSEIF (WEARABLE)
+       INCLUDE(FindPkgConfig)
+       pkg_check_modules(pkg REQUIRED
+               dlog
+               aul
+               vconf
+               sqlite3
+               db-util
+               glib-2.0
+               gio-2.0
+               bundle
+               ecore
+               eina
+               pkgmgr
+               notification
+               badge
+               libsmack
+               pkgmgr-info
+               libsystemd-daemon
+               capi-appfw-app-manager
+               cynara-client
+               cynara-session
+               cynara-creds-socket
+               )
+ENDIF (MOBILE)
 
 SET(PACKAGE "${PROJECT_NAME}")
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Winline -Werror -fno-builtin-malloc -fno-omit-frame-pointer -g -fPIE")
@@ -61,16 +86,28 @@ ELSEIF (WEARABLE)
        ADD_DEFINITIONS("-DWEARABLE")
 ENDIF (MOBILE)
 
-SET(BUILD_SOURCE
-       src/main.c
-       src/util.c
-       src/pkgmgr.c
-       src/shortcut_service.c
-       src/badge_service.c
-       src/notification_service.c
-       src/service_common.c
-       src/critical_log.c
-)
+IF (MOBILE)
+       SET(BUILD_SOURCE
+               src/main.c
+               src/util.c
+               src/pkgmgr.c
+               src/badge_service.c
+               src/notification_service.c
+               src/service_common.c
+               src/critical_log.c
+               src/shortcut_service.c
+               )
+ELSEIF (WEARABLE)
+       SET(BUILD_SOURCE
+               src/main.c
+               src/util.c
+               src/pkgmgr.c
+               src/badge_service.c
+               src/notification_service.c
+               src/service_common.c
+               src/critical_log.c
+               )
+ENDIF (MOBILE)
 
 STRING(REPLACE "-L-l" "-l" pkg_fixed_LDFLAGS ${pkg_LDFLAGS})
 STRING(REPLACE "-l" " -l" pkg_LDFLAGS ${pkg_fixed_LDFLAGS})
index 709aa45..5cafa69 100755 (executable)
 #include <gio/gio.h>
 #include <notification.h>
 #include <badge.h>
-#include <shortcut.h>
 #include <stdlib.h>
+#ifndef WEARABLE
+#include <shortcut.h>
+#endif
 
 #define NORMAL_UID_BASE 5000
 
index 23c4309..5fcf011 100755 (executable)
@@ -27,7 +27,9 @@ BuildRequires: pkgconfig(pkgmgr)
 BuildRequires: pkgconfig(pkgmgr-info)
 BuildRequires: pkgconfig(notification)
 BuildRequires: pkgconfig(badge)
+%if "%{profile}" == "mobile"
 BuildRequires: pkgconfig(shortcut)
+%endif
 BuildRequires: pkgconfig(libsystemd-daemon)
 BuildRequires: pkgconfig(cynara-client)
 BuildRequires: pkgconfig(cynara-session)
@@ -56,7 +58,7 @@ export FFLAGS="${FFLAGS} -DTIZEN_ENGINEER_MODE"
 export ENGINEER=true
 %endif
 
-%if "%{_repository}" == "wearable"
+%if "%{profile}" == "wearable"
 export MOBILE=Off
 export WEARABLE=On
 %else
index 05c4a7b..8e44bcf 100755 (executable)
 #include "util.h"
 #include "critical_log.h"
 #include "service_common.h"
-#include "shortcut_service.h"
 #include "notification_service.h"
 #include "badge_service.h"
+#ifndef WEARABLE
+#include "shortcut_service.h"
+#endif
 
 static void lang_key_changed_cb(keynode_t *node EINA_UNUSED, void *first)
 {
@@ -70,11 +72,11 @@ static inline int app_create(void)
                DbgPrint("VCONFKEY_LANGSET notify key chenaged: %d\n", ret);
 
        lang_key_changed_cb(NULL, NULL);
-
+#ifndef WEARABLE
        ret = shortcut_service_init();
        if (ret < 0)
                DbgPrint("shortcut: %d\n", ret);
-
+#endif
        ret = notification_service_init();
        if (ret < 0)
                DbgPrint("noti: %d\n", ret);
@@ -97,11 +99,11 @@ static inline int app_terminate(void)
        ret = notification_service_fini();
        if (ret < 0)
                DbgPrint("noti: %d\n", ret);
-
+#ifndef WEARABLE
        ret = shortcut_service_fini();
        if (ret < 0)
                DbgPrint("shortcut: %d\n", ret);
-
+#endif
        DbgPrint("Terminated\n");
        return 0;
 }
index d5a7279..31e1863 100755 (executable)
@@ -28,7 +28,9 @@
 
 #include "notification_service.h"
 #include "badge_service.h"
+#ifndef WEARABLE
 #include "shortcut_service.h"
+#endif
 
 #define PROVIDER_BUS_NAME "org.tizen.data_provider_service"
 #define PROVIDER_OBJECT_PATH "/org/tizen/data_provider_service"