1 Name: capi-network-tethering
2 Summary: Tethering Framework
7 Source0: %{name}-%{version}.tar.gz
8 BuildRequires: pkgconfig(dlog)
9 BuildRequires: pkgconfig(dbus-1)
10 BuildRequires: pkgconfig(capi-base-common)
11 BuildRequires: pkgconfig(glib-2.0)
12 BuildRequires: pkgconfig(gio-2.0)
13 BuildRequires: pkgconfig(vconf)
14 BuildRequires: pkgconfig(key-manager)
15 BuildRequires: pkgconfig(capi-system-info)
16 BuildRequires: pkgconfig(libtzplatform-config)
17 BuildRequires: pkgconfig(gmock)
20 BuildRequires: gtest-devel
24 Requires(post): /sbin/ldconfig
25 Requires(postun): /sbin/ldconfig
28 Tethering framework library for CAPI
31 Summary: Development package for Tethering framework library
32 Group: Development/Libraries
33 Requires: %{name} = %{version}-%{release}
35 Development package for Tethering framework library
38 Summary: Test application for Tethering
40 Test application for Tethering
44 Summary: Tethering Library(gcov)
45 Group: Network/Testing
47 gcov objects for coverage test
52 Summary: %{name} unittests binary
54 %description unittests
64 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
65 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
66 export FFLAGS+=" -fprofile-arcs -ftest-coverage"
69 %if "%{?tizen_profile_name}" == "tv"
70 export CFLAGS+=" -DTIZEN_TV_EXT"
71 export CXXFLAGS+=" -DTIZEN_TV_EXT"
74 %cmake -DLIB_INSTALL_DIR=%{_libdir} \
75 -DBUILD_UNITTEST=%{?asan:0}%{!?asan:1} \
84 builddir=$(basename $PWD)
85 gcno_obj_dir=%{buildroot}%{_datadir}/gcov/obj/%{name}/"$builddir"
86 mkdir -p "$gcno_obj_dir"
87 find . -name '*.gcno' ! -path '*/tools/*' -exec cp --parents '{}' "$gcno_obj_dir" ';'
91 cat << EOF > run-unittest.sh
98 echo "test_main start"
99 /usr/bin/tethering-gtest
103 echo "teardown start"
115 mkdir -p %{buildroot}%{_bindir}/tizen-unittests/%{name}
116 install -m 0755 run-unittest.sh %{buildroot}%{_bindir}/tizen-unittests/%{name}/
121 tests/tethering-gtest
122 lcov -c --ignore-errors mismatch,graph,unused --no-external -b . -d . -o %{name}.info
123 genhtml %{name}.info -o out --legend --show-details
126 %post -p /sbin/ldconfig
128 %postun -p /sbin/ldconfig
131 %manifest capi-network-tethering.manifest
132 %defattr(-,root,root,-)
137 %defattr(-,root,root,-)
138 %{_includedir}/network/*.h
139 %{_libdir}/pkgconfig/*.pc
144 %{_bindir}/tethering_test
148 %{_datadir}/gcov/obj/*
153 %{_bindir}/tethering-gtest
154 %{_bindir}/tizen-unittests/%{name}/run-unittest.sh