From 79101277b732398293770256d46df38bbd2a3d3d Mon Sep 17 00:00:00 2001 From: MyungJoo Ham Date: Tue, 22 Nov 2016 16:51:48 +0900 Subject: [PATCH] spec: fix incorrect locale handling & symlinks Fix 1. shared locale should not be moved for %find_land to find them correctly. Fix 2. ln with * doesn't work in most Tizen devices during post script. Do mv instead. Change-Id: I7a4ef6ea6228f929927f6834779b50084081b504 Signed-off-by: MyungJoo Ham --- packaging/ise-default.spec | 146 ++++++++++++++++++++++++--------------------- 1 file changed, 78 insertions(+), 68 deletions(-) diff --git a/packaging/ise-default.spec b/packaging/ise-default.spec index e2c4070..76f0334 100644 --- a/packaging/ise-default.spec +++ b/packaging/ise-default.spec @@ -243,10 +243,11 @@ rm -rf %{buildroot} %make_install mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/ise-default/common pushd %{buildroot}%{TZ_SYS_RO_APP}/ise-default/ -rm -Rf res_shared -mkdir -p res_shared -mv res/locale res_shared -mv bin res common/ +mv bin common/ +mkdir -p common/res +pushd res +for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../common/res/; fi; done +popd popd %endif @@ -258,10 +259,11 @@ pushd build_mobile popd mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/ise-default/mobile pushd %{buildroot}%{TZ_SYS_RO_APP}/ise-default/ -rm -Rf res_shared -mkdir -p res_shared -mv res/locale res_shared -mv bin res mobile +mv bin mobile/ +mkdir -p mobile/res +pushd res +for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../mobile/res/; fi; done +popd popd %endif @@ -273,10 +275,11 @@ pushd build_tv popd mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/ise-default/tv pushd %{buildroot}%{TZ_SYS_RO_APP}/ise-default/ -rm -Rf res_shared -mkdir -p res_shared -mv res/locale res_shared -mv bin res tv +mv bin tv/ +mkdir -p tv/res +pushd res +for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../tv/res/; fi; done +popd popd %endif @@ -288,10 +291,11 @@ pushd build_ivi popd mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/ise-default/ivi pushd %{buildroot}%{TZ_SYS_RO_APP}/ise-default/ -rm -Rf res_shared -mkdir -p res_shared -mv res/locale res_shared -mv bin res ivi +mv bin ivi/ +mkdir -p ivi/res +pushd res +for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../ivi/res/; fi; done +popd popd %endif @@ -305,10 +309,11 @@ pushd build_wearable_cir popd mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/ise-default/wearable-circle pushd %{buildroot}%{TZ_SYS_RO_APP}/ise-default/ -rm -Rf res_shared -mkdir -p res_shared -mv res/locale res_shared -mv bin res wearable-circle +mv bin wearable-circle/ +mkdir -p wearable-circle/res +pushd res +for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../wearable-circle/res/; fi; done +popd popd pushd build_wearable_rec @@ -316,15 +321,14 @@ pushd build_wearable_rec popd mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/ise-default/wearable-rectangle pushd %{buildroot}%{TZ_SYS_RO_APP}/ise-default/ -rm -Rf res_shared -mkdir -p res_shared -mv res/locale res_shared -mv bin res wearable-rectangle +mv bin wearable-rectangle/ +mkdir -p wearable-rectangle/res +pushd res +for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../wearable-rectangle/res/; fi; done +popd popd %endif -mv %{buildroot}%{TZ_SYS_RO_APP}/ise-default/res_shared %{buildroot}%{TZ_SYS_RO_APP}/ise-default/res - %find_lang %{name} %files -f %{name}.lang @@ -337,18 +341,19 @@ mv %{buildroot}%{TZ_SYS_RO_APP}/ise-default/res_shared %{buildroot}%{TZ_SYS_RO_A # In 4.0 unified build env, this if statement is always true. %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" %post profile_common -pushd %{TZ_SYS_RO_APP}/ise-default -ln -sf common/bin bin -pushd res -ln -sf ../common/res/* . -popd +pushd %{TZ_SYS_RO_APP}/ise-default/common/ +mkdir -p ../res +mv bin ../ +mv res/* ../res/ popd %preun profile_common pushd %{TZ_SYS_RO_APP}/ise-default -rm bin +rm -Rf bin +pushd res +for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done +popd popd %files profile_common -%exclude %{TZ_SYS_RO_APP}/ise-default/common/res/locale %{TZ_SYS_RO_APP}/ise-default/common/* %endif @@ -357,18 +362,19 @@ popd # In 4.0 unified build env, this if statement is always true. %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common" %post profile_mobile -pushd %{TZ_SYS_RO_APP}/ise-default -ln -sf mobile/bin bin -pushd res -ln -sf ../mobile/res/* . -popd +pushd %{TZ_SYS_RO_APP}/ise-default/mobile/ +mkdir -p ../res +mv bin ../ +mv res/* ../res/ popd %preun profile_mobile pushd %{TZ_SYS_RO_APP}/ise-default -rm bin +rm -Rf bin +pushd res +for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done +popd popd %files profile_mobile -%exclude %{TZ_SYS_RO_APP}/ise-default/mobile/res/locale %{TZ_SYS_RO_APP}/ise-default/mobile/* %endif @@ -377,18 +383,19 @@ popd # In 4.0 unified build env, this if statement is always true. %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common" %post profile_tv -pushd %{TZ_SYS_RO_APP}/ise-default -ln -sf tv/bin bin -pushd res -ln -sf ../tv/res/* . -popd +pushd %{TZ_SYS_RO_APP}/ise-default/tv/ +mkdir -p ../res +mv bin ../ +mv res/* ../res/ popd %preun profile_tv pushd %{TZ_SYS_RO_APP}/ise-default -rm bin +rm -Rf bin +pushd res +for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done +popd popd %files profile_tv -%exclude %{TZ_SYS_RO_APP}/ise-default/tv/res/locale %{TZ_SYS_RO_APP}/ise-default/tv/* %endif @@ -397,18 +404,19 @@ popd # In 4.0 unified build env, this if statement is always true. %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" %post profile_ivi -pushd %{TZ_SYS_RO_APP}/ise-default -ln -sf ivi/bin bin -pushd res -ln -sf ../ivi/res/* . -popd +pushd %{TZ_SYS_RO_APP}/ise-default/ivi/ +mkdir -p ../res +mv bin ../ +mv res/* ../res/ popd %preun profile_ivi pushd %{TZ_SYS_RO_APP}/ise-default -rm bin +rm -Rf bin +pushd res +for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done +popd popd %files profile_ivi -%exclude %{TZ_SYS_RO_APP}/ise-default/ivi/res/locale %{TZ_SYS_RO_APP}/ise-default/ivi/* %endif @@ -421,33 +429,35 @@ popd %files profile_wearable %post profile_wearable-extension-circle -pushd %{TZ_SYS_RO_APP}/ise-default -ln -sf wearable-circle/bin bin -pushd res -ln -sf ../wearable-circle/res/* . -popd +pushd %{TZ_SYS_RO_APP}/ise-default/wearable-circle/ +mkdir -p ../res +mv bin ../ +mv res/* ../res/ popd %preun profile_wearable-extension-circle pushd %{TZ_SYS_RO_APP}/ise-default -rm bin +rm -Rf bin +pushd res +for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done +popd popd %files profile_wearable-extension-circle -%exclude %{TZ_SYS_RO_APP}/ise-default/wearable-circle/res/locale %{TZ_SYS_RO_APP}/ise-default/wearable-circle/* %post profile_wearable-extension-rectangle -pushd %{TZ_SYS_RO_APP}/ise-default -ln -sf wearable-rectangle/bin bin -pushd res -ln -sf ../wearable-rectangle/res/* . -popd +pushd %{TZ_SYS_RO_APP}/ise-default/wearable-rectangle/ +mkdir -p ../res +mv bin ../ +mv res/* ../res/ popd %preun profile_wearable-extension-rectangle pushd %{TZ_SYS_RO_APP}/ise-default -rm bin +rm -Rf bin +pushd res +for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done +popd popd %files profile_wearable-extension-rectangle -%exclude %{TZ_SYS_RO_APP}/ise-default/wearable-rectangle/res/locale %{TZ_SYS_RO_APP}/ise-default/wearable-rectangle/* %endif -- 2.7.4