Name: com.samsung.dali-demo
Summary: The OpenGLES Canvas Core Demo
-Version: 2.0.19
+Version: 2.1.5
Release: 1
Group: System/Libraries
License: Apache-2.0
BuildRequires: cmake
BuildRequires: pkgconfig
BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(capi-appfw-app-control)
BuildRequires: pkgconfig(capi-media-player)
BuildRequires: pkgconfig(dlog)
BuildRequires: gettext-tools
of the capability of the toolkit.
##############################
+# Resources
+##############################
+
+%package resources_mobile
+Summary: Specific resource files for a 720x1280 display on Tizen Mobile
+Requires: %{name} = %{version}-%{release}
+Conflicts: %{name}-resources_rpi
+%description resources_mobile
+dali-demo specific resource files for a 720x1280 display on Tizen Mobile
+Contains style / style images
+
+%package resources_rpi
+Summary: Specific resource files for a 1920x1080 display on Raspberry Pi 4
+Requires: %{name} = %{version}-%{release}
+Conflicts: %{name}-resources_mobile
+%description resources_rpi
+dali-demo specific resource files for a 1920x1080 display on Raspberry Pi 4
+Contains style / style images
+
+##############################
# Preparation
##############################
%prep
%define dali_app_res_dir %{dali_app_ro_dir}/res/
%define dali_app_exe_dir %{dali_app_ro_dir}/bin/
%define locale_dir %{dali_app_res_dir}/locale
+
+%if 0%{?rpi_style}
+%define local_style_dir ../../resources/style/rpi
+%else
%define local_style_dir ../../resources/style/mobile
+%endif
##############################
# Build
%endif
-DLOCAL_STYLE_DIR=%{local_style_dir} \
-DINTERNATIONALIZATION:BOOL=OFF \
+ -DTIZEN:BOOL=ON \
.
make %{?jobs:-j%jobs}
cp -f %{_builddir}/%{name}-%{version}/%{name}.rule %{buildroot}%{smack_rule_dir}
%endif
+cp -rf %{_builddir}/%{name}-%{version}/resources/style/rpi %{buildroot}/%{dali_app_res_dir}/style_rpi
##############################
# Post Install
/sbin/ldconfig
exit 0
+%post resources_rpi
+pushd %{dali_app_res_dir}
+rm -rf style
+mv style_rpi style
+popd
+
+##############################
+# Pre Uninstall
+##############################
+
+%preun resources_rpi
+case "$1" in
+ 0)
+ %preun resources_rpi
+ pushd %{dali_app_res_dir}
+ mv style style_rpi
+ popd
+ ;;
+esac
+
##############################
# Post Uninstall
##############################
%{dali_app_res_dir}/models/*
%{dali_app_res_dir}/scripts/*
%{dali_app_res_dir}/shaders/*
-%{dali_app_res_dir}/style/*
-%{dali_app_res_dir}/style/images/*
%{dali_xml_file_dir}/%{name}.xml
%{dali_icon_dir}/*
%{locale_dir}/*
%config %{smack_rule_dir}/%{name}.rule
%endif
%license LICENSE
+
+%files resources_mobile
+%if 0%{?enable_dali_smack_rules}
+%manifest com.samsung.dali-demo.manifest-smack
+%else
+%manifest com.samsung.dali-demo.manifest
+%endif
+%defattr(-,root,root,-)
+%{dali_app_res_dir}/style/*
+%{dali_app_res_dir}/style/images/*
+
+%files resources_rpi
+%if 0%{?enable_dali_smack_rules}
+%manifest com.samsung.dali-demo.manifest-smack
+%else
+%manifest com.samsung.dali-demo.manifest
+%endif
+%defattr(-,root,root,-)
+%{dali_app_res_dir}/style_rpi/*
+%{dali_app_res_dir}/style_rpi/images/*