2 Summary: Event system library
5 Group: Application Framework/Libraries
7 Source0: %{name}-%{version}.tar.gz
9 BuildRequires: pkgconfig(ecore)
10 BuildRequires: pkgconfig(bundle)
11 BuildRequires: pkgconfig(dlog)
12 BuildRequires: pkgconfig(gio-2.0)
13 BuildRequires: pkgconfig(glib-2.0)
14 BuildRequires: pkgconfig(capi-base-common)
15 BuildRequires: pkgconfig(gmock)
22 Requires(post): /sbin/ldconfig
23 Requires(postun): /sbin/ldconfig
30 Summary: Event system library (devel)
31 Group: Development/Libraries
32 Requires: %{name} = %{version}-%{release}
35 Event system library (devel)
37 #################################################
38 # eventsystem-unittests
39 #################################################
40 %package -n %{name}-unittests
41 Summary: GTest for EventySystem API
42 Group: Application Framework/Testing
45 %description -n %{name}-unittests
46 GTest for EventSystem API
48 #################################################
50 #################################################
53 Summary: Event System API(gcov)
54 Group: Application Framework/Testing
57 gcov objects of a eventsystem
64 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
65 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
66 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
69 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
70 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
71 export FFLAGS+=" -fprofile-arcs -ftest-coverage"
72 export LDFLAGS+=" -lgcov"
75 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
77 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
84 lcov -c --ignore-errors mismatch,graph,unused --no-external -q -d . -o ${name}.info
85 genhtml ${name}.info -o out --legend --show-details
93 builddir=$(basename $PWD)
94 gcno_obj_dir=%{buildroot}%{_datadir}/gcov/obj/%{name}/"$builddir"
95 mkdir -p "$gcno_obj_dir"
96 find . -name '*.gcno' -exec cp --parents '{}' "$gcno_obj_dir" ';'
99 cat << EOF > run-unittest.sh
106 echo "test_main start"
107 /usr/bin/eventsystem-unittests
111 echo "teardown start"
123 mkdir -p %{buildroot}%{_bindir}/tizen-unittests/%{name}
124 install -m 0755 run-unittest.sh %{buildroot}%{_bindir}/tizen-unittests/%{name}/
127 %post -p /sbin/ldconfig
129 %postun -p /sbin/ldconfig
132 %manifest eventsystem.manifest
133 %defattr(-,root,root,-)
134 %{_libdir}/libeventsystem.so.*
138 %defattr(-,root,root,-)
140 %{_libdir}/libeventsystem.so
141 %{_libdir}/pkgconfig/eventsystem.pc
143 #################################################
144 # eventsystem-unittests
145 #################################################
146 %files -n %{name}-unittests
147 %{_bindir}/%{name}-unittests
148 %{_bindir}/tizen-unittests/%{name}/run-unittest.sh
150 #################################################
152 #################################################
155 %{_datadir}/gcov/obj/*