diff options
-rw-r--r-- | CMake/CMakeLists.txt | 2 | ||||
-rw-r--r-- | CMake/email-common/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Project-Files/common/src/email-color-box.c | 1 | ||||
-rw-r--r-- | Project-Files/common/src/email-utils.c | 29 | ||||
-rw-r--r-- | Project-Files/modules/setting/src/email-setting-account-set.c | 7 | ||||
-rw-r--r-- | org.tizen.email.xml | 12 | ||||
-rw-r--r-- | packaging/org.tizen.email.spec | 36 |
7 files changed, 39 insertions, 52 deletions
diff --git a/CMake/CMakeLists.txt b/CMake/CMakeLists.txt index 8071a2a..2286091 100644 --- a/CMake/CMakeLists.txt +++ b/CMake/CMakeLists.txt @@ -10,7 +10,7 @@ SET(EDJDIR "${RESDIR}/edje") SET(IMGDIR "${RESDIR}/images") SET(MISCDIR "${RESDIR}/misc") SET(SHAREDIR "/usr/share") -SET(ICONDIR "${PREFIX}/shared/res") +SET(ICONDIR "${ICON_DIR_PATH}") SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) ADD_DEFINITIONS("-D_DEBUG") diff --git a/CMake/email-common/CMakeLists.txt b/CMake/email-common/CMakeLists.txt index 1d46775..cfabfeb 100644 --- a/CMake/email-common/CMakeLists.txt +++ b/CMake/email-common/CMakeLists.txt @@ -20,12 +20,12 @@ IF(${ENABLE_ATTACH_PANEL}) SET(email-required-pkgs ecore glib-2.0 gobject-2.0 email-service tapi storage contacts-service2 capi-content-media-content dlog elementary evas eina edje capi-base-utils-i18n accounts-svc capi-network-connection efl-extension capi-content-mime-type capi-system-system-settings - capi-appfw-application chromium-efl capi-appfw-preference vconf attach-panel feedback) + capi-appfw-application chromium-efl capi-appfw-preference vconf attach-panel feedback libtzplatform-config) ELSE(${ENABLE_ATTACH_PANEL}) SET(email-required-pkgs ecore glib-2.0 gobject-2.0 email-service tapi storage contacts-service2 capi-content-media-content dlog elementary evas eina edje capi-base-utils-i18n accounts-svc capi-network-connection efl-extension capi-content-mime-type capi-system-system-settings - capi-appfw-application chromium-efl capi-appfw-preference vconf feedback) + capi-appfw-application chromium-efl capi-appfw-preference vconf feedback libtzplatform-config) ENDIF(${ENABLE_ATTACH_PANEL}) pkg_check_modules(pkgs-common REQUIRED "${email-required-pkgs}") diff --git a/Project-Files/common/src/email-color-box.c b/Project-Files/common/src/email-color-box.c index e2d7553..c5d3892 100644 --- a/Project-Files/common/src/email-color-box.c +++ b/Project-Files/common/src/email-color-box.c @@ -16,7 +16,6 @@ */ #include "email-color-box.h" - #include "email-utils.h" #define EMAIL_COLOR_BOX_BG_PART_NAME "email.swallow.bg" diff --git a/Project-Files/common/src/email-utils.c b/Project-Files/common/src/email-utils.c index cbee28b..3bbda02 100644 --- a/Project-Files/common/src/email-utils.c +++ b/Project-Files/common/src/email-utils.c @@ -36,29 +36,29 @@ #include <app_preference.h> #include <vconf.h> #include <feedback.h> +#include <tzplatform_config.h> #include "email-utils.h" #include "email-locale.h" #include "email-engine.h" -#define EMAIL_FAIL_SAFE_RW_PATH "/opt/usr/apps/" PKGNAME +#define EMAIL_RES_PATH PKGNAME"/res" +#define EMAIL_DATA_PATH PKGNAME"/data" +#define EMAIL_SHARED_RES_PATH PKGNAME"/shared/res" +#define EMAIL_SHARED_DATA_PATH PKGNAME"/shared/data" -#ifdef _EMAIL_GBS_BUILD_ -#define EMAIL_FAIL_SAFE_R_PATH "/usr/apps/" PKGNAME -#else -#define EMAIL_FAIL_SAFE_R_PATH EMAIL_FAIL_SAFE_RW_PATH -#endif +#define EMAIL_FAIL_SAFE_RES_PATH tzplatform_mkpath(TZ_SYS_RO_APP, EMAIL_RES_PATH) +#define EMAIL_FAIL_SAFE_DATA_PATH tzplatform_mkpath(TZ_USER_APP, EMAIL_DATA_PATH) +#define EMAIL_FAIL_SAFE_SHARED_RES_PATH tzplatform_mkpath(TZ_SYS_RO_APP, EMAIL_SHARED_RES_PATH) +#define EMAIL_FAIL_SAFE_SHARED_DATA_PATH tzplatform_mkpath(TZ_USER_APP, EMAIL_SHARED_DATA_PATH) -#define EMAIL_FAIL_SAFE_RES_PATH EMAIL_FAIL_SAFE_R_PATH "/res" -#define EMAIL_FAIL_SAFE_DATA_PATH EMAIL_FAIL_SAFE_RW_PATH "/data" -#define EMAIL_FAIL_SAFE_SHARED_RES_PATH EMAIL_FAIL_SAFE_R_PATH "/shared/res" -#define EMAIL_FAIL_SAFE_SHARED_DATA_PATH EMAIL_FAIL_SAFE_RW_PATH "/shared/data" - -#define EMAIL_FAIL_SAFE_PHONE_STORAGE_PATH "/opt/usr/media" -#define EMAIL_FAIL_SAFE_MMC_STORAGE_PATH "/opt/storage/sdcard" +#define EMAIL_FAIL_SAFE_PHONE_STORAGE_PATH tzplatform_getname(TZ_USER_CONTENT) +#define EMAIL_FAIL_SAFE_MMC_STORAGE_PATH tzplatform_mkpath(TZ_SYS_STORAGE, "sdcard") #define EMAIL_FAIL_SAFE_DOWNLOADS_DIR "Downloads" #define EMAIL_FAIL_SAFE_SOUNDS_DIR "Sounds" +#define EMAIL_ETC_LOCALTIME_PATH tzplatform_mkpath(TZ_SYS_ETC, "localtime") + #define EMAIL_FILE_URL_FMT "file://%s" #define VCONFKEY_EMAIL_IS_INBOX_ACTIVE "db/private/org.tizen.email/is_inbox_active" @@ -506,6 +506,7 @@ EMAIL_DEFINE_GET_PHONE_PATH(email_get_phone_tmp_dir, "/tmp") EMAIL_DEFINE_GET_APP_ROOT_PATH(email_get_res_dir, app_get_resource_path, s_info.res_dir, EMAIL_FAIL_SAFE_RES_PATH) + EMAIL_DEFINE_GET_APP_ROOT_PATH(email_get_data_dir, app_get_data_path, s_info.data_dir, EMAIL_FAIL_SAFE_DATA_PATH) @@ -1761,7 +1762,7 @@ EMAIL_API char *email_get_timezone_str(void) debug_enter(); char buf[MAX_STR_LEN]; - ssize_t len = readlink("/opt/etc/localtime", buf, sizeof(buf) - 1); + ssize_t len = readlink(EMAIL_ETC_LOCALTIME_PATH, buf, sizeof(buf) - 1); if (len != -1) { buf[len] = '\0'; diff --git a/Project-Files/modules/setting/src/email-setting-account-set.c b/Project-Files/modules/setting/src/email-setting-account-set.c index 6d4adcf..212343e 100644 --- a/Project-Files/modules/setting/src/email-setting-account-set.c +++ b/Project-Files/modules/setting/src/email-setting-account-set.c @@ -20,10 +20,11 @@ #include "email-setting-account-set.h" #include "email-setting-utils.h" -static email_setting_string_t EMAIL_SETTING_STRING_SENT_FROM_SAMSUNG_MOBILE = {PACKAGE, "IDS_EMAIL_SBODY_SENT_FROM_MY_SAMSUNG_DEVICE"}; +#include <tzplatform_config.h> -static EMAIL_DEFINE_SHARED_RES_PATH(_get_account_icon_path, "/org.tizen.email.png") +static email_setting_string_t EMAIL_SETTING_STRING_SENT_FROM_SAMSUNG_MOBILE = {PACKAGE, "IDS_EMAIL_SBODY_SENT_FROM_MY_SAMSUNG_DEVICE"}; +#define ACOOUNT_ICON_PATH tzplatform_mkpath(TZ_SYS_RO_ICONS, "org.tizen.email.png") #define DEFAULT_SIGNATURE EMAIL_SETTING_STRING_SENT_FROM_SAMSUNG_MOBILE.id #define DEFAULT_EMAIL_SIZE 1024*50 @@ -353,6 +354,6 @@ char *_get_logo_path(email_view_t *vd) EmailSettingUGD *ugd = (EmailSettingUGD *)vd->module; if (ugd->email_sp_icon_path) return g_strdup(ugd->email_sp_icon_path); - return g_strdup(_get_account_icon_path()); + return g_strdup(ACOOUNT_ICON_PATH); } /* EOF */ diff --git a/org.tizen.email.xml b/org.tizen.email.xml index 97a240a..242172d 100644 --- a/org.tizen.email.xml +++ b/org.tizen.email.xml @@ -7,7 +7,7 @@ indicatordisplay="true" process-pool="false" hw-acceleration="use-GL" launch_mode="single"> <metadata key="http://developer.samsung.com/tizen/metadata/multiwindow"/> <label>Email</label> - <icon>org.tizen.email.png</icon> + <icon>/usr/share/icons/org.tizen.email.png</icon> <label xml:lang="ar-ae">البريد الإلكتروني</label> <label xml:lang="az-az">Elektron poçtlar</label> <label xml:lang="bg-bg">Email</label> @@ -63,7 +63,7 @@ <metadata key="http://developer.samsung.com/tizen/metadata/multiwindow"/> <metadata key="http://developer.samsung.com/tizen/metadata/multiwindow/nodisplay"/> <label>Email</label> - <icon>org.tizen.email.png</icon> + <icon>/usr/share/icons/org.tizen.email.png</icon> <label xml:lang="ar-ae">البريد الإلكتروني</label> <label xml:lang="az-az">Elektron poçtlar</label> <label xml:lang="bg-bg">Email</label> @@ -156,7 +156,7 @@ <metadata key="http://developer.samsung.com/tizen/metadata/multiwindow"/> <metadata key="http://developer.samsung.com/tizen/metadata/multiwindow/nodisplay"/> <label>Email</label> - <icon>org.tizen.email.png</icon> + <icon>/usr/share/icons/org.tizen.email.png</icon> <application-service> <operation name="tizen-email://org.tizen.email/email_setting_notification"/> </application-service> @@ -166,8 +166,8 @@ </ui-application> <account> <account-provider appid="org.tizen.email-setting" providerid="http://www.tizen.org/" multiple-accounts-support="true"> - <icon section="account">org.tizen.email.png</icon> - <icon section="account-small">org.tizen.email.png</icon> + <icon section="account">/usr/share/icons/org.tizen.email.png</icon> + <icon section="account-small">/usr/share/icons/org.tizen.email.png</icon> <label xml:lang="nl-nl">Email</label> <label>Email</label> <label xml:lang="en-gb">Email</label> @@ -181,5 +181,7 @@ <privilege>http://tizen.org/privilege/camera</privilege> <privilege>http://tizen.org/privilege/recorder</privilege> <privilege>http://tizen.org/privilege/notification</privilege> + <privilege>http://tizen.org/privilege/haptic</privilege> + <privilege>http://tizen.org/privilege/email</privilege> </privileges> </manifest> diff --git a/packaging/org.tizen.email.spec b/packaging/org.tizen.email.spec index 6472bd9..0767a60 100644 --- a/packaging/org.tizen.email.spec +++ b/packaging/org.tizen.email.spec @@ -59,6 +59,7 @@ BuildRequires: pkgconfig(storage) BuildRequires: pkgconfig(capi-content-mime-type) BuildRequires: pkgconfig(vconf) BuildRequires: pkgconfig(feedback) +BuildRequires: pkgconfig(libtzplatform-config) %if 0%{?_enable_attach_panel} BuildRequires: pkgconfig(attach-panel) @@ -72,16 +73,8 @@ Description: Native email application %build -%define _opt_dir /opt -%define _usr_dir /usr -%define _share_dir %{_usr_dir}/share -%define _usr_apps_dir %{_usr_dir}/apps - -%define _pkg_dir %{_usr_apps_dir}/org.tizen.email +%define _pkg_dir %{TZ_SYS_RO_APP}/%{name} %define _pkg_lib_dir %{_pkg_dir}/lib -%define _pkg_shared_dir %{_pkg_dir}/shared - -%define _opt_pkg_dir %{_opt_dir}/%{_pkg_dir} export CFLAGS="${CFLAGS} -Wall -fvisibility=hidden" export CXXFLAGS="${CXXFLAGS} -Wall -fvisibility=hidden" @@ -99,14 +92,12 @@ mkdir -p %{_tmp_buld_dir} cd %{_tmp_buld_dir} cmake ../../CMake -DCMAKE_INSTALL_PREFIX=%{_pkg_dir} \ - -DENABLE_ATTACH_PANEL=%{_enable_attach_panel} + -DENABLE_ATTACH_PANEL=%{_enable_attach_panel} \ + -DICON_DIR_PATH=%{TZ_SYS_RO_ICONS} make %install rm -rf %{buildroot} -mkdir -p %{buildroot}/%{_opt_pkg_dir}/data -mkdir -p %{buildroot}/%{_opt_pkg_dir}/cache -mkdir -p %{buildroot}/%{_opt_pkg_dir}/shared/data cd %{_tmp_buld_dir} %make_install @@ -121,22 +112,14 @@ cd %{_tmp_buld_dir} rm -f debugfiles.list debuglinks.list debugsources.list %post -chown -R 5000:5000 %{_opt_pkg_dir}/data -chown -R 5000:5000 %{_opt_pkg_dir}/cache -chown -R 5000:5000 %{_opt_pkg_dir}/shared/data +pkgdir_maker --create --pkgid=%{name} %files -%manifest org.tizen.email.manifest %defattr(-,root,root,-) - -%dir %{_opt_pkg_dir}/data -%dir %{_opt_pkg_dir}/cache -%dir %{_opt_pkg_dir}/shared/data +%manifest %{name}.manifest %{_pkg_lib_dir}/*.so -%{_pkg_shared_dir}/res/org.tizen.email.png - %{_pkg_dir}/res/edje/email-common-theme.edj %{_pkg_dir}/res/edje/email-setting-theme.edj %{_pkg_dir}/res/edje/email-composer-view.edj @@ -152,10 +135,11 @@ chown -R 5000:5000 %{_opt_pkg_dir}/shared/data %{_pkg_dir}/bin/email-setting %{_pkg_dir}/bin/email-composer -%{_share_dir}/packages/org.tizen.email.xml -%{_share_dir}/license/org.tizen.email +%{TZ_SYS_RO_ICONS}/%{name}.png +%{TZ_SYS_RO_PACKAGES}/%{name}.xml +%{TZ_SYS_SHARE}/license/%{name} -/etc/smack/accesses.d/org.tizen.email.efl +%{TZ_SYS_SMACK}/accesses.d/%{name}.efl %{_pkg_dir}/author-signature.xml %{_pkg_dir}/signature1.xml |