2 Summary: DALi 3D Engine
5 Group: System/Libraries
6 License: Apache-2.0 and BSD-3-Clause and MIT
7 URL: https://review.tizen.org/git/?p=platform/core/uifw/dali-core.git;a=summary
8 Source0: %{name}-%{version}.tar.gz
10 Requires(post): /sbin/ldconfig
11 Requires(postun): /sbin/ldconfig
12 BuildRequires: pkgconfig
15 %if 0%{?tizen_version_major} >= 3
16 BuildRequires: pkgconfig(libtzplatform-config)
19 %if 0%{?tizen_version_major} < 4
20 %define disable_cxx03_build 1
26 %if !0%{?disable_cxx03_build}
27 ##############################
29 ##############################
31 Summary: DALi 3D Engine with cxx03 abi
32 Provides: %{name}-cxx03 = %{version}-%{release}
35 DALi 3D Engine with cxx03 abi with cxx03 abi
37 ##############################
39 ##############################
41 Summary: Development components for DALi 3D Engine with cxx03 abi
42 Group: Development/Building
43 Requires: %{name}-cxx03 = %{version}-%{release}
44 Requires: %{name}-integration-devel-cxx03 = %{version}-%{release}
46 %description devel-cxx03
47 Development components for DALi 3D Engine - public headers and package config
49 ##############################
50 # integration-devel-cxx03
51 ##############################
52 %package integration-devel-cxx03
53 Summary: Integration development package for DALi 3D Engine witch cxx03 abi
54 Group: Development/Building
55 Requires: %{name}-cxx03 = %{version}-%{release}
57 %description integration-devel-cxx03
58 Integration development package for DALi 3D Engine - headers for integrating with an adaptor/platform abstraction library.
61 ##############################
63 ##############################
65 Summary: Development components for DALi 3D Engine
66 Group: Development/Building
67 Requires: %{name} = %{version}-%{release}
68 Requires: %{name}-integration-devel = %{version}-%{release}
71 Development components for DALi 3D Engine - public headers and package config
73 ##############################
75 ##############################
76 %package integration-devel
77 Summary: Integration development package for DALi 3D Engine
78 Group: Development/Building
79 Requires: %{name} = %{version}-%{release}
81 %description integration-devel
82 Integration development package for DALi 3D Engine - headers for integrating with an adaptor/platform abstraction library.
84 ##############################
86 ##############################
90 #Use TZ_PATH when tizen version is 3.x
92 %if "%{tizen_version_major}" == "2"
93 %define dali_data_rw_dir /opt/usr/share/dali/
94 %define dali_data_ro_dir /usr/share/dali/
96 %define dali_data_rw_dir %TZ_SYS_SHARE/dali/
97 %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/
100 %define dev_include_path %{_includedir}
102 ##############################
104 ##############################
107 CXXFLAGS+=" -Wall -g -Os -DNDEBUG -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
108 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -lgcc_s -lgcc -Wl,-Bsymbolic-functions "
111 CXXFLAGS+=" -D_ARCH_ARM_ -mfpu=neon"
114 %if 0%{?enable_coverage}
115 CXXFLAGS+=" --coverage "
116 LDFLAGS+=" --coverage "
120 cd %{_builddir}/%{name}-%{version}/build/tizen
122 DALI_DATA_RW_DIR="%{dali_data_rw_dir}"
123 DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
124 export DALI_DATA_RW_DIR
125 export DALI_DATA_RO_DIR
127 # Default to GLES 2.0 if not specified.
128 %{!?target_gles_version: %define target_gles_version 20}
130 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS;
131 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS;
132 LDFLAGS="${LDFLAGS:-%optflags}" ; export LDFLAGS;
135 --program-prefix=%{?_program_prefix} \
136 --prefix=%{_prefix} \
137 --exec-prefix=%{_exec_prefix} \
138 --bindir=%{_bindir} \
139 --sbindir=%{_sbindir} \
140 --sysconfdir=%{_sysconfdir} \
141 --datadir=%{_datadir} \
142 --includedir=%{_includedir} \
143 --libdir=%{_libdir} \
144 --libexecdir=%{_libexecdir} \
145 --localstatedir=%{_localstatedir} \
146 --sharedstatedir=%{_sharedstatedir} \
147 --mandir=%{_mandir} \
148 --enable-gles=%{target_gles_version} \
149 %if 0%{?enable_debug}
152 --infodir=%{_infodir} \
153 --enable-rename-so=no
155 make %{?jobs:-j%jobs}
157 pushd %{_builddir}/%{name}-%{version}/build/tizen
158 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
161 pushd %{buildroot}%{_libdir}
162 for FILE in libdali-core-cxx11.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE"; done
163 mv pkgconfig/dali-core.pc %{_builddir}/%{name}-%{version}/build/tizen/dali-core.pc
166 %if !0%{?disable_cxx03_build}
170 --program-prefix=%{?_program_prefix} \
171 --prefix=%{_prefix} \
172 --exec-prefix=%{_exec_prefix} \
173 --bindir=%{_bindir} \
174 --sbindir=%{_sbindir} \
175 --sysconfdir=%{_sysconfdir} \
176 --datadir=%{_datadir} \
177 --includedir=%{_includedir} \
178 --libdir=%{_libdir} \
179 --libexecdir=%{_libexecdir} \
180 --localstatedir=%{_localstatedir} \
181 --sharedstatedir=%{_sharedstatedir} \
182 --mandir=%{_mandir} \
183 --enable-cxx03-abi=yes \
184 --enable-gles=%{target_gles_version} \
185 %if 0%{?enable_debug}
188 --infodir=%{_infodir} \
189 --enable-rename-so=no
191 make %{?jobs:-j%jobs}
194 ##############################
196 ##############################
201 pushd %{_builddir}/%{name}-%{version}/build/tizen
202 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
204 for FILE in libdali-*.so*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
205 mv dali-core.pc %{buildroot}%{_libdir}/pkgconfig/dali-core.pc
208 #############################
210 #############################
211 pushd %{buildroot}%{_libdir}
212 rm -rf libdali-core.so
213 rm -rf libdali-core-cxx11.so
214 %if !0%{?disable_cxx03_build}
215 ln -s libdali-core.so.0.0.* libdali-core-cxx03.so
217 ln -s libdali-core-cxx11.so.0.0.* libdali-core.so
221 ##############################
223 ##############################
228 ##############################
230 ##############################
235 ##############################
236 # Files in Binary Packages
237 ##############################
239 %if !0%{?disable_cxx03_build}
241 %if 0%{?enable_dali_smack_rules}
242 %manifest dali.manifest-smack
244 %manifest dali.manifest
246 %defattr(-,root,root,-)
247 %{_libdir}/libdali-core.so.*
248 %{_libdir}/libdali-core-cxx03.so
249 %defattr(-,app,app,-)
254 %if 0%{?enable_dali_smack_rules}
255 %manifest dali.manifest-smack
257 %manifest dali.manifest
259 %defattr(-,root,root,-)
260 %{_libdir}/libdali-core-cxx11.so.*
261 %{_libdir}/libdali-core.so
262 %defattr(-,app,app,-)
265 %if !0%{?disable_cxx03_build}
267 %defattr(-,root,root,-)
268 %{_libdir}/pkgconfig/dali-core-cxx03.pc
269 %{dev_include_path}/dali/public-api/*
270 %{dev_include_path}/dali/devel-api/*
271 %{dev_include_path}/dali/doc/*
273 %files integration-devel-cxx03
274 %defattr(-,root,root,-)
275 %{_includedir}/dali/integration-api/*
279 %defattr(-,root,root,-)
280 %{_libdir}/pkgconfig/dali-core.pc
281 %{dev_include_path}/dali/public-api/*
282 %{dev_include_path}/dali/devel-api/*
283 %{dev_include_path}/dali/doc/*
285 %files integration-devel
286 %defattr(-,root,root,-)
287 %{_includedir}/dali/integration-api/*