FLAGS += -DPROFILE_TV
endif # PROFILE_TV
-# set using old json
-ifeq ($(OLD_JSON),y)
-FLAGS += -DOLD_JSON
-endif # OLD_JSON
-
# CALL_MNGR
ifeq ($(CALL_MNGR),y)
FLAGS += -DCALL_MNGR
-lsmack \
-lecore \
-lcapi-system-info \
- -lwebsockets \
-lparserelf
# CALL_MNGR
LDFLAGS += -lcall-manager
endif # CALL_MNGR
-# set using old json
-ifeq ($(OLD_JSON),y)
-LDFLAGS += -ljson
-else
-LDFLAGS += -ljson-c
-endif # OLD_JSON
-
SRC_C := \
buffer.c \
da_data.c \
smack.c \
malloc_debug.c \
target.c \
- thread.c \
- wsi.c
+ thread.c
SRC_CPP := \
cpp/features/feature.cpp \
cpp/features/feature_manager.cpp \
cpp/features/feature_manager_c.cpp \
- cpp/features/feature_nsp.cpp \
\
cpp/inst/AppInst.cpp \
cpp/inst/AppInstCont.cpp \
all: debug
GENERATED_DIR = include/generated
-GENERATED_WSI_PROF_H = include/generated/wsi_prof.h
-GENERATED_NSP_H = include/generated/nsp_data.h
-GENERATED_HEADERS := \
- $(GENERATED_WSI_PROF_H) \
- $(GENERATED_NSP_H)
-
-$(GENERATED_WSI_PROF_H): ../scripts/gen_wsi_prof.sh
- sh $< > $@
+GENERATED_HEADERS :=
#Preload
endif # WSP_SUPPORT
+# NSP
+ifeq ($(NSP_SUPPORT),y)
+ SRC_CPP += cpp/features/feature_nsp.cpp
+ GENERATED_NSP_H = include/generated/nsp_data.h
+ GENERATED_HEADERS += $(GENERATED_NSP_H)
+
+ $(GENERATED_NSP_H): ../scripts/gen_nsp_data.sh
+ sh $< > $@
+endif # NSP_SUPPORT
+
+# WSI
+ifeq ($(WSI_SUPPORT),y)
+ SRC_C += wsi.c
+ LDFLAGS += -lwebsockets -ljson-c
+ FLAGS += -DWSI_SUPPORT
+ GENERATED_WSI_PROF_H = include/generated/wsi_prof.h
+ GENERATED_HEADERS += $(GENERATED_WSI_PROF_H)
-$(GENERATED_NSP_H): ../scripts/gen_nsp_data.sh
+ $(GENERATED_WSI_PROF_H): ../scripts/gen_wsi_prof.sh
sh $< > $@
+endif # WSI_SUPPORT
$(GENERATED_DIR):
mkdir -p $(GENERATED_DIR)
}
break;
case APP_TYPE_WEB:
+#ifdef WSI_SUPPORT
if (wsi_set_profile(app_info)) {
LOGE("Cannot set web application profiling\n");
res = -1;
LOGE("Cannot set web application smack rules\n");
res = -1;
}
+#endif /* WSI_SUPPORT */
if (exec_app_web(app_info->app_id)) {
LOGE("Cannot exec web app %s\n", app_info->app_id);
res = -1;
}
+#ifdef WSI_SUPPORT
if (!is_feature_enabled(FL_WEB_PROFILING)) {
if (wsi_enable_profiling(PROF_OFF)) {
LOGE("Cannot disable web application profiling\n");
}
wsi_start();
+#endif /* WSI_SUPPORT */
break;
default:
Group: System/Libraries
License: Apache-2.0
Source: %{name}_%{version}.tar.gz
-BuildRequires: smack-devel
-BuildRequires: libattr-devel
-BuildRequires: glib2-devel
-BuildRequires: aul-devel
-BuildRequires: vconf-devel
-BuildRequires: capi-system-info-devel
-BuildRequires: capi-system-runtime-info-devel
-BuildRequires: libwebsockets-devel
-BuildRequires: wrt
-%if "%{sec_product_feature_profile_wearable}" == "1"
-BuildRequires: libjson-devel
-%else
-BuildRequires: pkgconfig(json-c)
-%endif
-BuildRequires: pkgconfig(ecore)
-%if "%{?tizen_profile_name}" == "mobile"
-BuildRequires: call-manager
-BuildRequires: libcall-manager-devel
-%endif
-BuildRequires: swap-probe-devel
-BuildRequires: swap-probe-elf
-%if "%{?tizen_profile_name}" == "tv"
-BuildRequires: webkit2-efl-tv
-%if "%{TIZEN_PRODUCT_TV}" != "1"
-BuildRequires: webkit2-efl-tv-debuginfo
-%endif
-%else
-BuildRequires: webkit2-efl
-BuildRequires: webkit2-efl-debuginfo
-%endif
-%if "%{sec_product_feature_profile_wearable}" == "1"
-BuildRequires: launchpad-process-pool
-BuildRequires: launchpad-loader
-%else
-BuildRequires: launchpad
-%endif
-BuildRequires: app-core-efl
-%if "%{TIZEN_PRODUCT_TV}" != "1"
-BuildRequires: app-core-debuginfo
-%endif
-%if "%_project" != "Kirana_SWA_OPEN:Build" && "%_project" != "Kirana_SWA_OPEN:Daily"
-Requires: swap-modules
-%endif
-Requires: swap-probe
-Requires: swap-probe-elf
-Requires: sdbd
-Requires: libwebsockets
+
+
+# setup config
+%define NSP_SUPPORT 0
+%define WSP_SUPPORT 0
+%define WSI_SUPPORT 0
+
+
+ExcludeArch: aarch64 x86_64
+BuildRequires: smack-devel
+BuildRequires: libattr-devel
+BuildRequires: glib2-devel
+BuildRequires: aul-devel
+BuildRequires: vconf-devel
+BuildRequires: capi-system-info-devel
+BuildRequires: capi-system-runtime-info-devel
+BuildRequires: pkgconfig(json-c)
+BuildRequires: pkgconfig(ecore)
+BuildRequires: launchpad
+BuildRequires: app-core-efl
+BuildRequires: swap-probe-devel
+BuildRequires: swap-probe-elf
+
+
+# FIXME: add WSP_SUPPORT wrt webkit2-efl and webkit2-efl-debuginfo
+# FIXME: add NSP_SUPPORT app-core-efl-debuginfo
+# FIXME: add WSI_SUPPORT libwebsockets-devel
+
+Requires: swap-modules
+Requires: swap-probe
+Requires: swap-probe-elf
+Requires: sdbd
%description
SWAP manager is a part of data collection back-end for DA.
popd
cd daemon
-%if "%{?tizen_profile_name}" == "mobile"
-SWAP_BUILD_CMD+=" CALL_MNGR=y"
+%if %{NSP_SUPPORT}
+ export NSP_SUPPORT=y
%endif
-%if "%{?tizen_profile_name}" == "tv"
-SWAP_BUILD_CMD+=" PROFILE_TV=y"
-%else
-%if "%{sec_product_feature_profile_wearable}" == "1"
-SWAP_BUILD_CMD+=" OLD_JSON=y"
-%else
-SWAP_BUILD_CMD+=" WSP_SUPPORT=y"
+%if %{WSP_SUPPORT}
+ export WSP_SUPPORT=y
%endif
+
+%if %{WSI_SUPPORT}
+ export WSI_SUPPORT=y
%endif
-SWAP_BUILD_CMD+=" make"
-eval ${SWAP_BUILD_CMD}
+make
%install
rm -rf ${RPM_BUILD_ROOT}