BuildRequires: edje-bin
BuildRequires: cmake
BuildRequires: gettext-tools
-#BuildRequires: model-build-features
BuildRequires: pkgconfig(notification)
BuildRequires: pkgconfig(pkgmgr)
BuildRequires: pkgconfig(pkgmgr-info)
BuildRequires: pkgconfig(capi-system-system-settings)
BuildRequires: pkgconfig(capi-appfw-app-manager)
BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(libtzplatform-config)
%description
%build
-%define bin_path /usr/apps/%{name}/bin
-%define lib_path /usr/apps/%{name}/lib/ug
-%define link_path /home/owner/apps_rw/%{name}/lib/ug
+%define _pkg_dir %{TZ_SYS_RO_APP}/%{name}
+%define _pkg_lib_dir %{_pkg_dir}/lib
+
+%define _sys_icons_dir %{TZ_SYS_RO_ICONS}
+%define _sys_packages_dir %{TZ_SYS_RO_PACKAGES}
+%define _sys_license_dir %{TZ_SYS_SHARE}/license
+%define _sys_smack_dir %{TZ_SYS_SMACK}/accesses.d
+
+%define _bin_path %{TZ_SYS_RO_APP}/%{name}/bin
+%define _link_path /home/owner/apps_rw/%{name}/lib/ug
export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
+export LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--rpath=%{_pkg_lib_dir} -Wl,--as-needed -Wl,-zdefs"
+
%if 0%{?tizen_build_binary_release_type_eng}
export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
%endif
-%cmake .
+%cmake . -DCMAKE_INSTALL_PREFIX=%{_pkg_dir} \
+ -DENABLE_ATTACH_PANEL=%{_enable_attach_panel} \
+ -DSYS_ICONS_DIR=%{_sys_icons_dir} \
+ -DSYS_PACKAGES_DIR=%{_sys_packages_dir} \
+ -DSYS_LICENSE_DIR=%{_sys_license_dir} \
+ -DSYS_SMACK_DIR=%{_sys_smack_dir}
+
make -j2
%install
%make_install
-mkdir -p %{buildroot}%{bin_path}
-mkdir -p %{buildroot}%{link_path}
-mkdir -p /etc/smack/accesses.d/
-ln -sf /usr/bin/ug-client %{buildroot}%{bin_path}/ug-setting-notification-efl
-ln -sf /usr/bin/ug-client %{buildroot}%{bin_path}/ug-setting-notification-do-not-disturb-efl
-ln -sf /usr/bin/ug-client %{buildroot}%{bin_path}/ug-setting-notification-app-notifications-efl
-ln -sf %{lib_path}/libug-setting-notification-do-not-disturb-efl.so %{buildroot}%{link_path}/libug-setting-notification-do-not-disturb-efl.so
-
-
-mkdir -p %{buildroot}/usr/apps/%{name}/res
+mkdir -p %{buildroot}%{_bin_path}
+mkdir -p %{buildroot}%{_link_path}
+ln -sf %{TZ_SYS_BIN}/ug-client %{buildroot}%{_bin_path}/ug-setting-notification-efl
+ln -sf %{TZ_SYS_BIN}/ug-client %{buildroot}%{_bin_path}/ug-setting-notification-do-not-disturb-efl
+ln -sf %{TZ_SYS_BIN}/ug-client %{buildroot}%{_bin_path}/ug-setting-notification-app-notifications-efl
+ln -sf %{lib_path}/libug-setting-notification-do-not-disturb-efl.so %{buildroot}%{_link_path}/libug-setting-notification-do-not-disturb-efl.so
%post -n %{name} -p /sbin/ldconfig
%files
%manifest %{name}.manifest
%defattr(-,root,root,-)
-%{_prefix}/apps/%{name}/*
-%{link_path}/*
+%{_pkg_dir}/*
+%{_link_path}/*
%{_prefix}/share/packages/%{name}.xml
-/etc/smack/accesses.d/%{name}.efl
+%{_sys_smack_dir}/%{name}.efl
%{_datarootdir}/license/%{name}
%{_datadir}/icons/default/small/%{name}.png
-
-/usr/apps/%{name}/res/locale/*/LC_MESSAGES/*
-
+%{_pkg_dir}/res/locale/*/LC_MESSAGES/*
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(PROJECT_NAME "${PROJECT_NAME}")
SET(LIBDIR "${PREFIX}/apps/${PROJECT_NAME}/lib/ug")
-SET(RESDIR "${PREFIX}/apps/${PROJECT_NAME}/res")
-SET(DATADIR "${PREFIX}/apps/${PROJECT_NAME}/data")
-#SET(LOCALEDIR "${RESDIR}/locale")
-SET(IMAGEDIR "${RESDIR}/images")
-SET(EDJEDIR "${RESDIR}/edje")
-SET(ETCDIR "${RESDIR}/etc")
SET(VERSION_MAJOR 0)
SET(VERSION "${VERSION_MAJOR}.0.1")
-
INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED
elementary
capi-system-system-settings
capi-appfw-app-manager
capi-appfw-application
+ libtzplatform-config
)
SET(BUILD_SOURCE
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/inc)
ADD_DEFINITIONS(${pkgs_CFLAGS})
ADD_DEFINITIONS("-DPKGNAME=\"${PROJECT_NAME}\"")
-#ADD_DEFINITIONS("-DLOCALE=\"${LOCALEDIR}\"")
-ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"")
ADD_LIBRARY(${PROJECT_NAME} SHARED ${BUILD_SOURCE})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} ug-setting-notification-efl)
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} ug-setting-notification-efl)
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION_MAJOR})
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${VERSION})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/inc)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ug-setting-notification-efl/inc)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ug-setting-notification-efl/inc)
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/ug-setting-notification-efl/lib/ug)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR})
MESSAGE("ug-setting-notification-do-not-disturb-efl End")
#include <libintl.h>
#include <ui-gadget-module.h>
#include <package_manager.h>
+#include <tzplatform_config.h>
#include "notification-setting-info.h"
#include "common-efl.h"
ops->priv = ugd;
ops->opt = UG_OPT_INDICATOR_ENABLE;
- if (bindtextdomain(PKGNAME, "/usr/apps/ug-setting-notification-efl/res/locale") == NULL) {
+ if (bindtextdomain(PKGNAME, tzplatform_mkpath(TZ_SYS_RO_APP, "ug-setting-notification-efl/res/locale")) == NULL) {
/* Failed to allocate memory for allocating heap for store the path of LOCALE directory */
}
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(PROJECT_NAME "${PROJECT_NAME}")
-SET(LIBDIR "${PREFIX}/apps/${PROJECT_NAME}/lib/ug")
-SET(RESDIR "${PREFIX}/apps/${PROJECT_NAME}/res")
-SET(DATADIR "${PREFIX}/apps/${PROJECT_NAME}/data")
-#SET(LOCALEDIR "${RESDIR}/locale")
-SET(IMAGEDIR "${RESDIR}/images")
-SET(EDJEDIR "${RESDIR}/edje")
-SET(ETCDIR "${RESDIR}/etc")
+SET(LIBDIR "${PREFIX}/lib/ug")
SET(VERSION_MAJOR 0)
SET(VERSION "${VERSION_MAJOR}.0.1")
capi-system-system-settings
capi-appfw-app-manager
capi-appfw-application
+ libtzplatform-config
)
SET(BUILD_SOURCE
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/inc)
ADD_DEFINITIONS(${pkgs_CFLAGS})
ADD_DEFINITIONS("-DPKGNAME=\"${PROJECT_NAME}\"")
-#ADD_DEFINITIONS("-DLOCALE=\"${LOCALEDIR}\"")
-ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"")
ADD_LIBRARY(${PROJECT_NAME} SHARED ${BUILD_SOURCE})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/inc)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ug-setting-notification-efl/inc)
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/ug-setting-notification-efl/lib/ug)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR})
MESSAGE("ug-setting-notification-do-not-disturb-efl End")
#include <libintl.h>
#include <ui-gadget-module.h>
#include <package_manager.h>
+#include <tzplatform_config.h>
#include "do-not-disturb-efl.h"
#include "pkgmgr-setting-info.h"
#include "excepted-apps-efl.h"
ops->priv = ugd;
ops->opt = UG_OPT_INDICATOR_ENABLE;
- if (bindtextdomain(PKGNAME, "/usr/apps/ug-setting-notification-efl/res/locale") == NULL) {
+ if (bindtextdomain(PKGNAME, tzplatform_mkpath(TZ_SYS_RO_APP, "ug-setting-notification-efl/res/locale"))== NULL) {
/* Failed to allocate memory for allocating heap for store the path of LOCALE directory */
}
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(PROJECT_NAME "${PROJECT_NAME}")
-SET(LIBDIR "${PREFIX}/apps/${PROJECT_NAME}/lib/ug")
-SET(RESDIR "${PREFIX}/apps/${PROJECT_NAME}/res")
+SET(LIBDIR "${PREFIX}/lib/ug")
+SET(RESDIR "${PREFIX}/res")
SET(DATADIR "${PREFIX}/apps/${PROJECT_NAME}/data")
-SET(LOCALEDIR "${RESDIR}/locale")
SET(IMAGEDIR "${RESDIR}/images")
SET(EDJEDIR "${RESDIR}/edje")
SET(ETCDIR "${RESDIR}/etc")
+SET(LOCALEDIR "${RESDIR}/locale")
+SET(LICENSEDIR ${SYS_LICENSE_DIR})
+SET(PACKAGEDIR ${SYS_PACKAGES_DIR})
+SET(ICONDIR ${SYS_ICONS_DIR}/default/small/)
+SET(SMACKDIR ${SYS_SMACK_DIR})
+SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
+
SET(VERSION_MAJOR 0)
SET(VERSION "${VERSION_MAJOR}.0.1")
capi-system-system-settings
capi-appfw-app-manager
capi-appfw-application
+ libtzplatform-config
)
SET(BUILD_SOURCE
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/inc)
ADD_DEFINITIONS(${pkgs_CFLAGS} "-fPIC")
ADD_DEFINITIONS("-DPKGNAME=\"${PROJECT_NAME}\"")
-#ADD_DEFINITIONS("-DLOCALE=\"${LOCALEDIR}\"")
ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"")
ADD_LIBRARY(${PROJECT_NAME} STATIC ${BUILD_SOURCE})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
-#TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${bin_pkgs_LDFLAGS})
-#SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION_MAJOR})
-#SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${VERSION})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME "${PROJECT_NAME}")
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.xml DESTINATION /usr/share/packages)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${PROJECT_NAME}.png DESTINATION /usr/share/icons/default/small/)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PROJECT_NAME}.efl DESTINATION /etc/smack/accesses.d)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION ${LICENSEDIR} RENAME "${PROJECT_NAME}")
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.xml DESTINATION ${PACKAGEDIR})
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${PROJECT_NAME}.png DESTINATION ${ICONDIR})
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PROJECT_NAME}.efl DESTINATION ${SMACKDIR})
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/ug-setting-notification-efl/lib/ug)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR})
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/images/ DESTINATION ${IMAGEDIR})
-
MESSAGE("ug-setting-notification-efl End")
ADD_SUBDIRECTORY(res/po)
#define _APPS_SE(fmt, arg...) SECURE_LOG(LOG_ERROR, LOG_TAG_APPS, " "fmt, ##arg)
#endif
-#ifdef ADD_FILE_LOG
-#define _F(fmt, arg...) do { \
- FILE *fp;\
- fp = fopen("/opt/usr/apps/org.tizen.w-home/data/logs", "a+");\
- if (NULL == fp) break;\
- fprintf(fp, "[%s:%d] "fmt"\n", __func__, __LINE__, ##arg); \
- fclose(fp);\
-} while (0)
-#else
-#define _F(fmt, arg...) ;
-#endif
-
#define retvm_if_timer(timer, expr, val, fmt, arg...) do { \
if (expr) { \
_E(fmt, ##arg); \
#include <tizen.h>
#include "log.h"
-
-#define DEFAULT_ICON IMAGEDIR"/unknown.png"
-
-
typedef struct {
/* innate features */
char *appid;
DEPENDS ${absPofile}
)
- INSTALL(FILES ${moFile} DESTINATION /usr/apps/${PROJECT_NAME}/res/locale/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+ INSTALL(FILES ${moFile} DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
SET(moFiles ${moFiles} ${moFile})
ENDFOREACH(pofile)
*
*/
+#include <tzplatform_config.h>
#include "pkgmgr-setting-info.h"
#include "common-efl.h"
Evas_Object *img = elm_image_add(parent);
if(access(icon, 0) == -1) {
- icon = strdup("/usr/share/icons/default/small/ug-setting-notification-efl.png");
+ icon = strdup(tzplatform_mkpath(TZ_SYS_RO_ICONS, "default/small/ug-setting-notification-efl.png"));
}
elm_image_file_set(img, icon, NULL);
return img;
}
-
-
-
static char *gl_group_index_text_get_cb(void *data, Evas_Object *obj, const char *part)
{
char *text = (char*)data;