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 %if 0%{?enable_trace}
155 --infodir=%{_infodir} \
156 --enable-rename-so=no
158 make %{?jobs:-j%jobs}
160 pushd %{_builddir}/%{name}-%{version}/build/tizen
161 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
164 pushd %{buildroot}%{_libdir}
165 for FILE in libdali-core-cxx11.so*; do mv "$FILE" "%{_builddir}/%{name}-%{version}/build/tizen/$FILE"; done
166 mv pkgconfig/dali-core.pc %{_builddir}/%{name}-%{version}/build/tizen/dali-core.pc
169 %if !0%{?disable_cxx03_build}
173 --program-prefix=%{?_program_prefix} \
174 --prefix=%{_prefix} \
175 --exec-prefix=%{_exec_prefix} \
176 --bindir=%{_bindir} \
177 --sbindir=%{_sbindir} \
178 --sysconfdir=%{_sysconfdir} \
179 --datadir=%{_datadir} \
180 --includedir=%{_includedir} \
181 --libdir=%{_libdir} \
182 --libexecdir=%{_libexecdir} \
183 --localstatedir=%{_localstatedir} \
184 --sharedstatedir=%{_sharedstatedir} \
185 --mandir=%{_mandir} \
186 --enable-cxx03-abi=yes \
187 --enable-gles=%{target_gles_version} \
188 %if 0%{?enable_debug}
191 %if 0%{?enable_trace}
194 --infodir=%{_infodir} \
195 --enable-rename-so=no
197 make %{?jobs:-j%jobs}
200 ##############################
202 ##############################
207 pushd %{_builddir}/%{name}-%{version}/build/tizen
208 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
210 for FILE in libdali-*.so*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
211 mv dali-core.pc %{buildroot}%{_libdir}/pkgconfig/dali-core.pc
214 #############################
216 #############################
217 pushd %{buildroot}%{_libdir}
218 rm -rf libdali-core.so
219 rm -rf libdali-core-cxx11.so
220 %if !0%{?disable_cxx03_build}
221 ln -s libdali-core.so.0.0.* libdali-core-cxx03.so
223 ln -s libdali-core-cxx11.so.0.0.* libdali-core.so
227 ##############################
229 ##############################
234 ##############################
236 ##############################
241 ##############################
242 # Files in Binary Packages
243 ##############################
245 %if !0%{?disable_cxx03_build}
247 %if 0%{?enable_dali_smack_rules}
248 %manifest dali.manifest-smack
250 %manifest dali.manifest
252 %defattr(-,root,root,-)
253 %{_libdir}/libdali-core.so.*
254 %{_libdir}/libdali-core-cxx03.so
259 %if 0%{?enable_dali_smack_rules}
260 %manifest dali.manifest-smack
262 %manifest dali.manifest
264 %defattr(-,root,root,-)
265 %{_libdir}/libdali-core-cxx11.so.*
266 %{_libdir}/libdali-core.so
269 %if !0%{?disable_cxx03_build}
271 %defattr(-,root,root,-)
272 %{_libdir}/pkgconfig/dali-core-cxx03.pc
273 %{dev_include_path}/dali/public-api/*
274 %{dev_include_path}/dali/devel-api/*
275 %{dev_include_path}/dali/doc/*
277 %files integration-devel-cxx03
278 %defattr(-,root,root,-)
279 %{_includedir}/dali/integration-api/*
283 %defattr(-,root,root,-)
284 %{_libdir}/pkgconfig/dali-core.pc
285 %{dev_include_path}/dali/public-api/*
286 %{dev_include_path}/dali/devel-api/*
287 %{dev_include_path}/dali/doc/*
289 %files integration-devel
290 %defattr(-,root,root,-)
291 %{_includedir}/dali/integration-api/*