${EXTRA_KM_DEPS}
)
+IF (NOT DEFINED COVERAGE_ONLY)
ADD_SUBDIRECTORY(data)
ADD_SUBDIRECTORY(doc)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(systemd)
ADD_SUBDIRECTORY(misc)
ADD_SUBDIRECTORY(upgrade)
+ENDIF (NOT DEFINED COVERAGE_ONLY)
+
ADD_SUBDIRECTORY(unit-tests)
\ No newline at end of file
%global watchdog_notify_sec 20
%global tz_backend_enabled %{?tz_backend:%tz_backend}%{!?tz_backend:OFF}
%{!?build_type:%global build_type RELEASE}
+%global coverage_only 0
+%if %{build_type} == COVERAGE_ONLY
+ %global build_type DEBUG
+ %global coverage_only 1
+%endif
Name: key-manager
Summary: Central Key Manager and utilities
-DUNIT_TESTS_DIR=%{unit_tests_dir} \
-DMISC_DIR=%{misc_dir} \
-DCOVERAGE_DIR=%{coverage_dir} \
+%if %{coverage_only}
+ -DCOVERAGE_ONLY=ON \
+%endif
-DDUMP_LEGACY_DB_LIBNAME=%{dump_legacy_db_libname}
make %{?jobs:-j%jobs}
%install
%make_install
+
+###############################################################################
+%if ! %{coverage_only}
+###############################################################################
+
%install_service multi-user.target.wants central-key-manager.service
%install_service sockets.target.wants central-key-manager-api-control.socket
%install_service sockets.target.wants central-key-manager-api-storage.socket
%install_service sockets.target.wants central-key-manager-api-encryption.socket
cp -a %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} %{SOURCE1004} %{buildroot}%{_datadir}/
+#################### ! %{coverage_only} #######################################
+%endif
+###############################################################################
+
%pre
# tzplatform-get sync breaked because of on-development situation. comment out just for temporary
# fail if runtime dir variable is different than compilation time variable
%postun -n libkey-manager-common -p %{sbin_dir}/ldconfig
%postun -n libkey-manager-client -p %{sbin_dir}/ldconfig
+###############################################################################
+%if ! %{coverage_only}
+###############################################################################
+
%files -n key-manager
%manifest key-manager.manifest
%license LICENSE
%{bin_dir}/ckm_generate_db
%misc_dir
+#################### ! %{coverage_only} #######################################
+%endif
+###############################################################################
+
%files -n key-manager-unit-tests
%manifest key-manager-unit-tests.manifest
%license LICENSE