2 # This spec file is used to build DALi Adaptor for different Tizen Profiles
3 # Current profiles are: Mobile, TV, Wearable, Common
5 # The profile variable is defined outside of the spec file in a build.conf file.
6 # It will contain the profile and whether or not to build with X11 or Wayland
8 # gbs will try to download the build.conf for the platform automatically from the repo location when
9 # performing a gbs build ( use gbs build -v to see it download location) E.g.
10 # http://download.tizen.org/snapshots/tizen/tv/tizen-tv/repos/arm-wayland/packages/repodata/xxxx-build.conf.gz
16 Summary: The DALi Tizen Adaptor
19 Group: System/Libraries
20 License: Apache-2.0 and BSD-2-Clause and MIT
21 URL: https://review.tizen.org/git/?p=platform/core/uifw/dali-adaptor.git;a=summary
22 Source0: %{name}-%{version}.tar.gz
24 Requires(post): /sbin/ldconfig
25 Requires(postun): /sbin/ldconfig
28 # Get the profile from tizen_profile_name if it exists.
29 %if 0%{?tizen_profile_name:1}
30 %define profile %{tizen_profile_name}
33 %if "%{profile}" == "mobile"
34 %define dali_profile MOBILE
35 %define dali_feedback_plugin 0
36 %define shaderbincache_flag DISABLE
37 BuildRequires: pkgconfig(gles20)
38 %define gles_requirement_setup 1
41 %if "%{profile}" == "tv"
42 %define dali_profile TV
43 %define dali_feedback_plugin 0
44 %define shaderbincache_flag ENABLE
45 BuildRequires: pkgconfig(glesv2)
46 %define gles_requirement_setup 1
49 %if "%{profile}" == "wearable"
50 %define dali_profile WEARABLE
51 %define dali_feedback_plugin 0
52 %define shaderbincache_flag DISABLE
53 BuildRequires: pkgconfig(gles20)
54 %define gles_requirement_setup 1
57 %if "%{profile}" == "common"
58 %define dali_profile COMMON
59 %define dali_feedback_plugin 0
60 %define tizen_2_2_compatibility 1
61 %define shaderbincache_flag DISABLE
62 BuildRequires: pkgconfig(glesv2)
63 %define gles_requirement_setup 1
66 # If we have not set a BuildRequires for the gles version, default it here.
67 %{!?gles_requirement_setup: BuildRequires: pkgconfig(glesv2)}
69 BuildRequires: pkgconfig
71 BuildRequires: pkgconfig(sensor)
72 BuildRequires: pkgconfig(aul)
73 BuildRequires: giflib-devel
74 BuildRequires: pkgconfig(fontconfig)
75 BuildRequires: libjpeg-turbo-devel
76 BuildRequires: dali-devel
77 BuildRequires: dali-integration-devel
78 BuildRequires: pkgconfig(vconf)
79 BuildRequires: tts-devel
80 BuildRequires: pkgconfig(dlog)
81 BuildRequires: libdrm-devel
82 BuildRequires: pkgconfig(libexif)
83 BuildRequires: pkgconfig(libpng)
84 BuildRequires: pkgconfig(egl)
85 BuildRequires: libcurl-devel
86 BuildRequires: pkgconfig(harfbuzz)
87 BuildRequires: fribidi-devel
89 %if 0%{?tizen_2_2_compatibility} != 1
90 BuildRequires: pkgconfig(capi-system-info)
93 # Tizen currently does not have libuv as a separate libuv package
94 # So we have to look into the uv headers bundled inside node-js
95 BuildRequires: nodejs-devel
100 ####### BUILDING FOR WAYLAND #######
101 BuildRequires: pkgconfig(wayland-egl)
102 BuildRequires: pkgconfig(wayland-client)
103 BuildRequires: wayland-devel
104 # Currently Tizen Common we use does not have wayland extensions like xdg-shell
105 %if "%{profile}" != "common"
106 BuildRequires: wayland-extension-client-devel
109 # dali-adaptor-uv uses libuv mainloop and has its own wayland client (it needs wayland-client headers).
110 BuildRequires: libxkbcommon-devel
112 # dali-adaptor uses ecore mainloop
113 BuildRequires: pkgconfig(ecore-wayland)
115 # tpkp-curl (certificate pinning for libcurl functions) is only available in Tizen 3.0
116 BuildRequires: pkgconfig(tpkp-curl)
118 ####### BUILDING FOR X11#######
120 BuildRequires: pkgconfig(egl)
121 BuildRequires: pkgconfig(xext)
122 BuildRequires: pkgconfig(xi)
123 BuildRequires: pkgconfig(xfixes)
124 BuildRequires: pkgconfig(xdamage)
125 BuildRequires: pkgconfig(utilX)
129 BuildRequires: pkgconfig(evas)
130 BuildRequires: pkgconfig(elementary)
131 BuildRequires: pkgconfig(capi-appfw-application)
132 BuildRequires: pkgconfig(capi-system-system-settings)
134 %if 0%{?over_tizen_2_2}
135 BuildRequires: pkgconfig(capi-system-info)
141 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
142 platform abstraction and application shell
144 ##############################
146 ##############################
148 Summary: Development components for the DALi Tizen Adaptor
149 Group: Development/Building
150 Requires: %{name} = %{version}-%{release}
151 Requires: %{name}-integration-devel = %{version}-%{release}
154 Development components for the DALi Tizen Adaptor - public headers and package configs
156 ##############################
158 ##############################
159 %package integration-devel
160 Summary: Integration development package for the Adaptor
161 Group: Development/Building
162 Requires: %{name} = %{version}-%{release}
164 %description integration-devel
165 Integration development package for the Adaptor - headers for integrating with an adaptor library.
167 ##############################
168 # Dali Feedback Plugin
169 ##############################
170 %package dali-feedback-plugin
171 Summary: Plugin to play haptic and audio feedback for Dali
172 Group: System/Libraries
173 %if 0%{?dali_feedback_plugin}
174 #Requires: libdeviced
175 BuildRequires: pkgconfig(mm-sound)
176 BuildRequires: pkgconfig(haptic)
177 BuildRequires: libfeedback-devel
180 %description dali-feedback-plugin
181 Feedback plugin to play haptic and audio feedback for Dali
183 ##############################
185 ##############################
188 %define dali_data_rw_dir /usr/share/dali/
189 %define dali_data_ro_dir /usr/share/dali/
190 %define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/
191 %define font_preloaded_path /usr/share/fonts/
192 %define font_downloaded_path /opt/share/fonts/
193 %define font_application_path /usr/share/app_fonts/
194 %define font_configuration_file /opt/etc/fonts/conf.avail/99-slp.conf
195 %define dali_plugin_sound_files %{dali_data_ro_dir}/plugins/sounds/
197 %define dev_include_path %{_includedir}
199 ##############################
201 ##############################
204 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
205 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
208 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
213 CXXFLAGS+=" -DWAYLAND"
214 configure_flags="--enable-wayland"
217 %if 0%{?tizen_2_2_compatibility}
218 CFLAGS+=" -DTIZEN_SDK_2_2_COMPATIBILITY"
219 CXXFLAGS+=" -DTIZEN_SDK_2_2_COMPATIBILITY"
223 cd %{_builddir}/%{name}-%{version}/build/tizen
226 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
227 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
228 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
229 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
230 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
231 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
233 # Default to GLES 2.0 if not specified.
234 %{!?target_gles_version: %define target_gles_version 20}
236 #--enable-efl=no \ # only affects dali-adaptor-uv
237 #--enable-appfw=yes \ # affects both dali-adaptor & dali-adaptor-uv
238 #--with-libuv=/usr/include/node/ \ # only affects dali-adaptor-uv
240 # Set up the build via configure.
241 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} --enable-shaderbincache=%{shaderbincache_flag} --enable-profile=%{dali_profile} \
242 %if 0%{?dali_feedback_plugin}
245 %if 0%{?tizen_2_2_compatibility}
246 --with-tizen-2-2-compatibility \
254 --with-libuv=/usr/include/node/ \
255 $configure_flags --libdir=%{_libdir}
258 make %{?jobs:-j%jobs}
260 ##############################
262 ##############################
266 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
269 mkdir -p %{buildroot}/usr/share/license
270 cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name}
272 ##############################
274 # 1 - Pre Install new package
275 # 2 - Install new package
276 # 3 - Post install new package
277 # 4 - Pre uninstall old package
278 # 5 - Remove files not overwritten by new package
279 # 6 - Post uninstall old package
280 ##############################
285 ##############################
286 # Post Install new package
287 ##############################
292 %if 0%{?dali_feedback_plugin}
293 %post dali-feedback-plugin
298 ##############################
299 # Pre Uninstall old package
300 ##############################
304 ##############################
305 # Post Uninstall old package
306 ##############################
311 %if 0%{?dali_feedback_plugin}
312 %postun dali-feedback-plugin
317 ##############################
318 # Files in Binary Packages
319 ##############################
322 %manifest dali-adaptor.manifest
323 %defattr(-,root,root,-)
324 %{_libdir}/libdali-adap*.so*
325 %defattr(-,app,app,-)
326 %dir %{user_shader_cache_dir}
328 %{_datadir}/license/%{name}
331 %defattr(-,root,root,-)
332 %{dev_include_path}/dali/dali.h
333 %{dev_include_path}/dali/public-api/*
334 %{dev_include_path}/dali/devel-api/*
335 %{dev_include_path}/dali/doc/*
336 %{_libdir}/pkgconfig/dali-adaptor.pc
337 %{_libdir}/pkgconfig/dali-adaptor-uv.pc
339 %files integration-devel
340 %defattr(-,root,root,-)
341 %{dev_include_path}/dali/integration-api/adaptors/*
342 %{_libdir}/pkgconfig/dali-adaptor-integration.pc
344 %if 0%{?dali_feedback_plugin}
345 %files dali-feedback-plugin
346 %defattr(-,root,root,-)
347 %{_libdir}/libdali-feedback-plugin.so*
348 %{dali_plugin_sound_files}/*