2 Summary: String key-val dictionary ADT
5 Group: System/Libraries
7 Source0: bundle-%{version}.tar.gz
8 Source1001: bundle.manifest
9 Source1002: parcel.manifest
11 BuildRequires: pkgconfig(glib-2.0)
12 BuildRequires: pkgconfig(dlog)
13 BuildRequires: pkgconfig(capi-base-common)
14 BuildRequires: pkgconfig(json-glib-1.0)
15 BuildRequires: pkgconfig(gmock)
23 Simple string key-val dictionary ADT
26 Summary: String key-val dictionary ADT (devel)
27 Group: Development/Libraries
28 Requires: %{name} = %{version}-%{release}
31 Simple string key-val dictionary ADT (devel)
33 #################################################
35 #################################################
37 Summary: GTest for bundle
38 Group: Development/Libraries
40 %description unittests
43 #################################################
45 #################################################
48 Summary: Simple string key-val dictionary ADT (gcov)
49 Group: Application Framework/Testing
52 Simple string key-val dictionary ADT gcov objects
55 #################################################
57 #################################################
59 Summary: Parcel Library
60 Group: Development/Libraries
62 %description -n parcel
65 %package -n parcel-devel
66 Summary: Parcel Library (devel)
67 Group: Development/Libraries
68 Requires: parcel = %{version}-%{release}
70 %description -n parcel-devel
71 Parcel Library (devel)
73 #################################################
75 #################################################
76 %package -n parcel-unittests
77 Summary: GTest for parcel
78 Group: Development/Libraries
80 %description -n parcel-unittests
84 %setup -q -n %{name}-%{version}
90 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
91 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
92 export FFLAGS+=" -fprofile-arcs -ftest-coverage"
93 export LDFLAGS+=" -lgcov"
96 %cmake -DVERSION=%{version} .
97 %__make %{?_smp_mflags}
100 ctest --verbose %{?_smp_mflags}
102 lcov -c --ignore-errors graph --no-external -b . -d . -o %{name}.info
103 genhtml %{name}.info -o out --legend --show-details
110 builddir=$(basename $PWD)
111 gcno_obj_dir=%{buildroot}%{_datadir}/gcov/obj/%{name}/"$builddir"
112 mkdir -p "$gcno_obj_dir"
113 find . -name '*.gcno' -exec cp --parents '{}' "$gcno_obj_dir" ';'
116 cat << EOF > run-unittest.sh
118 GCOV_PATH="/tmp/home/abuild/rpmbuild/BUILD"
119 PAKCAGE="%{name}-%{version}"
122 ## Sets the permission for applications
123 /usr/bin/find /tmp/home/ -print | /usr/bin/xargs -n1 /usr/bin/chsmack -a "System::Run" &> /dev/null
124 /usr/bin/find /tmp/home/ -print | /usr/bin/xargs -n1 /usr/bin/chsmack -a "System::Run" -t &> /dev/null
125 /usr/bin/chmod -R 777 /tmp/home/
130 /usr/bin/mkdir -p "${GCOV_PATH}/${PACKAGE}"
135 echo "test_main start"
136 export "GCOV_PREFIX=/tmp"
137 /usr/bin/bundle_unittests
141 echo "teardown start"
154 mkdir -p %{buildroot}%{_bindir}/tizen-unittests/%{name}
155 install -m 0755 run-unittest.sh %{buildroot}%{_bindir}/tizen-unittests/%{name}/
157 cat << EOF > run-parcel-unittest.sh
159 GCOV_PATH="/tmp/home/abuild/rpmbuild/BUILD"
160 PAKCAGE="parcel-%{version}"
163 ## Sets the permission for applications
164 /usr/bin/find /tmp/home/ -print | /usr/bin/xargs -n1 /usr/bin/chsmack -a "System::Run" &> /dev/null
165 /usr/bin/find /tmp/home/ -print | /usr/bin/xargs -n1 /usr/bin/chsmack -a "System::Run" -t &> /dev/null
166 /usr/bin/chmod -R 777 /tmp/home/
171 /usr/bin/mkdir -p "${GCOV_PATH}/${PACKAGE}"
176 echo "test_main start"
177 export "GCOV_PREFIX=/tmp"
178 /usr/bin/parcel_unittests
182 echo "teardown start"
195 mkdir -p %{buildroot}%{_bindir}/tizen-unittests/parcel
196 install -m 0755 run-parcel-unittest.sh %{buildroot}%{_bindir}/tizen-unittests/parcel/run-unittest.sh
198 %post -p /sbin/ldconfig
200 %postun -p /sbin/ldconfig
210 %{_bindir}/bundle_unittests
214 %manifest %{name}.manifest
215 %defattr(-,root,root,-)
216 %{_libdir}/libbundle.so.*
220 %manifest %{name}.manifest
221 %defattr(-,root,root,-)
223 %{_libdir}/pkgconfig/bundle.pc
224 %{_libdir}/libbundle.so
226 #################################################
228 #################################################
230 %{_bindir}/bundle_unittests
231 %{_bindir}/tizen-unittests/%{name}/run-unittest.sh
233 #################################################
235 #################################################
238 %{_datadir}/gcov/obj/*
241 #################################################
243 #################################################
245 %manifest parcel.manifest
247 %{_libdir}/libparcel.so.*
249 %files -n parcel-devel
250 %manifest parcel.manifest
252 %{_libdir}/pkgconfig/parcel.pc
253 %{_libdir}/libparcel.so
255 %files -n parcel-unittests
256 %{_bindir}/parcel_unittests
257 %{_bindir}/tizen-unittests/parcel/run-unittest.sh