From: Andrey Klimenko Date: Mon, 30 Nov 2015 09:22:22 +0000 (-0800) Subject: Revert "TizenRefApp-5010 moved to usage of tzplatform-config pzckage in build" X-Git-Tag: accepted/tizen/mobile/20151130.224148~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=11620e714cf387e67d7f0ef20f110b690c32a9db;p=profile%2Fmobile%2Fapps%2Fnative%2Fug-setting-notification-efl.git Revert "TizenRefApp-5010 moved to usage of tzplatform-config pzckage in build" This reverts commit 5b6c1f29e0671206c20e96d56b4882174e80d7ba. Change-Id: I91ed75c5e79d7793557a35bb85b85bc5fe2254d5 --- diff --git a/packaging/ug-setting-notification-efl.spec b/packaging/ug-setting-notification-efl.spec index 045b2b3..38917ad 100755 --- a/packaging/ug-setting-notification-efl.spec +++ b/packaging/ug-setting-notification-efl.spec @@ -27,6 +27,7 @@ BuildRequires: pkgconfig(dlog) BuildRequires: edje-bin BuildRequires: cmake BuildRequires: gettext-tools +#BuildRequires: model-build-features BuildRequires: pkgconfig(notification) BuildRequires: pkgconfig(pkgmgr) BuildRequires: pkgconfig(pkgmgr-info) @@ -34,7 +35,6 @@ BuildRequires: pkgconfig(capi-appfw-package-manager) BuildRequires: pkgconfig(capi-system-system-settings) BuildRequires: pkgconfig(capi-appfw-app-manager) BuildRequires: pkgconfig(capi-appfw-application) -BuildRequires: pkgconfig(libtzplatform-config) %description @@ -58,22 +58,13 @@ cp %{SOURCE1001} . %build -%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 +%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 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" @@ -81,23 +72,21 @@ export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE" export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE" %endif -%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} - +%cmake . make -j2 %install %make_install -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 +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 %post -n %{name} -p /sbin/ldconfig @@ -107,10 +96,12 @@ ln -sf %{lib_path}/libug-setting-notification-do-not-disturb-efl.so %{buildroot} %files %manifest %{name}.manifest %defattr(-,root,root,-) -%{_pkg_dir}/* -%{_link_path}/* +%{_prefix}/apps/%{name}/* +%{link_path}/* %{_prefix}/share/packages/%{name}.xml -%{_sys_smack_dir}/%{name}.efl +/etc/smack/accesses.d/%{name}.efl %{_datarootdir}/license/%{name} %{_datadir}/icons/default/small/%{name}.png -%{_pkg_dir}/res/locale/*/LC_MESSAGES/* + +/usr/apps/%{name}/res/locale/*/LC_MESSAGES/* + diff --git a/ug-setting-notification-app-notifications-efl/CMakeLists.txt b/ug-setting-notification-app-notifications-efl/CMakeLists.txt index 81f08cb..2f4cad2 100755 --- a/ug-setting-notification-app-notifications-efl/CMakeLists.txt +++ b/ug-setting-notification-app-notifications-efl/CMakeLists.txt @@ -3,10 +3,17 @@ PROJECT(ug-setting-notification-app-notifications-efl C) 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 @@ -23,7 +30,6 @@ pkg_check_modules(pkgs REQUIRED capi-system-system-settings capi-appfw-app-manager capi-appfw-application - libtzplatform-config ) SET(BUILD_SOURCE @@ -33,16 +39,18 @@ 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 ${LIBDIR}) +INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/ug-setting-notification-efl/lib/ug) MESSAGE("ug-setting-notification-do-not-disturb-efl End") diff --git a/ug-setting-notification-app-notifications-efl/src/app-notificatons-efl.c b/ug-setting-notification-app-notifications-efl/src/app-notificatons-efl.c index 380d151..e1ef7cf 100755 --- a/ug-setting-notification-app-notifications-efl/src/app-notificatons-efl.c +++ b/ug-setting-notification-app-notifications-efl/src/app-notificatons-efl.c @@ -21,7 +21,6 @@ #include #include #include -#include #include "notification-setting-info.h" #include "common-efl.h" @@ -243,7 +242,7 @@ int UG_MODULE_INIT(struct ug_module_ops *ops) ops->priv = ugd; ops->opt = UG_OPT_INDICATOR_ENABLE; - if (bindtextdomain(PKGNAME, tzplatform_mkpath(TZ_SYS_RO_APP, "ug-setting-notification-efl/res/locale")) == NULL) { + if (bindtextdomain(PKGNAME, "/usr/apps/ug-setting-notification-efl/res/locale") == NULL) { /* Failed to allocate memory for allocating heap for store the path of LOCALE directory */ } diff --git a/ug-setting-notification-do-not-disturb-efl/CMakeLists.txt b/ug-setting-notification-do-not-disturb-efl/CMakeLists.txt index 083d58f..69cbbbc 100755 --- a/ug-setting-notification-do-not-disturb-efl/CMakeLists.txt +++ b/ug-setting-notification-do-not-disturb-efl/CMakeLists.txt @@ -3,8 +3,14 @@ PROJECT(ug-setting-notification-do-not-disturb-efl C) 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") @@ -24,7 +30,6 @@ pkg_check_modules(pkgs REQUIRED capi-system-system-settings capi-appfw-app-manager capi-appfw-application - libtzplatform-config ) SET(BUILD_SOURCE @@ -38,6 +43,8 @@ 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}) @@ -48,7 +55,7 @@ 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) -INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR}) +INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/ug-setting-notification-efl/lib/ug) MESSAGE("ug-setting-notification-do-not-disturb-efl End") diff --git a/ug-setting-notification-do-not-disturb-efl/src/do-not-disturb-efl.c b/ug-setting-notification-do-not-disturb-efl/src/do-not-disturb-efl.c index d30dd80..1e8b186 100755 --- a/ug-setting-notification-do-not-disturb-efl/src/do-not-disturb-efl.c +++ b/ug-setting-notification-do-not-disturb-efl/src/do-not-disturb-efl.c @@ -21,7 +21,6 @@ #include #include #include -#include #include "do-not-disturb-efl.h" #include "pkgmgr-setting-info.h" #include "excepted-apps-efl.h" @@ -280,7 +279,7 @@ int UG_MODULE_INIT(struct ug_module_ops *ops) ops->priv = ugd; ops->opt = UG_OPT_INDICATOR_ENABLE; - if (bindtextdomain(PKGNAME, tzplatform_mkpath(TZ_SYS_RO_APP, "ug-setting-notification-efl/res/locale"))== NULL) { + if (bindtextdomain(PKGNAME, "/usr/apps/ug-setting-notification-efl/res/locale") == NULL) { /* Failed to allocate memory for allocating heap for store the path of LOCALE directory */ } diff --git a/ug-setting-notification-efl/CMakeLists.txt b/ug-setting-notification-efl/CMakeLists.txt index d08bb0a..d181b55 100755 --- a/ug-setting-notification-efl/CMakeLists.txt +++ b/ug-setting-notification-efl/CMakeLists.txt @@ -3,20 +3,14 @@ PROJECT(ug-setting-notification-efl C) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(PROJECT_NAME "${PROJECT_NAME}") -SET(LIBDIR "${PREFIX}/lib/ug") -SET(RESDIR "${PREFIX}/res") +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(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") @@ -36,7 +30,6 @@ pkg_check_modules(pkgs REQUIRED capi-system-system-settings capi-appfw-app-manager capi-appfw-application - libtzplatform-config ) SET(BUILD_SOURCE @@ -48,20 +41,25 @@ 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 ${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(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(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR}) +INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/ug-setting-notification-efl/lib/ug) INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/images/ DESTINATION ${IMAGEDIR}) + MESSAGE("ug-setting-notification-efl End") ADD_SUBDIRECTORY(res/po) diff --git a/ug-setting-notification-efl/inc/log.h b/ug-setting-notification-efl/inc/log.h index f539bc6..7f25a32 100755 --- a/ug-setting-notification-efl/inc/log.h +++ b/ug-setting-notification-efl/inc/log.h @@ -94,6 +94,18 @@ #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); \ diff --git a/ug-setting-notification-efl/inc/pkgmgr-setting-info.h b/ug-setting-notification-efl/inc/pkgmgr-setting-info.h index 5741c54..bf14a3f 100755 --- a/ug-setting-notification-efl/inc/pkgmgr-setting-info.h +++ b/ug-setting-notification-efl/inc/pkgmgr-setting-info.h @@ -22,6 +22,10 @@ #include #include "log.h" + +#define DEFAULT_ICON IMAGEDIR"/unknown.png" + + typedef struct { /* innate features */ char *appid; diff --git a/ug-setting-notification-efl/res/po/CMakeLists.txt b/ug-setting-notification-efl/res/po/CMakeLists.txt index 9ad1ce6..a17438b 100755 --- a/ug-setting-notification-efl/res/po/CMakeLists.txt +++ b/ug-setting-notification-efl/res/po/CMakeLists.txt @@ -78,7 +78,7 @@ FOREACH(pofile ${POFILES}) DEPENDS ${absPofile} ) - INSTALL(FILES ${moFile} DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo) + INSTALL(FILES ${moFile} DESTINATION /usr/apps/${PROJECT_NAME}/res/locale/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo) SET(moFiles ${moFiles} ${moFile}) ENDFOREACH(pofile) diff --git a/ug-setting-notification-efl/src/common-efl.c b/ug-setting-notification-efl/src/common-efl.c index cdf21e9..5e416bb 100755 --- a/ug-setting-notification-efl/src/common-efl.c +++ b/ug-setting-notification-efl/src/common-efl.c @@ -15,7 +15,6 @@ * */ -#include #include "pkgmgr-setting-info.h" #include "common-efl.h" @@ -123,7 +122,7 @@ Evas_Object* create_icon(Evas_Object *parent, char* icon) Evas_Object *img = elm_image_add(parent); if(access(icon, 0) == -1) { - icon = strdup(tzplatform_mkpath(TZ_SYS_RO_ICONS, "default/small/ug-setting-notification-efl.png")); + icon = strdup("/usr/share/icons/default/small/ug-setting-notification-efl.png"); } elm_image_file_set(img, icon, NULL); @@ -134,6 +133,9 @@ Evas_Object* create_icon(Evas_Object *parent, char* icon) return img; } + + + static char *gl_group_index_text_get_cb(void *data, Evas_Object *obj, const char *part) { char *text = (char*)data;