INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED
capi-appfw-application
- capi-appfw-app-manager
capi-system-runtime-info
capi-system-device
capi-system-info
- capi-system-sensor
- capi-location-manager
capi-network-wifi
capi-system-system-settings
capi-telephony-sim
capi-network-tethering
- capi-system-media-key
capi-network-bluetooth
- capi-media-sound-manager
pmapi
haptic
sysman
aul
vconf
- sensor
glib-2.0
elementary
icu-i18n
osp-appfw
osp-appfw-server
libwbxml2
- wifi-direct
)
FOREACH(flag ${pkgs_CFLAGS})
Name: osp-app-service
Summary: osp application service
Version: 1.2.2.1
-Release: 4
+Release: 5
Group: System/Libraries
License: Apache-2.0 or Flora
Source0: %{name}-%{version}.tar.gz
BuildRequires: hash-signer
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(chromium)
-BuildRequires: pkgconfig(capi-system-media-key)
BuildRequires: pkgconfig(capi-network-bluetooth)
BuildRequires: pkgconfig(capi-appfw-application)
-BuildRequires: pkgconfig(capi-appfw-app-manager)
-BuildRequires: pkgconfig(capi-appfw-package-manager)
BuildRequires: pkgconfig(capi-system-device)
BuildRequires: pkgconfig(capi-system-info)
BuildRequires: pkgconfig(alarm-service)
BuildRequires: pkgconfig(edbus)
BuildRequires: pkgconfig(calendar-service2)
BuildRequires: pkgconfig(osp-appfw-server)
-BuildRequires: osp-appfw-internal-devel
BuildRequires: osp-shell-internal-devel
BuildRequires: pkgconfig(icu-i18n)
BuildRequires: pkgconfig(capi-system-system-settings)
BuildRequires: pkgconfig(capi-system-runtime-info)
-BuildRequires: pkgconfig(capi-location-manager)
-BuildRequires: pkgconfig(capi-media-sound-manager)
-BuildRequires: pkgconfig(capi-system-sensor)
BuildRequires: pkgconfig(capi-network-wifi)
-BuildRequires: pkgconfig(sensor)
BuildRequires: pkgconfig(pmapi)
BuildRequires: pkgconfig(tapi)
BuildRequires: pkgconfig(capi-telephony-sim)
BuildRequires: pkgconfig(haptic)
BuildRequires: pkgconfig(ail)
BuildRequires: pkgconfig(sysman)
-BuildRequires: pkgconfig(wifi-direct)
BuildRequires: pkgconfig(capi-network-wifi-direct)
BuildRequires: pkgconfig(libwbxml2)
Requires(post): ss-server
Requires(preun): /usr/bin/systemctl
Requires(post): /usr/bin/systemctl
-Requires(postun): /usr/bin/systemctl
%description
osp application service
SET(PLUGIN_INSTALL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/..")
+INCLUDE(FindPkgConfig)
+pkg_check_modules(plugins REQUIRED
+ capi-appfw-application
+ capi-messaging-messages
+ aul
+ vconf
+ glib-2.0
+ chromium
+ osp-appfw
+ osp-appfw-server
+ calendar-service2
+)
+
+FOREACH(flag ${plugins_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+
ADD_SUBDIRECTORY(alarm-condition-handler)
ADD_SUBDIRECTORY(nfc-condition-handler)
ADD_SUBDIRECTORY(accessory-condition-handler)
ADD_SUBDIRECTORY(message-condition-handler)
ADD_SUBDIRECTORY(calendar-condition-handler)
+
SET (this_target osp-cond-accessory)
INCLUDE_DIRECTORIES (
- /usr/include/osp
- /usr/include/osp/app
- /usr/include/osp/base
- /usr/include/osp/io
- /usr/include/osp/server
../../inc
./
)
SET_TARGET_PROPERTIES(${this_target} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${PLUGIN_INSTALL_DIR}/lib")
-TARGET_LINK_LIBRARIES(${this_target} -L/usr/lib/osp -losp-appfw -L/usr/lib/osp-server -losp-appfw-server -Wl,--no-undefined -Wl,--as-needed)
-TARGET_LINK_LIBRARIES(${this_target} "-lail")
+TARGET_LINK_LIBRARIES(${this_target} -Wl,--no-undefined -Wl,--as-needed)
+TARGET_LINK_LIBRARIES(${this_target} ${plugins_LDFLAGS})
+
SET (this_target osp-cond-alarm)
INCLUDE_DIRECTORIES (
- /usr/include/osp
- /usr/include/vconf
- /usr/include/osp/app
- /usr/include/osp/base
- /usr/include/osp/io
- /usr/include/osp/system
- /usr/include/osp/server
- /usr/include/appfw
../../inc
)
SET (${this_target}_SOURCE_FILES
AlarmConditionHandler.cpp
)
-
+
+
## SET EXTRA COMPILER FLAGS
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fPIC -Wall" )
## Create Library
ADD_LIBRARY (${this_target} SHARED ${${this_target}_SOURCE_FILES})
-ADD_DEPENDENCIES(${this_target} osp-appfw)
-
SET_TARGET_PROPERTIES(${this_target} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${PLUGIN_INSTALL_DIR}/lib")
-TARGET_LINK_LIBRARIES(${this_target} -L/usr/lib/osp -losp-appfw -L/usr/lib/osp-server -losp-appfw-server -Wl,--no-undefined -Wl,--as-needed)
-TARGET_LINK_LIBRARIES(${this_target} "-lalarm")
-TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-application")
-TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-app-manager")
-TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-package-manager")
-TARGET_LINK_LIBRARIES(${this_target} "-lvconf")
-
+TARGET_LINK_LIBRARIES(${this_target} -Wl,--no-undefined -Wl,--as-needed)
+TARGET_LINK_LIBRARIES(${this_target} ${plugins_LDFLAGS})
SET (this_target osp-cond-calendar)
-INCLUDE_DIRECTORIES (
- /usr/include/osp
- /usr/include/osp/app
- /usr/include/osp/base
- /usr/include/osp/server
- /usr/lib/glib-2.0/include
- /usr/include/calendar-service2
- )
-
SET (${this_target}_SOURCE_FILES
CalendarConditionHandler.cpp
)
+
## SET EXTRA COMPILER FLAGS
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fPIC -Wall" )
## Create Library
ADD_LIBRARY (${this_target} SHARED ${${this_target}_SOURCE_FILES})
-ADD_DEPENDENCIES(${this_target} osp-appfw)
-
SET_TARGET_PROPERTIES(${this_target} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${PLUGIN_INSTALL_DIR}/lib")
-TARGET_LINK_LIBRARIES(${this_target} -L/usr/lib/osp -losp-appfw -L/usr/lib/osp-server -losp-appfw-server -Wl,--no-undefined -Wl,--as-needed)
-TARGET_LINK_LIBRARIES(${this_target} "-lcalendar-service2" )
+TARGET_LINK_LIBRARIES(${this_target} -Wl,--no-undefined -Wl,--as-needed)
+TARGET_LINK_LIBRARIES(${this_target} ${plugins_LDFLAGS})
+
SET (this_target osp-cond-message)
-INCLUDE_DIRECTORIES (
- /usr/include/osp
- /usr/include/osp/app
- /usr/include/osp/base
- /usr/include/osp/server
- /usr/lib/glib-2.0/include
- /usr/include/messaging
- )
-
SET (${this_target}_SOURCE_FILES
MessageConditionHandler.cpp
)
-
+
+
## SET EXTRA COMPILER FLAGS
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fPIC -Wall" )
## Create Library
ADD_LIBRARY (${this_target} SHARED ${${this_target}_SOURCE_FILES})
-ADD_DEPENDENCIES(${this_target} osp-appfw)
-
SET_TARGET_PROPERTIES(${this_target} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${PLUGIN_INSTALL_DIR}/lib")
-TARGET_LINK_LIBRARIES(${this_target} -L/usr/lib/osp -losp-appfw -L/usr/lib/osp-server -losp-appfw-server -Wl,--no-undefined -Wl,--as-needed)
-TARGET_LINK_LIBRARIES(${this_target} "-lcapi-messaging-messages" )
+TARGET_LINK_LIBRARIES(${this_target} -Wl,--no-undefined -Wl,--as-needed)
+TARGET_LINK_LIBRARIES(${this_target} ${plugins_LDFLAGS})
+
SET (this_target osp-cond-nfc)
INCLUDE_DIRECTORIES (
- /usr/include
- /usr/include/osp
- /usr/include/osp/app
- /usr/include/osp/base
- /usr/include/osp/server
../../inc
)
SET (${this_target}_SOURCE_FILES
NfcConditionHandler.cpp
)
-
+
+
## SET EXTRA COMPILER FLAGS
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fPIC -Wall" )
## Create Library
ADD_LIBRARY (${this_target} SHARED ${${this_target}_SOURCE_FILES})
-ADD_DEPENDENCIES(${this_target} osp-appfw)
-
SET_TARGET_PROPERTIES(${this_target} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${PLUGIN_INSTALL_DIR}/lib")
-TARGET_LINK_LIBRARIES(${this_target} -L/usr/lib/osp -losp-appfw -L/usr/lib/osp-server -losp-appfw-server -lail -Wl,--no-undefined -Wl,--as-needed)
+TARGET_LINK_LIBRARIES(${this_target} -Wl,--no-undefined -Wl,--as-needed)
+TARGET_LINK_LIBRARIES(${this_target} ${plugins_LDFLAGS})
*/
#include <unique_ptr.h>
#include <new>
-#include <time.h>
+#include <ctime>
#include <sys/time.h>
+
#include <system_info.h>
-#include <sysman_managed.h>
-#include <telephony_network.h>
#include <telephony-client/ITapiModem.h>
#include <vconf.h>