Release version 0.0.9
[platform/core/security/privilege-info.git] / packaging / privilege-info.spec
index 5a1cdea..f8824e5 100644 (file)
@@ -2,7 +2,7 @@
 
 Name:    privilege-info
 Summary: Privilege Information
-Version: 0.0.7
+Version: 0.0.9
 Release: 1
 Group:   Security/API
 License: Apache-2.0
@@ -17,6 +17,9 @@ BuildRequires: pkgconfig(dlog)
 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
@@ -37,11 +40,29 @@ Requires: %{name} = %{version}-%{release}
 %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}
 
@@ -69,3 +90,12 @@ rm -rf %{buildroot}
 %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