blob: b2a65fde57e41daa929e118bbfce2e16af7e2233 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
%bcond_with wayland
Name: com.samsung.dali-demo
Summary: The OpenGLES Canvas Core Demo
Version: 1.0.31
Release: 1
Group: System/Libraries
License: Apache-2.0
URL: https://review.tizen.org/git/?p=platform/core/uifw/dali-demo.git;a=summary
Source0: %{name}-%{version}.tar.gz
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: dali
Requires: dali-adaptor
Requires: dali-toolkit
BuildRequires: cmake
BuildRequires: boost-devel
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)
%description
The OpenGLES Canvas Core Demo is a collection of examples and demonstrations
of the capability of the toolkit.
##############################
# Preparation
##############################
%prep
%setup -q
%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/
%define smack_rule_dir /etc/smack/accesses2.d/
##############################
# Build
##############################
%build
PREFIX="/usr"
CXXFLAGS+=" -Wall -g -O2"
LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -fPIC"
%ifarch %{arm}
CXXFLAGS+=" -D_ARCH_ARM_"
%endif
cd %{_builddir}/%{name}-%{version}/build/tizen && cmake -DDALI_APP_DIR=%{dali_app_ro_dir} .
make %{?jobs:-j%jobs}
##############################
# Installation
##############################
%install
rm -rf %{buildroot}
cd build/tizen
%make_install DALI_APP_DIR=%{dali_app_ro_dir}
mkdir -p %{buildroot}%{dali_xml_file_dir}
cp -f %{_builddir}/%{name}-%{version}/%{name}.xml %{buildroot}%{dali_xml_file_dir}
mkdir -p %{buildroot}%{dali_icon_dir}
mv %{buildroot}/%{dali_app_ro_dir}/images/%{name}.png %{buildroot}%{dali_icon_dir}
%if 0%{?enable_dali_smack_rules} && !%{with wayland}
mkdir -p %{buildroot}%{smack_rule_dir}
cp -f %{_builddir}/%{name}-%{version}/%{name}.rule %{buildroot}%{smack_rule_dir}
%endif
# LICENSE
mkdir -p %{buildroot}/usr/share/license
cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name}
##############################
# Post Install
##############################
%post
/sbin/ldconfig
exit 0
##############################
# Post Uninstall
##############################
%postun
/sbin/ldconfig
exit 0
##############################
# Files in Binary Packages
##############################
%files
%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_exe_dir}/dali-demo
%{dali_app_exe_dir}/*.example
%{dali_app_exe_dir}/dali-builder
%{dali_app_ro_dir}/images/*
%{dali_app_ro_dir}/models/*
%{dali_app_ro_dir}/scripts/*
%{dali_xml_file_dir}/%{name}.xml
%{dali_icon_dir}/*
%if 0%{?enable_dali_smack_rules} && !%{with wayland}
%config %{smack_rule_dir}/%{name}.rule
%endif
%{_datadir}/license/%{name}
|