Name: com.samsung.dali-demo
Summary: The OpenGLES Canvas Core Demo
-Version: 1.0.36
+Version: 1.1.41
Release: 1
Group: System/Libraries
License: Apache-2.0
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
-Requires: dali
-Requires: dali-adaptor
-Requires: dali-toolkit
+
BuildRequires: cmake
BuildRequires: pkgconfig
BuildRequires: pkgconfig(capi-appfw-application)
BuildRequires: pkgconfig(capi-media-player)
-BuildRequires: dali-toolkit-devel
-BuildRequires: dali-adaptor-devel
BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(egl)
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)
%description
The OpenGLES Canvas Core Demo is a collection of examples and demonstrations
##############################
%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
%build
PREFIX="/usr"
CXXFLAGS+=" -Wall -g -O2"
-LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -fPIC"
+LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed"
%ifarch %{arm}
CXXFLAGS+=" -D_ARCH_ARM_"
%endif
-cd %{_builddir}/%{name}-%{version}/build/tizen && cmake -DDALI_APP_DIR=%{dali_app_ro_dir} -DLOCALE_DIR=%{locale_dir} -DLOCAL_STYLE_DIR=%{local_style_dir} .
+cd %{_builddir}/%{name}-%{version}/build/tizen
+
+cmake -DDALI_APP_DIR=%{dali_app_ro_dir} \
+ -DLOCALE_DIR=%{locale_dir} \
+%if 0%{?enable_debug}
+ -DCMAKE_BUILD_TYPE=Debug \
+%endif
+ -DLOCAL_STYLE_DIR=%{local_style_dir} .
make %{?jobs:-j%jobs}
%{dali_app_exe_dir}/*.example
%{dali_app_exe_dir}/dali-builder
%{dali_app_ro_dir}/images/*
+%{dali_app_ro_dir}/videos/*
%{dali_app_ro_dir}/models/*
%{dali_app_ro_dir}/scripts/*
%{dali_app_ro_dir}/style/*