Name: capi-network-connection
Summary: Network Connection library in TIZEN C API
-Version: 1.0.71
+Version: 1.0.117
Release: 1
Group: System/Network
License: Apache-2.0
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(capi-base-common)
BuildRequires: pkgconfig(capi-system-info)
+%if 0%{?gcov:1}
+BuildRequires: lcov
+%endif
+
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%description devel
Network Connection library in Tizen C API (Development)
+%if 0%{?gcov:1}
+%package gcov
+Summary: Network Connection library (gcov)
+Group: Network/Testing
+
+%description gcov
+gcov objects for coverage test
+%endif
+
%prep
%setup -q
%build
+%if 0%{?gcov:1}
+export CFLAGS+=" -fprofile-arcs -ftest-coverage"
+export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
+export FFLAGS+=" -fprofile-arcs -ftest-coverage"
+export LDFLAGS+=" -lgcov"
+%endif
+
export CFLAGS+=' -Wno-unused-local-typedefs'
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
cmake -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
%if 0%{?model_build_feature_network_dsds} == 1
-DTIZEN_DUALSIM_ENABLE=1 \
%endif
-%if "%{profile}" == "wearable"
- -DTIZEN_WEARABLE=1 \
-%else
-%if "%{profile}" == "mobile"
- -DTIZEN_MOBILE=1 \
-%else
-%if "%{profile}" == "tv"
- -DTIZEN_TV=1 \
-%endif
-%endif
-%endif
.
make %{?_smp_mflags}
+%if 0%{?gcov:1}
+mkdir -p gcov-obj
+find . -name '*.gcno' ! -iname "*mptcp*" -exec cp '{}' gcov-obj ';'
+%endif
%install
%make_install
-#License
-mkdir -p %{buildroot}%{_datadir}/license
-cp LICENSE %{buildroot}%{_datadir}/license/capi-network-connection
+%if 0%{?gcov:1}
+mkdir -p %{buildroot}%{_datadir}/gcov/obj
+install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
+%endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
-
%files
%manifest capi-network-connection.manifest
%attr(644,-,-) %{_libdir}/libcapi-network-connection.so.*
-%{_datadir}/license/capi-network-connection
+%license LICENSE
%{_bindir}/connection_test
%files devel
%{_includedir}/network/*.h
%{_libdir}/pkgconfig/*.pc
%{_libdir}/libcapi-network-connection.so
+
+%if 0%{?gcov:1}
+%files gcov
+%{_datadir}/gcov/obj/*
+%endif