Merge "Added FontMetrics to FontClient API" into new_text
[platform/core/uifw/dali-adaptor.git] / packaging / dali-adaptor-wearable.spec
1 Name:       dali-adaptor
2 Summary:    The DALi Tizen Adaptor
3 Version:    1.0.25
4 Release:    1
5 Group:      System/Libraries
6 License:    Apache-2.0
7 URL:        https://review.tizen.org/git/?p=platform/core/uifw/dali-adaptor.git;a=summary
8 Source0:    %{name}-%{version}.tar.gz
9
10 %define dali_profile WEARABLE
11 %define dali_wearable_profile 1
12
13 Requires(post): /sbin/ldconfig
14 Requires(postun): /sbin/ldconfig
15 Requires:       boost-thread
16 Requires:       giflib
17 BuildRequires:  pkgconfig
18 BuildRequires:  gawk
19 BuildRequires:  pkgconfig(sensor)
20 BuildRequires:  pkgconfig(aul)
21 BuildRequires:  boost-devel
22 BuildRequires:  giflib-devel
23 BuildRequires:  pkgconfig(xi)
24 BuildRequires:  pkgconfig(fontconfig)
25 BuildRequires:  pkgconfig(elementary)
26 BuildRequires:  pkgconfig(capi-appfw-application)
27 BuildRequires:  libjpeg-turbo-devel
28 BuildRequires:  pkgconfig(evas)
29 BuildRequires:  pkgconfig(xfixes)
30 BuildRequires:  pkgconfig(xdamage)
31 BuildRequires:  pkgconfig(utilX)
32 BuildRequires:  dali-devel
33 BuildRequires:  dali-integration-devel
34 BuildRequires:  libxml2-devel
35 BuildRequires:  pkgconfig(vconf)
36 BuildRequires:  tts-devel
37 BuildRequires:  pkgconfig(dlog)
38 BuildRequires:  libdrm-devel
39 BuildRequires:  pkgconfig(libexif)
40 BuildRequires:  pkgconfig(capi-system-system-settings)
41 BuildRequires:  pkgconfig(libpng)
42 BuildRequires:  pkgconfig(gles20)
43 BuildRequires:  pkgconfig(efl-assist)
44 BuildRequires:  pkgconfig(harfbuzz)
45 BuildRequires:  fribidi-devel
46
47 %description
48 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
49 platform abstraction and application shell
50
51 ##############################
52 # devel
53 ##############################
54 %package devel
55 Summary:    Development components for the DALi Tizen Adaptor
56 Group:      Development/Building
57 Requires:   %{name} = %{version}-%{release}
58
59 %description devel
60 Development components for the DALi Tizen Adaptor - public headers and package configs
61
62 ##############################
63 # Dali Feedback Plugin
64 ##############################
65 %package dali-feedback-plugin
66 Summary:    Plugin to play haptic and audio feedback for Dali
67 Group:      System/Libraries
68 Requires:       libdeviced
69 BuildRequires:  pkgconfig(mm-sound)
70 BuildRequires:  pkgconfig(deviced)
71 BuildRequires:  libfeedback-devel
72
73 %description dali-feedback-plugin
74 Feedback plugin to play haptic and audio feedback for Dali
75
76 ##############################
77 # Preparation
78 ##############################
79 %prep
80 %setup -q
81 %define dali_data_rw_dir         /opt/usr/share/dali/
82 %define dali_data_ro_dir         /usr/share/dali/
83 %define user_font_cache_dir      %{dali_data_rw_dir}/glyphcache/
84 %define user_shader_cache_dir    %{dali_data_rw_dir}/core/shaderbin/
85 %define font_preloaded_path      /usr/share/fonts/
86 %define font_downloaded_path     /opt/share/fonts/
87 %define font_application_path    /usr/share/app_fonts/
88 %define font_configuration_file  /opt/etc/fonts/conf.avail/99-slp.conf
89 %define dali_plugin_sound_files  %{dali_data_ro_dir}/plugins/sounds/
90 %define dali_plugin_theme_files  %{dali_data_ro_dir}/themes/feedback-themes/
91
92 %define dev_include_path %{_includedir}
93
94 ##############################
95 # Build
96 ##############################
97 %build
98 PREFIX+="/usr"
99 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
100 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections "
101
102 %if 0%{?sec_build_binary_debug_enable}
103 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
104 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
105 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
106 %endif
107
108 %ifarch %{arm}
109 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
110 %endif
111
112 libtoolize --force
113 cd %{_builddir}/%{name}-%{version}/build/tizen
114 autoreconf --install
115 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
116 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
117 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
118 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
119 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
120 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
121
122 %configure --with-jpeg-turbo --enable-gles=20 --enable-profile=%{dali_profile} --libdir=%{_libdir}
123
124 make %{?jobs:-j%jobs}
125
126 ##############################
127 # Installation
128 ##############################
129 %install
130 rm -rf %{buildroot}
131 cd build/tizen
132 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
133
134 # LICENSE
135 mkdir -p %{buildroot}/usr/share/license
136 cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name}
137
138 ##############################
139 # Upgrade order:
140 # 1 - Pre Install new package
141 # 2 - Install new package
142 # 3 - Post install new package
143 # 4 - Pre uninstall old package
144 # 5 - Remove files not overwritten by new package
145 # 6 - Post uninstall old package
146 ##############################
147
148 %pre
149 rm -f %{user_font_cache_dir}/*
150 rm -f %{user_shader_cache_dir}/*
151 exit 0
152
153 ##############################
154 #  Post Install new package
155 ##############################
156 %post
157 /sbin/ldconfig
158 chown 5000:5000 %{user_font_cache_dir}
159 chown 5000:5000 %{user_shader_cache_dir}
160 exit 0
161
162 %if 0%{?dali_feedback_plugin}
163 %post dali-feedback-plugin
164 /sbin/ldconfig
165 exit 0
166 %endif
167
168 ##############################
169 #   Pre Uninstall old package
170 ##############################
171 %preun
172 rm -f %{user_font_cache_dir}/*
173 rm -f %{user_shader_cache_dir}/*
174 exit 0
175
176 ##############################
177 #   Post Uninstall old package
178 ##############################
179 %postun
180 /sbin/ldconfig
181 exit 0
182
183 %if 0%{?dali_feedback_plugin}
184 %postun dali-feedback-plugin
185 /sbin/ldconfig
186 exit 0
187 %endif
188
189 ##############################
190 # Files in Binary Packages
191 ##############################
192
193 %files
194 %manifest dali-adaptor.manifest-mobile
195 %defattr(-,root,root,-)
196 %{_libdir}/libdali-adap*.so*
197 %defattr(-,app,app,-)
198 %dir %{user_font_cache_dir}
199 %dir %{user_shader_cache_dir}
200 %{_bindir}/*
201 %{_datadir}/license/%{name}
202
203 %files devel
204 %defattr(-,root,root,-)
205 %{dev_include_path}/dali/*
206 %{_libdir}/pkgconfig/dali*.pc
207
208 %if 0%{?dali_feedback_plugin}
209 %files dali-feedback-plugin
210 %defattr(-,root,root,-)
211 %{_libdir}/libdali-feedback-plugin.so*
212 %{dali_plugin_sound_files}/*
213 %{dali_plugin_theme_files}/*
214 %endif
215