Name: privilege-info
Summary: Privilege Information
-Version: 0.0.7
+Version: 0.0.8
Release: 1
Group: Security/API
License: Apache-2.0
BuildRequires: pkgconfig(capi-base-common)
BuildRequires: pkgconfig(capi-system-info)
BuildRequires: pkgconfig(security-privilege-manager)
+%if "%{build_type}" == "COVERAGE"
+BuildRequires: lcov
+%endif
%description
Provides Privilege Information(Privilege Info) API
%description -n privilege-info-tests
Privilege Info API Internal Test
+%if "%{build_type}" == "COVERAGE"
+
+%package -n privilege-info-coverage
+Summary: Privilege Info code coverage data
+Group: Security/Testing
+Requires: privilege-info-tests = %{version}-%{release}
+Requires: privilege-info-debugsource = %{version}-%{release}
+Requires: lcov
+Requires: gcc
+
+%description -n privilege-info-coverage
+Privilege Info code coverage data
+
+%endif
+
%prep
%setup -q
%build
-%cmake . -DCMAKE_BUILD_TYPE=%{build_type}
+
+%global coverage_dir %{_datadir}/privilege-info-coverage
+
+%cmake . -DCMAKE_BUILD_TYPE=%{build_type} -DCOVERAGE_DIR=%{coverage_dir}
make %{?jobs:-j%jobs}
%files -n privilege-info-tests
%manifest packaging/privilege-info.manifest
%{_bindir}/privilege-info-tests
+
+%if "%{build_type}" == "COVERAGE"
+
+%files -n privilege-info-coverage
+%manifest packaging/privilege-info.manifest
+%{_bindir}/privilege-info-coverage.sh
+%coverage_dir
+
+%endif