BuildRequires: pkgconfig(gio-2.0)
BuildRequires: cmake
Requires: security-config
+%if 0%{?gcov:1}
+BuildRequires: pkgconfig(gmock)
+%endif
+
#Requires: %{name}-compat = %{version}-%{release}
#Recommends: %{name}-profile_common = %{version}-%{release}
%description ipsp
Bluetooth agent binary compiled for IPSP(Internet Protocol Support Profile)
+%if 0%{?gcov:1}
+%package test
+Summary: Test package for bluetooth-agent
+Group: TO_BE/FILLED
+Requires: %{name} = %{version}-%{release}
+
+%description test
+This package is C-API test application.
+%endif
+
%prep
%setup -q
cp %{SOURCE1001} .
export CFLAGS_DEFAULT="$CFLAGS"
# Build All (wearalbe/ivi/common/tv/mobile)
-cmake . -DCMAKE_INSTALL_PREFIX=/usr -DTIZEN_FEATURE_BT_HFP_AG=1
+cmake . -DCMAKE_INSTALL_PREFIX=/usr \
+ -DTIZEN_FEATURE_BT_HFP_AG=1 \
+ -DBUILD_GTESTS=%{?gcov:1}%{!?gcov:0} \
+ -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0}
+
make VERBOSE=1
%install
%{_datadir}/dbus-1/system-services/org.bluez.ipsp_agent.service
%{_sysconfdir}/dbus-1/system.d/bluetooth-ipsp-agent.conf
+%if 0%{?gcov:1}
+%files test
+%manifest %{name}.manifest
+%{_bindir}/gtest-bluetooth-agent
+%{_libdir}/lib*
+%exclude %{_libdir}/debug/*
+%exclude %{_libdir}/debug/.build-id/*
+%endif