SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
-SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DTB_LOG -D__TIZEN__ -DDPM_BUILD_${DPM_BUILD_TYPE} -DPROFILE_${BUILD_PROFILE} -DDATA_DIR=${DATA_DIR}")
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DTB_LOG -D__TIZEN__ -DPROFILE_${BUILD_PROFILE} -DDATA_DIR=${DATA_DIR}")
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DCONFIG_FILE_PATH=${DAEMON_CONFIG_DIR}/${DAEMON_CONFIG_FILE}")
-if (NOT DEFINED LIB_INCLUDE_DIR)
- SET(LIB_INCLUDE_DIR "/usr/include")
-endif(NOT DEFINED LIB_INCLUDE_DIR)
-
# Enable logging
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -D__LOGGING__ ")
audit-trail
jsoncpp
boost_system
- boost_thread
boost_serialization
curl
capi-system-info
+ systemd
)
-# systemd dependency handling
-find_library(LIBSYSTEMD_DEV systemd)
-if (LIBSYSTEMD_DEV)
- message(STATUS "systemd library found ${LIBSYSTEMD_DEV}")
- target_link_libraries(${PROJECT_NAME} systemd)
-else()
- message(FATAL_ERROR "systemd library not found")
-endif()
-
install(TARGETS ${PROJECT_NAME} DESTINATION ${BIN_DIR})
install(FILES ${PROJECT_NAME}.manifest DESTINATION ${MANIFESTDIR})
install(FILES sam.service DESTINATION ${SERVICE_INSTALL_DIR})
BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(jsoncpp)
BuildRequires: pkgconfig(audit-trail)
+BuildRequires: pkgconfig(libtzplatform-config)
%if ("%{GTEST_TYPE}" == "mock")
BuildRequires: pkgconfig(gmock)
%define _manifestdir /usr/share/packages
%define _service_dir /usr/lib/systemd/system
%define _service_symlink_dir /etc/systemd/system/multi-user.target.wants
-%define _lib_include_dir /usr/include
%define _conf_dir /etc/%{_project_name}
%define _conf_file %{_project_name}.conf
%define _data_dir /opt/data/%{_project_name}
%{!?build_type:%define build_type "RELEASE"}
+%if %{build_type} == "DEBUG" || %{build_type} == "PROFILING" || %{build_type} == "CCOV"
+ CFLAGS="$CFLAGS -Wp,-U_FORTIFY_SOURCE"
+ CXXFLAGS="$CXXFLAGS -Wp,-U_FORTIFY_SOURCE"
+%endif
+
+
cmake -H./ -B./build-gbs \
-DLIB_INSTALL_DIR=%{_libdir} \
-DMANIFESTDIR=%{_manifestdir} \
-DBIN_DIR=%{_app_dir} \
-DGTEST_LIB=%{_gtest_lib} \
- -DLIB_INCLUDE_DIR=%{_lib_include_dir} \
-DSERVICE_INSTALL_DIR=%{_service_dir} \
-DDAEMON_CONFIG_FILE=%{_conf_file} \
-DDAEMON_CONFIG_DIR=%{_conf_dir} \
-DDAEMON_APP_NAME=%{_app_name} \
-DCMAKE_BUILD_TYPE=%{build_type} \
- -DDPM_BUILD_TYPE=%{dpm_type} \
-DDAEMON_NAME=%{_app_name} \
-DDATA_DIR=%{_data_dir} \
#eol
%package sam
Summary: Suspicious Activity Monitor
Provides: sam
+Requires: dpm
+Requires: libaudit-trail
%description sam
Suspicious Activity Monitor daemon