summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/csr-framework.spec11
1 files changed, 4 insertions, 7 deletions
diff --git a/packaging/csr-framework.spec b/packaging/csr-framework.spec
index 2ae1290..aaa517c 100644
--- a/packaging/csr-framework.spec
+++ b/packaging/csr-framework.spec
@@ -194,11 +194,6 @@ export LDFLAGS+=" -lgcov"
make %{?jobs:-j%jobs}
-%if 0%{?gcov:1}
-mkdir -p gcov-obj
-find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
-%endif
-
%install
%make_install
%install_service sockets.target.wants %{service_name}-cs.socket
@@ -216,8 +211,10 @@ mkdir -p %{buildroot}%{engine_rw_working_dir}
%find_lang %{service_name}
%if 0%{?gcov:1}
-mkdir -p %{buildroot}%{_datadir}/gcov/obj/%{name}
-install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj/%{name}
+builddir=$(basename $PWD)
+gcno_obj_dir=%{buildroot}%{_datadir}/gcov/obj/%{name}/"$builddir"
+mkdir -p "$gcno_obj_dir"
+find . -name '*.gcno' -exec cp --parents '{}' "$gcno_obj_dir" ';'
%endif
%post