Use TZ_path on Tizen 3.x 93/63893/2
authorminho.sun <minho.sun@samsung.com>
Mon, 28 Mar 2016 09:35:17 +0000 (18:35 +0900)
committerminho.sun <minho.sun@samsung.com>
Mon, 28 Mar 2016 09:56:31 +0000 (18:56 +0900)
Use TZ_path on Tizen 3.x .

btzplatform-config has TZ_path variable.

Attach variable table below.

     variable       |     actual path
----------------------------------------
%TZ_SYS_BIN         |    /usr/bin
%TZ_SYS_RUN         |    /var/run
%TZ_SYS_DATA        |    /opt/data
%TZ_SYS_RW_APP      |    /opt/usr/apps
%TZ_SYS_DB          |    /opt/dbspace
%TZ_SYS_SHARE       |    /opt/share
%TZ_SYS_ETC         |    /opt/etc
%TZ_SYS_HOME        |    /home
%TZ_SYS_ROOT        |    /root
%TZ_SYS_RO_APP      |    /usr/apps
%TZ_SYS_RO_ICONS    |    /usr/share/icons
%TZ_SYS_RO_PACKAGES |    /usr/share/pakages
%TZ_SYS_RO_UG       |    /usr/ug

Change-Id: I09ea4314a76a9445e1dd3c91f3fd4bd8c63dc155

packaging/com.samsung.dali-demo.spec

index e439e04..4ddc4c8 100755 (executable)
@@ -21,6 +21,11 @@ BuildRequires:  gettext-tools
 BuildRequires:  pkgconfig(dali-core)
 BuildRequires:  pkgconfig(dali-toolkit)
 
+#need libtzplatform-config for directory if tizen version is 3.x
+%if "%{tizen_version_major}" == "3"
+BuildRequires:  pkgconfig(libtzplatform-config)
+%endif
+
 # DALi C++ applications always run on dali-adaptor.
 BuildRequires:  pkgconfig(dali-adaptor)
 
@@ -33,10 +38,22 @@ of the capability of the toolkit.
 ##############################
 %prep
 %setup -q
+
+
+#Use TZ_PATH when tizen version is 3.x
+%if "%{tizen_version_major}" == "2"
 %define dali_app_ro_dir       /usr/apps/com.samsung.dali-demo/
-%define dali_app_exe_dir      %{dali_app_ro_dir}/bin/
 %define dali_xml_file_dir     /usr/share/packages/
 %define dali_icon_dir         /usr/share/icons/
+%endif
+
+%if "%{tizen_version_major}" == "3"
+%define dali_app_ro_dir       %TZ_SYS_RO_APP/com.samsung.dali-demo/
+%define dali_xml_file_dir     %TZ_SYS_RO_PACKAGES
+%define dali_icon_dir         %TZ_SYS_RO_ICONS
+%endif
+
+%define dali_app_exe_dir      %{dali_app_ro_dir}/bin/
 %define smack_rule_dir        /etc/smack/accesses2.d/
 %define locale_dir            %{dali_app_ro_dir}/res/locale
 %define local_style_dir       ../../resources/style/mobile