Release version 1.9.13
[platform/core/appfw/widget-viewer.git] / packaging / libwidget_viewer.spec
1 %bcond_with wayland
2
3 Name: libwidget_viewer
4 Summary: Library for developing the application
5 Version: 1.9.13
6 Release: 1
7 Group: Applications/Core Applications
8 License: Flora-1.1 and Apache-2.0
9 Source0: %{name}-%{version}.tar.gz
10 Source1001: %{name}_evas.manifest
11 Source1003: org.tizen.widget_viewer_sdk.manifest
12 Source1004: watch-control.manifest
13 Source1005: frame-broker.manifest
14 Source1006: frame-provider.manifest
15 Source1007: watch-holder.manifest
16 Source1008: watch-holder-base.manifest
17 Source1009: ambient-viewer.manifest
18
19 BuildRequires: cmake, gettext-tools, coreutils, edje-bin
20 BuildRequires: pkgconfig(dlog)
21 BuildRequires: pkgconfig(aul)
22 BuildRequires: pkgconfig(glib-2.0)
23 BuildRequires: pkgconfig(gio-2.0)
24 BuildRequires: pkgconfig(sqlite3)
25 BuildRequires: pkgconfig(db-util)
26 BuildRequires: pkgconfig(widget_service)
27 BuildRequires: pkgconfig(vconf)
28 BuildRequires: pkgconfig(elementary)
29 BuildRequires: pkgconfig(pkgmgr-info)
30 BuildRequires: pkgconfig(capi-appfw-application)
31 BuildRequires: pkgconfig(appcore-efl)
32 BuildRequires: pkgconfig(capi-system-info)
33 BuildRequires: pkgconfig(efl-extension)
34 BuildRequires: pkgconfig(wayland-client)
35 BuildRequires: pkgconfig(libtbm)
36 BuildRequires: pkgconfig(libtzplatform-config)
37 BuildRequires: pkgconfig(cynara-client)
38 BuildRequires: pkgconfig(appsvc)
39 BuildRequires: pkgconfig(ecore-wl2)
40 BuildRequires: pkgconfig(wayland-tbm-client)
41 BuildRequires: pkgconfig(screen_connector_watcher_evas)
42 BuildRequires: pkgconfig(capi-system-device)
43 BuildRequires: pkgconfig(screen_connector_launcher_service)
44 BuildRequires: pkgconfig(screen_connector_shared_widget_launch)
45 BuildRequires: pkgconfig(libsmack)
46 BuildRequires: pkgconfig(screen_connector_remote_surface_evas_mock)
47 BuildRequires: pkgconfig(uuid)
48 BuildRequires:  pkgconfig(gmock)
49
50 %if 0%{?gcov:1}
51 BuildRequires:  lcov
52 BuildRequires:  zip
53 %endif
54
55 %description
56 API for creating a new instance of the widget and managing its life-cycle.
57
58 %prep
59 %setup -q
60 cp %{SOURCE1001} .
61 cp %{SOURCE1003} .
62 cp %{SOURCE1004} .
63 cp %{SOURCE1005} .
64 cp %{SOURCE1006} .
65 cp %{SOURCE1007} .
66 cp %{SOURCE1008} .
67 cp %{SOURCE1009} .
68
69 %build
70 export CFLAGS+=" -DEFL_BETA_API_SUPPORT "
71 export CXXFLAGS+=" -DEFL_BETA_API_SUPPORT "
72 %if 0%{?gcov:1}
73 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
74 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
75 export FFLAGS+=" -fprofile-arcs -ftest-coverage"
76 export LDFLAGS+=" -lgcov"
77 %endif
78
79 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
80 %cmake -DWIDGET_ENABLED=On \
81         -DTZ_SYS_SHARE=/usr/share \
82         -DFULLVER=%{version} \
83         -DMAJORVER=${MAJORVER} \
84         .
85 make %{?jobs:-j%jobs}
86
87 %check
88 ctest -V
89 %if 0%{?gcov:1}
90 lcov -c --ignore-errors graph --no-external -q -d . -o widget-viewer.info
91 genhtml widget-viewer.info -o widget-viewer.out
92 zip -r widget-viewer.zip widget-viewer.out
93 install -m 0644 widget-viewer.zip %{buildroot}%{_datadir}/gcov/obj/
94 %endif
95
96 %install
97 rm -rf %{buildroot}
98 %make_install
99 cat << EOF > run-unittest.sh
100 #!/bin/sh
101 setup() {
102     echo "setup start"
103 }
104
105 test_main() {
106     echo "test_main start"
107     /usr/bin/widget_viewer-unittests
108 }
109
110 teardown() {
111     echo "teardown start"
112 }
113
114 main() {
115     setup
116     test_main
117     teardown
118 }
119
120 main "\$*"
121 EOF
122
123 mkdir -p %{buildroot}%{_bindir}/tizen-unittests/%{name}
124 install -m 0755 run-unittest.sh %{buildroot}%{_bindir}/tizen-unittests/%{name}/
125
126 %if 0%{?gcov:1}
127 builddir=$(basename $PWD)
128 gcno_obj_dir=%{buildroot}%{_datadir}/gcov/obj/%{name}/"$builddir"
129 mkdir -p "$gcno_obj_dir"
130 find . -name '*.gcno' -exec cp --parents '{}' "$gcno_obj_dir" ';'
131 %endif
132
133
134 %post -n %{name} -p /sbin/ldconfig
135 %postun -n %{name} -p /sbin/ldconfig
136
137 #################################################
138 # libwidget_viewer_evas
139 %package -n %{name}_evas
140 Summary: Library for developing the widget viewer evas
141 Group: Applications/Core Applications
142 License: Flora-1.1
143
144 %description -n %{name}_evas
145 Provider APIs to develop the widget viewer EFL application.
146
147 %package -n %{name}_evas-devel
148 Summary: Widget provider application development library (dev) (EFL version)
149 Group: Development/Libraries
150 Requires: %{name}_evas
151
152 %description -n %{name}_evas-devel
153 Header & package configuration files to support development of the widget viewer applications. (for EFL app)
154
155 %post -n %{name}_evas -p /sbin/ldconfig
156 %postun -n %{name}_evas -p /sbin/ldconfig
157
158 #################################################
159 # org.tizen.widget_viewer_sdk
160 %package -n org.tizen.widget_viewer_sdk
161 Summary: The widget viewer for development using SDK(IDE)
162 Version: 0.0.1
163 Group: Development/Tools
164 License: Flora-1.1
165 Requires: %{name}_evas
166
167 %description -n org.tizen.widget_viewer_sdk
168 While developing the widget applications, this viewer will load it and execute it to help you to see it on the screen.
169
170 %post -n org.tizen.widget_viewer_sdk -p /sbin/ldconfig
171 %postun -n org.tizen.widget_viewer_sdk -p /sbin/ldconfig
172
173 #################################################
174 # libwidget_viewer_evas-unittests
175 #################################################
176 %package -n libwidget_viewer_evas-unittests
177 Summary:    GTest for widget-viewer
178 Group:      Development/Libraries
179
180 %description -n libwidget_viewer_evas-unittests
181 GTest for widget-viewer
182
183 %files -n libwidget_viewer_evas-unittests
184 %{_bindir}/widget_viewer-unittests
185 %{_bindir}/tizen-unittests/%{name}/run-unittest.sh
186
187 #################################################
188 # libwidget_viewer_evas-gcov
189 #################################################
190 %if 0%{?gcov:1}
191 %package -n libwidget_viewer_evas-gcov
192 Summary:    Simple string key-val dictionary ADT (gcov)
193 Group:      Application Framework/Testing
194
195 %description -n libwidget_viewer_evas-gcov
196 Simple string key-val dictionary ADT gcov objects
197 %endif
198
199 %if 0%{?gcov:1}
200 %files -n libwidget_viewer_evas-gcov
201 %{_datadir}/gcov/obj/*
202 %endif
203
204 ################################################
205 # libwatch_control
206 %package -n watch-control
207 Summary: APIs to control watch applications
208 Version: 0.0.1
209 License: Flora-1.1
210 Group: Applications/Core Applications
211
212 %description -n watch-control
213 A set of APIs to control watch applications
214
215 %package -n watch-control-devel
216 Summary: APIs to control watch applications
217 Group: Development/Libraries
218 Requires: watch-control
219
220 %description -n watch-control-devel
221 Header & package configuration of watch-control
222
223 %post -n watch-control -p /sbin/ldconfig
224 %postun -n watch-control -p /sbin/ldconfig
225
226 ################################################
227 # libwatch_holder_base
228 %package -n watch-holder-base
229 Summary: APIs to control watch applications
230 Version: 0.0.1
231 License: Flora-1.1
232 Group: Applications/Core Applications
233
234 %description -n watch-holder-base
235 A set of APIs to control watch applications
236
237 %package -n watch-holder-base-devel
238 Summary: APIs to control watch applications
239 Group: Development/Libraries
240 Requires: watch-holder-base
241
242 %description -n watch-holder-base-devel
243 Header & package configuration of watch-holder-base
244
245 %post -n watch-holder-base -p /sbin/ldconfig
246 %postun -n watch-holder-base -p /sbin/ldconfig
247
248 ################################################
249 # libwatch_holder
250 %package -n watch-holder
251 Summary: APIs to control watch applications
252 Version: 0.0.1
253 License: Flora-1.1
254 Group: Applications/Core Applications
255 Requires: watch-holder-base
256
257
258 %description -n watch-holder
259 A set of APIs to control watch applications
260
261 %package -n watch-holder-devel
262 Summary: APIs to control watch applications
263 Group: Development/Libraries
264 Requires: watch-holder
265
266 %description -n watch-holder-devel
267 Header & package configuration of watch-holder
268
269 %post -n watch-holder -p /sbin/ldconfig
270 %postun -n watch-holder -p /sbin/ldconfig
271
272
273 ################################################
274 # libframe-broker
275 ################################################
276 %package -n frame-broker
277 Summary: APIs to handle launching images for the launcher
278 License: Apache-2.0
279 Group: Applications/Core Applications
280
281 Recommends: amd-mod-screen-resolution
282
283 %description -n frame-broker
284 A set of APIs to handle launching images for the launcher
285
286 %package -n frame-broker-devel
287 Summary: APIs to handle launching images for the launcher
288 Group: Development/Libraries
289 Requires: frame-broker
290
291 %description -n frame-broker-devel
292 Header & package configuration of launcher service
293
294 %post -n frame-broker -p /sbin/ldconfig
295 %postun -n frame-broker -p /sbin/ldconfig
296
297 ################################################
298 # libframe-provider
299 ################################################
300 %package -n frame-provider
301 Summary: APIs to handle launching images for the callee
302 License: Apache-2.0
303 Group: Applications/Core Applications
304
305 %description -n frame-provider
306 A set of APIs to handle launching images for the callee
307
308 %package -n frame-provider-devel
309 Summary: APIs to handle launching images for the callee (devel)
310 Group: Development/Libraries
311 Requires: frame-provider
312
313 %description -n frame-provider-devel
314 Header & package configuration for the callee (devel)
315
316 %post -n frame-provider -p /sbin/ldconfig
317 %postun -n frame-provider -p /sbin/ldconfig
318
319 ################################################
320 # libambient-viewer
321 ################################################
322 %package -n ambient-viewer
323 Summary: APIs to control ambient viewer
324 Version: 0.0.1
325 License: apache-2.0
326 Group: Applications/Core Applications
327
328 %description -n ambient-viewer
329 A set of APIs to control viewer applications
330
331 %package -n ambient-viewer-devel
332 Summary: APIs to control watch applications
333 Group: Development/Libraries
334 Requires: ambient-viewer
335
336 %description -n ambient-viewer-devel
337 Header & package configuration of ambient-viewer
338
339 %post -n ambient-viewer -p /sbin/ldconfig
340 %postun -n ambient-viewer -p /sbin/ldconfig
341
342 ################################################
343 # files
344 ################################################
345 %files -n %{name}_evas
346 %manifest %{name}_evas.manifest
347 %attr(0644,root,root) %{_libdir}/%{name}_evas.so.*
348 %license LICENSE.Flora-1.1 LICENSE.Apache-2.0
349 /usr/share/widget_viewer_evas/res/edje/widget_viewer_evas.edj
350 /usr/share/widget_viewer_evas/res/image/*.png
351 /usr/share/widget_viewer_evas/res/locale/*/LC_MESSAGES/*
352 %{_bindir}/widget-mgr
353
354 %files -n %{name}_evas-devel
355 %{_includedir}/widget_viewer_evas/widget_viewer_evas.h
356 %{_includedir}/widget_viewer_evas/widget_viewer_evas_extension.h
357 %{_libdir}/pkgconfig/widget_viewer_evas.pc
358 %attr(0644,root,root) %{_libdir}/%{name}_evas.so
359
360 %files -n org.tizen.widget_viewer_sdk
361 %manifest org.tizen.widget_viewer_sdk.manifest
362 %{_datarootdir}/packages/org.tizen.widget_viewer_sdk.xml
363 %license LICENSE.Flora-1.1 LICENSE.Apache-2.0
364 %{_prefix}/apps/org.tizen.widget_viewer_sdk/*
365
366 %files -n watch-control
367 %manifest watch-control.manifest
368 %license LICENSE.Flora-1.1 LICENSE.Apache-2.0
369 %{_libdir}/libwatch-control.so.*
370
371 %files -n watch-control-devel
372 %{_includedir}/watch-control/*.h
373 %{_libdir}/pkgconfig/watch-control.pc
374 %{_libdir}/libwatch-control.so
375
376 %files -n watch-holder
377 %manifest watch-holder.manifest
378 %license LICENSE.Flora-1.1 LICENSE.Apache-2.0
379 %{_libdir}/libwatch-holder.so.*
380
381 %files -n watch-holder-devel
382 %{_includedir}/watch-holder/*.h
383 %{_includedir}/watch-holder/*.hh
384 %{_libdir}/pkgconfig/watch-holder.pc
385 %{_libdir}/libwatch-holder.so
386
387 %files -n watch-holder-base
388 %manifest watch-holder-base.manifest
389 %license LICENSE.Flora-1.1 LICENSE.Apache-2.0
390 %{_libdir}/libwatch-holder-base.so.*
391
392 %files -n watch-holder-base-devel
393 %{_includedir}/watch-holder-base/*.hh
394 %{_libdir}/pkgconfig/watch-holder-base.pc
395 %{_libdir}/libwatch-holder-base.so
396
397 %files -n frame-broker
398 %manifest frame-broker.manifest
399 %{_libdir}/libframe-broker.so.*
400
401 %files -n frame-broker-devel
402 %{_includedir}/frame-broker/*.h
403 %{_libdir}/pkgconfig/frame-broker.pc
404 %{_libdir}/libframe-broker.so
405
406 %files -n frame-provider
407 %manifest frame-provider.manifest
408 %{_libdir}/libframe-provider.so.*
409
410 %files -n frame-provider-devel
411 %{_includedir}/frame-provider/*.h
412 %{_libdir}/pkgconfig/frame-provider.pc
413 %{_libdir}/libframe-provider.so
414
415 %files -n ambient-viewer
416 %manifest ambient-viewer.manifest
417 %{_libdir}/libambient-viewer.so.*
418
419 %files -n ambient-viewer-devel
420 %{_includedir}/ambient-viewer/*.h
421 %{_includedir}/ambient-viewer/*.hh
422 %{_libdir}/pkgconfig/ambient-viewer.pc
423 %{_libdir}/libambient-viewer.so
424 # End of a file