SET(INC_DIR include)
INCLUDE_DIRECTORIES(${INC_DIR})
-INCLUDE(FindPkgConfig)
-pkg_check_modules(${fw_name} REQUIRED
+SET(PKG_MODULES
dlog
vconf
capi-base-common
capi-system-info
gio-2.0
+)
+
+IF("${TIZEN_FEATURE_TRACKER}" STREQUAL "on")
+SET(PKG_MODULES ${PKG_MODULES}
tracker
)
+ADD_DEFINITIONS("-DTIZEN_FEATURE_TRACKER")
+ENDIF("${TIZEN_FEATURE_TRACKER}" STREQUAL "on")
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(${fw_name} REQUIRED ${PKG_MODULES})
FOREACH(flag ${${fw_name}_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
+%define TIZEN_FEATURE_TRACKER on
+
+%if "%{?profile}" == "tv"
+%define TIZEN_FEATURE_TRACKER off
+%endif
+
Name: capi-system-device
Summary: A Device library in TIZEN C API
Version: 0.1.0
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(gio-2.0)
+%if %{?TIZEN_FEATURE_TRACKER} == "on"
BuildRequires: pkgconfig(tracker)
+%endif
%description
A Device library in TIZEN C API package.
%build
cp %{SOURCE1} .
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%cmake . -DFULLVER=%{version} \
+ -DMAJORVER=${MAJORVER} \
+ -DTIZEN_FEATURE_TRACKER=%{TIZEN_FEATURE_TRACKER}
+
%__make %{?jobs:-j%jobs}
%install
#include <stdlib.h>
#include <stdbool.h>
#include <errno.h>
+
+#ifdef TIZEN_FEATURE_TRACKER
#include <tracker.h>
+#endif /* TIZEN_FEATURE_TRACKER */
#include "power.h"
#include "display.h"
return NULL;
}
+#ifdef TIZEN_FEATURE_TRACKER
static void remove_off_lock_timeout(void)
{
if (off_lock_timeout) {
else
_E("Failed to add Power Lock timeout handler");
}
+#else
+#define add_off_lock_timeout() do {} while (0)
+#define remove_off_lock_timeout() do {} while (0)
+#define remove_padding_timeout() do {} while (0)
+#endif /* TIZEN_FEATURE_TRACKER */
static void lock_cb(void *data, GVariant *result, GError *err)
{