Release version 0.2.10
[platform/core/appfw/ui-gadget-1.git] / packaging / ui-gadget-1.spec
1 Name:       ui-gadget-1
2 Summary:    UI Gadget Library
3 Version:    0.2.10
4 Release:    1
5 Group:      System/Libraries
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1001:     ui-gadget-1.manifest
9 Requires(post): /sbin/ldconfig
10 Requires(postun): /sbin/ldconfig
11 BuildRequires:  pkgconfig(glib-2.0)
12 BuildRequires:  pkgconfig(appcore-efl)
13 BuildRequires:  pkgconfig(bundle)
14 BuildRequires:  pkgconfig(dlog)
15 BuildRequires:  pkgconfig(appsvc)
16 BuildRequires:  pkgconfig(elementary)
17 BuildRequires:  pkgconfig(capi-appfw-application)
18 BuildRequires:  pkgconfig(capi-appfw-app-manager)
19 BuildRequires:  pkgconfig(vconf)
20 BuildRequires:  pkgconfig(pkgmgr-info)
21 BuildRequires:  cmake
22 BuildRequires:  edje-bin
23 BuildRequires:  pkgconfig(libtzplatform-config)
24 BuildRequires:  pkgconfig(ecore-wl2)
25
26 %description
27 UI gadget library (development headers)
28
29 %package devel
30 Summary:    Development files for %{name}
31 Group:      Development/Libraries
32 Requires:   %{name} = %{version}-%{release}
33
34 %description devel
35 Development files for %{name}
36
37 %if 0%{?gcov:1}
38 %package gcov
39 Summary:  UI Gadget Library(gcov)
40 Group:    System/API
41
42 %description gcov
43 gcov objects of UI Gadget Library
44 %endif
45
46 %prep
47 %setup -q
48 cp %{SOURCE1001} .
49
50 %build
51 %if 0%{?gcov:1}
52 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
53 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
54 export FFLAGS+=" -fprofile-arcs -ftest-coverage"
55 export LDFLAGS+=" -lgcov"
56 %endif
57
58 export CFLAGS+=" -DEFL_BETA_API_SUPPORT "
59 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
60 %cmake -DFULLVER=%{version} \
61         -DMAJORVER=${MAJORVER} \
62         -DTZ_SYS_ETC=%TZ_SYS_ETC \
63         .
64
65 make %{?jobs:-j%jobs}
66
67 %if 0%{?gcov:1}
68 mkdir -p gcov-obj
69 find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
70 %endif
71
72 %install
73 rm -rf %{buildroot}
74 %make_install
75
76 %if 0%{?gcov:1}
77 mkdir -p %{buildroot}%{_datadir}/gcov/obj
78 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
79 %endif
80
81 %post
82 /sbin/ldconfig
83 ln -sf %{TZ_SYS_BIN}/ug-client %{TZ_SYS_BIN}/ug-launcher
84
85 %postun -p /sbin/ldconfig
86
87 %files
88 %manifest %{name}.manifest
89 %defattr(-,root,root,-)
90 %{_libdir}/*.so.*
91 %{_libdir}/lib%{name}-efl-engine.so
92 /usr/share/edje/ug_effect.edj
93 %{_bindir}/ug-client
94 /usr/share/edje/ug-client/*.edj
95 %license LICENSE
96
97 %files devel
98 %manifest %{name}.manifest
99 %defattr(-,root,root,-)
100 %{_includedir}/ug-1/*.h
101 %{_libdir}/libui-gadget-1.so
102 %{_libdir}/pkgconfig/%{name}.pc
103
104 %if 0%{?gcov:1}
105 %files gcov
106 %{_datadir}/gcov/obj/*
107 %endif