rm -rf %{buildroot}
%make_install
-if [ ! -d %{TZ_USER_SHARE}/lockscreen/wallpaper_list ]
+if [ ! -d %{TZ_SYS_SHARE}/lockscreen/wallpaper_list ]
then
- mkdir -p %{buildroot}/%{TZ_USER_SHARE}/lockscreen/wallpaper_list
+ mkdir -p %{buildroot}%{TZ_SYS_SHARE}/lockscreen/wallpaper_list
fi
-mkdir -p %{buildroot}/%{TZ_SYS_SHARE}/license
-cp -f LICENSE %{buildroot}/%{TZ_SYS_SHARE}/license/%{name}
-mkdir -p %{buildroot}/%{PREFIX}/shared
-mkdir -p %{buildroot}/%{PREFIX}/shared/res
-mkdir -p %{buildroot}/%{PREFIX}/data
-mkdir -p %{buildroot}/%{PREFIX}/data/wallpaper
+mkdir -p %{buildroot}%{TZ_SYS_SHARE}/license
+cp -f LICENSE %{buildroot}%{TZ_SYS_SHARE}/license/%{name}
+mkdir -p %{buildroot}%{PREFIX}/shared
+mkdir -p %{buildroot}%{PREFIX}/shared/res
+mkdir -p %{buildroot}%{PREFIX}/data
+mkdir -p %{buildroot}%{PREFIX}/data/wallpaper
%define tizen_sign 1
%define tizen_sign_base %{TZ_SYS_RO_APP}/%{name}
%post
-#usr/bin/signing-client/hash-signer-client.sh -a -d -p platform /usr/apps/org.tizen.wallpaper-ui-service
-
%postun -p /sbin/ldconfig
%files
%attr(-,app,app) %dir %{PREFIX}/data
%attr(-,app,app) %dir %{PREFIX}/data/wallpaper
-%attr(755,app,app)/%{TZ_USER_SHARE}/lockscreen
-%attr(755,app,app)/%{TZ_USER_SHARE}/lockscreen/wallpaper_list
+%attr(755,app,app) /%{TZ_SYS_SHARE}/lockscreen
+%attr(755,app,app) /%{TZ_SYS_SHARE}/lockscreen/wallpaper_list
#define DEFAULT_IMAGE_DIR "/opt/usr/share/settings/Wallpapers/"
-
+#define WALLPAPER_IMAGE_FILE tzplatform_mkpath(TZ_SYS_SHARE, "lockscreen/wallpaper_list%s.jpg")
+#define WALLPAPER_IMAGE_DIR tzplatform_mkpath(TZ_SYS_SHARE, "lockscreen/wallpaper_list%s/%s")
static Elm_Gengrid_Item_Class *gic_for_main = NULL;
static wallpaper_ui_service_appdata *ad = NULL;
char temp[MAX_LENGTH_LINE] = {0};
char *p = strrchr(state_data.from[sd->img_idx], '/');
if (p) {
- snprintf(temp, sizeof(temp), "/opt/usr/share/lockscreen/wallpaper_list%s", p);
+ snprintf(temp, sizeof(temp), WALLPAPER_IMAGE_DIR, p);
WALLPAPERUI_DBG("temp = %s", temp);
if (strcmp(temp, ad->current_preview_img_path) == 0) {
WALLPAPERUI_DBG("homescreen wallppaer do not be changed");
if (q) {
*q = '\0';
}
- snprintf(filepath, sizeof(filepath), "/opt/usr/share/lockscreen/wallpaper_list%s.jpg", filename);
+ snprintf(filepath, sizeof(filepath), WALLPAPER_IMAGE_FILE, filename);
} else {
WALLPAPERUI_DBG("other image");
- snprintf(filepath, sizeof(filepath), "/opt/usr/share/lockscreen/wallpaper_list%s", p);
+ snprintf(filepath, sizeof(filepath), WALLPAPER_IMAGE_DIR, p);
}
WALLPAPERUI_DBG("filepath = %s", filepath);
if (ad->preview_image_type == WALLPAPER_TYPE_GALLERY) {
}
WALLPAPERUI_DBG("value = %s", value);
- file_list = ecore_file_ls("/opt/usr/share/lockscreen/wallpaper_list");
+ file_list = ecore_file_ls(WALLPAPER_IMAGE_DIR);
count = eina_list_count(file_list);
if (count > 1) {
for (i = 0; i < count; i++) {
temp = (char *)eina_list_nth(file_list, i);
if (temp != NULL && strcmp(temp, "lockscreen_selected_images.txt") != 0) {
- snprintf(string, sizeof(string), "/opt/usr/share/lockscreen/wallpaper_list/%s", temp);
+ snprintf(string, sizeof(string), WALLPAPER_IMAGE_DIR, temp);
if (strcmp(string, filepath) != 0) {
if (eina_list_search_unsorted(path_list, _compare_cb, string) == NULL) {
WALLPAPERUI_DBG("string = %s", string);
}
WALLPAPERUI_DBG("value = %s", value);
- file_list = ecore_file_ls("/opt/usr/share/lockscreen/wallpaper_list");
+ file_list = ecore_file_ls(WALLPAPER_IMAGE_DIR);
count = eina_list_count(file_list);
if (count > 1) {
for (i = 0; i < count; i++) {
temp = (char *)eina_list_nth(file_list, i);
if (temp != NULL && strcmp(temp, "lockscreen_selected_images.txt") != 0) {
- snprintf(string, sizeof(string), "/opt/usr/share/lockscreen/wallpaper_list/%s", temp);
+ snprintf(string, sizeof(string), WALLPAPER_IMAGE_DIR, temp);
if (strcmp(string, filepath) != 0) {
if (eina_list_search_unsorted(path_list, _compare_cb, string) == NULL) {
WALLPAPERUI_DBG("string = %s", string);
if (result == APP_CONTROL_RESULT_SUCCEEDED) {
char **path_array = NULL;
int array_length = 0;
- char *str = "/opt/usr/share/lockscreen/wallpaper_list";
+ char *str = WALLPAPER_IMAGE_DIR;
int j = 0;
if (app_control_get_extra_data_array(reply, "http://tizen.org/appcontrol/data/selected", &path_array, &array_length) == APP_CONTROL_ERROR_NONE) {
if (strncmp(str, path_array[0], strlen(str))) {
- WALLPAPERUI_DBG("it is not from /opt/usr/share/lockscreen/wallpaper_list home screen");
+ WALLPAPERUI_DBG("it is not from WALLPAPER_IMAGE_DIR/lockscreen/wallpaper_list home screen");
WALLPAPERUI_DBG("home screen path_array[0]=%s", path_array[0]);
}
/*set lock icon in main only for first image */
if (strncmp(str, path_array[0], strlen(str))) {
- WALLPAPERUI_DBG("it is not from /opt/usr/share/lockscreen/wallpaper_list lock screen");
+ WALLPAPERUI_DBG("it is not from WALLPAPER_IMAGE_DIR/lockscreen/wallpaper_list lock screen");
WALLPAPERUI_DBG("lock screen path_array[0]=%s", path_array[0]);
}