Name: capi-media-audio-io
Summary: An Audio Input & Audio Output library in Tizen Native API
-Version: 0.3.55
+Version: 0.5.26
Release: 0
Group: Multimedia/API
License: Apache-2.0
Source1001: capi-media-audio-io.manifest
BuildRequires: cmake
BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(mm-common)
-BuildRequires: pkgconfig(mm-session)
-BuildRequires: pkgconfig(mm-sound)
-BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(capi-media-sound-manager)
BuildRequires: pkgconfig(capi-base-common)
BuildRequires: pkgconfig(libpulse)
%description devel
An Audio Input & Audio Output library in Tizen Native API (DEV)
+%if 0%{?gcov:1}
+%package gcov
+Summary: Line Coverage files
+Group: Development/Multimedia
+
+%description gcov
+Collection of files related to line coverage using gcov.
+%endif
+
+%package tool
+Summary: An Audio Input & Audio Output library in Tizen Native API (Tool)
+Group: Multimedia/Development
+Requires: %{name} = %{version}-%{release}
+
+%description tool
+An Audio Input & Audio Output library in Tizen Native API (Tool)
+
%prep
%setup -q
cp %{SOURCE1001} .
%build
+%if 0%{?gcov:1}
+export CFLAGS+=" -fprofile-arcs -ftest-coverage"
+export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
+export LDFLAGS+=" -lgcov"
+%endif
+
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
+%if "%{tizen_profile_name}" == "tv"
+ -DTIZEN_FEATURE_DISABLE_SESSION_BACKWARD_COMP=On \
+ -DTIZEN_FEATURE_PRODUCT_TV=On
+%endif
make %{?jobs:-j%jobs}
+%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
+install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
+%endif
+
%post
/sbin/ldconfig
%{_includedir}/media/audio_io.h
%{_libdir}/pkgconfig/*.pc
%{_libdir}/libcapi-media-audio-io.so
+
+%files tool
+%manifest %{name}.manifest
%{_prefix}/bin/audio_io_test
+%if 0%{?gcov:1}
+%files gcov
+%{_datadir}/gcov/obj/*
+%endif