BuildRequires: pkgconfig(gmock)
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
-%if 0%{?gcov:1}
-BuildRequires: tar
-BuildRequires: lcov
-%endif
%description
Telephony public API library
%description unittests
The %{name}-unittests pacakge contains programs for checking quality the %{name}.
-%if 0%{?gcov:1}
-%package gcov
-Summary: Coverage Data of %{name}
-Group: Telephony/Testing
-
-%description gcov
-The %{name}-gcov pacakge contains gcov objects
-%endif
-
%define tel_header_dir %{_includedir}/telephony
%prep
cp %{SOURCE1001} ./%{name}.manifest
%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
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
%cmake . -DMAJORVER=${MAJORVER} -DFULLVER=%{version} \
-DSTDOUT_LOG=%{?stdlog:1}%{!?stdlog:0}
make %{?_smp_mflags}
-%if 0%{?gcov:1}
-mkdir -p gcov-obj
-find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
-%endif
-
%install
%make_install
-%if 0%{?gcov:1}
-mkdir -p %{buildroot}%{_datadir}/gcov/obj/%{name}
-install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj/%{name}/
-%endif
-
%check
tests/tel-gtest
-%if 0%{?gcov:1}
-lcov -c --ignore-errors graph --no-external -b . -d . -o %{name}.info
-genhtml %{name}.info -o out --legend --show-details
-%endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%{_bindir}/telephony-test
%{_bindir}/%{name}/*gtest*
%license LICENSE.APLv2
-
-%if 0%{?gcov:1}
-%files gcov
-%{_datadir}/gcov/*
-%endif